You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionuiIssues related to the graphical user interface
From the perspective of an end user, I would expect 'default' as the selected theme to follow what prefers-color-scheme specifies (and have no-preference behave like the current 'default' setting), and a manually set theme to override what the property says.
I don't think we would need a new 'white' theme though, the current light theme is perfectly acceptable for general usage with prefers-color-scheme: light.
I think that would require changing the way assets are served since there is no way to access an asset outside of the current theme folder. The advantage of this setup is that the default theme doesn't need separate maintenance, it just links to the existing themes.
The second way of doing it is just creating a new CSS default file by adapting the white/dark theme files. This would require no changes to the server code but it would entail maintaining separately a new file.
Which way do you think would be best? Is any of these what you had in mind?
My gut feeling was to check current theme, if its default, pass the preferred (from css) scheme in the headers, which would then drive the asset serving.
I have followed the first approach in the end. There is a proposal for passing the preferred color scheme in the HTTP request so that the correct assets could be served at request time (see w3c/csswg-drafts#4162), but as far as I know nothing like this is possible as of now.
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionuiIssues related to the graphical user interface
Activity
AudriusButkevicius commentedon Oct 31, 2019
Please file a PR for this, this would need some changes what "default" means (which is no preference), and add a white theme explicitly.
Ferroin commentedon Oct 31, 2019
From the perspective of an end user, I would expect 'default' as the selected theme to follow what
prefers-color-schemespecifies (and haveno-preferencebehave like the current 'default' setting), and a manually set theme to override what the property says.I don't think we would need a new 'white' theme though, the current light theme is perfectly acceptable for general usage with
prefers-color-scheme: light.AudriusButkevicius commentedon Oct 31, 2019
I mean light when I say white, but this does need to change what default means and how asset overriding works.
mx-psi commentedon Nov 2, 2019
@AudriusButkevicius I was going to file a PR but I am not sure on how to proceed. I could implement it in either of two ways:
My first idea was creating a default theme that imports the appropriate theme depending on a media query, something like:
I think that would require changing the way assets are served since there is no way to access an asset outside of the current theme folder. The advantage of this setup is that the default theme doesn't need separate maintenance, it just links to the existing themes.
The second way of doing it is just creating a new CSS default file by adapting the white/dark theme files. This would require no changes to the server code but it would entail maintaining separately a new file.
Which way do you think would be best? Is any of these what you had in mind?
AudriusButkevicius commentedon Nov 2, 2019
Not sure, ideally something that does not break people with custom themes now.
AudriusButkevicius commentedon Nov 2, 2019
My gut feeling was to check current theme, if its default, pass the preferred (from css) scheme in the headers, which would then drive the asset serving.
Adds support for prefers-color-scheme on default theme (fixes syncthi…
gui, lib/api: Adds support for prefers-color-scheme on default theme (f…
mx-psi commentedon Nov 3, 2019
I have followed the first approach in the end. There is a proposal for passing the preferred color scheme in the HTTP request so that the correct assets could be served at request time (see w3c/csswg-drafts#4162), but as far as I know nothing like this is possible as of now.
gui, lib/api: Adds support for prefers-color-scheme (fixes #6115)
Merge branch 'master' into dbastr3
Merge branch 'dbastr3' into badger
Merge branch 'master' into logsuppression
Merge branch 'logsuppression' of https://github.com/calmh/syncthing i…