2 ms·
How does this deal with the ternary of light/dark/high-contrast that a lot of sites are now using? I wish they would just enable features that are already in t
by qingcharles 3y ago
How does this deal with the ternary of light/dark/high-contrast that a lot of sites are now using?
I wish they would just enable features that are already in the browser that they've not put live, like grid-template-rows: masonry. All three major engines have the damned thing in there but it's not in release branch.
- johngalt2600 3y agoif browsers have support for a feature such as masonry, but it is not enabled in css spec does that mean it cannot be used? I recall seeing masonry in a tailwind talk, very neat!
- qingcharles 3y agoWell, most people implement it using JavaScript if you want everything to be in the correct order. I use a pure CSS variant as I'm trying to go near-zero JS on my projects these days, but it means things are out-of-order. Depends on your use case. I also check for CSS support in the browser using the "supports" feature and utilize the native support if it is enabled (e.g. Firefox behind a flag, and Safari behind a switch).
- gwern 3y agoThere's also the light/dark/system (auto) ternary approach, which this seems to encourage the designer to ignore in favor of a binary toggle. It seems to beg the developer to treat the mode as a negation of whatever it currently is, which leads to bad results and time-dependency of setting.
- qingcharles 3y agoExactly. I'm not sure this is totally thought-out. p.s. love your work
- bramus 3y agoMasonry isn’t ready to be shipped as there are still quite a few open spec issues [^1] that need to be resolved first. [^1]: https://github.com/w3c/csswg-drafts/issues?q=is%3Aissue+is%3Aopen+masonry+label%3Acss-grid-3 https://github.com/w3c/csswg-drafts/issues?q=is%3Aissue+is%3...