[csswg-drafts] CSS needs rule references to localMemory values, to be responsive to user input. (#4933)

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

== CSS needs rule references to localMemory values, to be responsive to user input. ==
[css-localMemory-rules]

CSS needs to be able to set style rules in reference to the values that were saved in the localMemory of the browser. Like for color settings, or text size settings, or position settings.

_Here is an example to understand why._

CSS rule example for the user-set color preferences.
Similar as we do in the attribute selector rules :
```
html[localMemory( ColorTheme == dark )] { background: black ; }
..or...
html[localMemory( ColorTheme == green )] { background: green ; }
```

OR as we do in the media rules :

```
@localMemory( ColorTheme == dark ) {
      body { background: black ;  }
}
```

Such rules would be able to set the black background for the html tag, if the LocalMemory cell list of ColorTheme had the "dark" entry value in the list.

The read-only access to the localMemory of the browser would make the CSS truly dynamic and responsive to the user input. Users apps would be able allow to set and remember the personal style settings. Positions of the movable page elements would be possible to be remembered, if the user wanted to do so.

The write access changes should be still left to the JavaScript side.


**Good Day fellow travelers !**


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

Received on Thursday, 9 April 2020 09:18:16 UTC