Comments (3)
@custom-*
can be the common primitive :)
A benefit of a dedicated at-rule is that things can be different without causing conflicts.
from csswg-drafts.
For @media
this same feature is currently specified as @custom-media
: https://drafts.csswg.org/mediaqueries-5/#custom-mq
@custom-media --modern (color), (hover);
@media (--modern) and (width > 1024px) {
.a { color: green; }
}
This separates declaring a scope and using a scope.
from csswg-drafts.
@romainmenke good point, I wonder if there should be a common primitive for "defining" things.
Example syntax (bikesheddable):
@define(scope) --foo (.start) to (.end);
@define(media) --modern (color), (hover);
from csswg-drafts.
Related Issues (20)
- [css-break] Fragmented out-of-flow contained by box with cloned borders
- [css-anchor-position] [css-transforms] Unclear whether transforms should impact anchor positioning HOT 1
- [css-mixins] `<combinator>` is already defined in Selectors HOT 2
- [css-mixins] `<dashed-function>` syntax seems invalid HOT 2
- [css-mixins] Disallow whitespace when matching `'<' transform-list '>'` HOT 2
- [css-mixins] Should `result` be mandatory in `@function`? HOT 1
- [css-filter-effects-1] Missing definition of a reference for percentage values if filterUnits="userSpaceOnUse" HOT 3
- [css-fonts] Font fallback for (Unicode) decomposable characters is browser-dependent HOT 1
- [selectors] Parameterized selectors HOT 16
- [css-view-transitions-2] (feature) access view-transition snapshot as an image/ImageData HOT 9
- [scroll-animations] Allow smooth animation from lvh to svh HOT 1
- [web-animations] how to make animate() method work with CSSKeyframesRule object? HOT 4
- [css-color-5]: Relative Colors doesn’t work with `calc(l + 10%)` HOT 1
- [css-color-5]: light-dark() doesn’t work with Relative Colors HOT 2
- Two "variants" of `color-mix()` ?? HOT 4
- [css-animations-2][web-animations-2] (proposal) Add pointer driven animations
- [css-values-5] Should `interpolate-size` be a new value to animation/transition-behavior? HOT 8
- CSS Color; light-dark() should be applicable on more properties. HOT 12
- [css-color-4] Evaluate static gamut mapping algorithms for oklab/oklch spaces HOT 4
- [css-easing-2] Linear easing function requires at least two points? HOT 3
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 csswg-drafts.