[csswg-drafts] [css-pseudo][MQ][css-env] Seasonal Theming (#4627)

Crissov has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-pseudo][MQ][css-env] Seasonal Theming ==
Although we already have mediaqueries – drafted for level 5 – for user preferences regarding [dark themes](https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme "prefers-color-scheme: no-preference | light | dark") and [measured environmental lightning](https://drafts.csswg.org/mediaqueries-5/#light-level "light-level: dim | normal | washed"), styling based on the userʼs seasonal and temporal surroundings can be more complex than that. 

Many sites use special (content and) style during specific times of the year (and less often of the month, week or day), or in anticipation thereof. A problem with server-side approaches is that they may not be appropriate within the visitorʼs timezone, location or culture – the result can be irritating or even offensive. 

* Meteorological seasons and lunar crescents are inverted in the opposite hemisphere. 
* The time of day depends on the userʼs longitudinal location and national laws. 
* Availability of sunlight outside buildings depends on the date, (absolute) time and latitudinal location of the user. 
* Holidays depend on national laws, the calendar(s) in use, the predominant local religion or culture and that observed by the user.

I am not sure how to address this the best way in CSS, but I believe it is in scope. Environment variables, pseudo classes and media queries _could_ provide solutions.

~~~~ css
@media sunlit {
  {foo: bar;}
} 
:waning-crescent {foo: bar;} 
foo {bar: env(seasonal-color);} 
~~~~

Fingerprinting and privacy concerns should be about as serious as for preferred languages and available fonts. 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4627 using your GitHub account

Received on Sunday, 22 December 2019 13:30:34 UTC