XF 2.3 Set light variation as default for guests

Actually it is.

It's my site - I get to choose exactly […] how my users interact with it.
Only to some degree. For instance, you do not get to choose whether your users interact with your site during the day or at night, alone or in company (which they may disturb under certain lighting conditions). Furthermore, you do not get to choose how good or bad your users’ sight is; nor the quality of their computer screens, etc.

I take the newly introduced feature of style variations in XF 2.3 to be an accessibility feature; and accessibility is, by definition, alter-centric.

By analogy, if one were to write and publish a book, one would naturally make a lot of choices as its author and publisher; hopefully, however, one would not stipulate what glasses the readers of the book should wear should they need to.
 
Now I am officially confused. Admins can easily choose whether or not to have variations and which style is default.
In this case, the topic creator wanted to use a light theme without the option to make it dark for guests. I think Xenforo in version 2.3 allows vguests to have a dark mode. The creator wants it to be for members, not guests.
 
In this case, the topic creator wanted to use a light theme without the option to make it dark for guests. I think Xenforo in version 2.3 allows vguests to have a dark mode. The creator wants it to be for members, not guests.

I haven't tried it yet, but @AndyB suggested a simple workaround -

2.3 allows you to add "variations" to a theme, which is how dark mode is implemented.

1717796698057.webp

However, you can also choose to disable variations for a style and make that style your default:

1717796752787.webp

... so by default users get a theme without any variations and thus no dark mode (or conversely, no light mode if you choose!).

You can then create a second theme that does allow variations to enable dark mode either by user selection or by some other mechanism.
 
In this case, the topic creator wanted to use a light theme without the option to make it dark for guests.
No, he just wanted light to be default, not to lose the option for dark - unless I’m misunderstanding. He wants variations options but change the default from system to light.
 
Except it's unsolvable because there is no default style if style variation is enabled. It's the setting on the visitor's device that decides...
 
Except it's unsolvable because there is no default style if style variation is enabled
By default I presume the meaning the style that shows until the user chooses another.

ie you load the site (as a guest or as a user before setting any variation preferences) and it shows light variation, but the variation chooser offers you system and dark.
 
Last edited:
What is unfortunate is that Windows does not automatically adjust the style according to defined times or according to sunrise and sunset. Personally my Windows is in light mode and therefore when I visit XenForo I do not really benefit from the style variation, I have to define the style manually.

I don't know if XenForo can introduce this notion of time or sunrise/sunset to define the style to apply, this would make it possible to dispense with the indication provided by the user's device. @Chris D is this doable?
 
Not really, disposing of the system preference is kind of counter to the entire concept. Almost any app with a light or dark mode will work the same, across both desktop and mobile.

It could potentially be accomplished via an add-on I suppose, but we're unlikely to implement something like that in the core.
 
On the other hand, is there a variable that indicates the current status of the style variation? light or dark. Which could be used in a notice?
For example: "The forum is displayed with the style {styleVariation} due to the setting of your device but you can... etc..."
 
Being a bit thick here. I've upgraded to 2.3RC2 do I need to do anything to allow 'auto dark mode' switching by the OS? I have a default style that is 'light' and a selectable 'dark mode' in 2.2

1718327589973.webp
 
Variations are not automatically enabled for existing styles. You may edit the style settings to enable them. Then you would need to apply the customizations made to your dark style to the "alternate" variation of the light style.
 
Back
Top Bottom