Comments (5)
I’m not sure if it’s something that must be added by default. I did some quick test and found that this @media
only works with bare HTML page without styling. Adding background
and color
to :root
selector forces given colors regardless of user theme. So this @media
rule will fix something for unstyled pages only, which doesn’t looks real production page. Or maybe you can provide some good examples when this snippet actually provides a good styling by default?
Also, I believe that a proper dark theme or default font face is something that should be provided by developer, not a default. And Emmet allow developers to customize snippets
from emmet.
Or maybe you can provide some good examples when this snippet actually provides a good styling by default?
Think my jsfiddle is sufficient.
when you use color-scheme: dark then you will style the calendar widget that you can't solve with any other css selector
and this is what it would look without it:
so it's more than just default background/text color that gets applied.
And there is many styled/production ready websites that still uses native form inputs for instance.
radio boxes can still go unstyled. you get the more system OS looks and feel to them
from emmet.
IMO on second screenshot it matches better the default page UI. I’m not convinced such CSS should be default for simple HTML skeleton.
from emmet.
i haven't tried to style the page at all.
from emmet.
ok, turned out that you can set a meta tag as well.
<meta name="color-scheme" content="dark light">
this is actually better.
a full demo of all element is here: https://color-scheme-demo.glitch.me/
and a blog about it: https://web.dev/color-scheme/ explaining why it's a good choice to have it
from emmet.
Related Issues (20)
- Why is there is "display: compact" ?
- Add d:c - > display: contents
- [VSCode] Emmet ignores snippet's double hyphen
- Support for Textmate2
- Action to jump to end of closing tag
- CSS Logical Properties Support HOT 10
- attributeQuotes - option for none or curly brackets HOT 6
- Add support for <data> tags HOT 2
- Error: Cannot find module scanner.cjs HOT 2
- Add abbreviations for data, meter and time + remove abbreviation for datagrid
- Dot leads to create none existing attribute
- Support for other JSX frameworks please HOT 7
- Attribute in parentheses such as div[(test)] doesn't expand properly
- Mydaily
- Remove cols="30" rows="10" from textarea Snippet HOT 5
- Doesn't work eclipse emmet installation
- Remove abbreviations for isindex, applet, keygen
- Add abbreviation for slot HOT 3
- link:favicon shortcut produces non-standard code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emmet.