Comments (2)
Unregistered custom properties just tokenize, except for a few things like var()
and env()
. So:
- If
first-valid()
is a normal function, it's accepted, as a token. - Otherwise I guess it's invalid.
I don't see any reason to treat it specially, since unregistered custom properties accept almost everything?
I don't think it's likely that people will want --foo: first-supported(var(b), var(--b))
to behave as --foo: var(--b)
because --foo: var(b)
is invalid.
I think it's more likely that people will want to defer the resolution of first-supported
, e.g.
:root {
--color: first-supported(color(brand-new-color-space, ...), cyan);
}
.foo { color: var(--color) }
#bar something { color: var(--color) }
from csswg-drafts.
Unregistered custom properties just tokenize, except for a few things like
var()
andenv()
.
I have not considered this option. So --custom: first-valid(not, whole) value
is valid but not --custom: first-valid(1) var(--empty, var(invalid))
, and a CSS parser should therefore not try matching <whole-value>
as a replacement for a custom property value, but only for standard properties?
Even if first-valid(not, whole) value
is guaranteed to be valid in any declaration value, it would probably not be usefull to make it invalid at parse time also for a custom property value. It just seems more consistent though.
from csswg-drafts.
Related Issues (20)
- [mediaqueries] CSS Media Feature for Color Vision Adjustments
- [css-cascade-6] reusable named scopes HOT 3
- [css-values-5] Should an arbitrary substitution nested within another be accepted in context?
- [css-anchor-position-1] position-try-options interaction with position-visibility
- [css-animation-1] Should non-animatable properties be accepted in keyframe rules?
- [css-ui] Proposal: allow multiple outlines per element HOT 2
- [cssom-view] Change `document.caretPositionFromPoint`'s `shadowRoots` parameter from rest parameter to an array HOT 9
- [cssom-1] A more direct method than `caretPositionFromPoint()` HOT 2
- [css-contain] content-visibility: auto and SVG-as-image HOT 10
- repo name nit: it'd be nice if this were simply w3c/csswg HOT 1
- [css-color-4] Clarify used value of currentColor HOT 3
- [css-syntax] "Consume a declaration" (5.5.6) leaves out a final "else" condition?
- [css-values-5] should 'calc-size(0)' work? HOT 2
- [css-values-5] Consider supporting `calc-size()` in the `inset` property HOT 2
- [selectors][css-transitions-2] `:starting-style` pseudo-class HOT 10
- [css-grid] respect `justify-content: center` even when column width is fluid and has max-width using `auto-fit/fill` HOT 1
- [css-syntax] Concrete criteria for rule / declaration validity when being produced by a [compliant] parser? HOT 4
- [css-color-5] Clarification on `none` components in relative color syntax. HOT 1
- [css-anchor-position] Drawing irregular shapes between two items HOT 1
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.