Comments (9)
This was briefly discussed at some point. If I remember correctly, the behavior we intended was that "invalid" in most cases here means "does not lead to a property registration". But I can not find the discussion now. :(
from css-houdini-drafts.
Also noticed by @romainmenke in w3c/csswg-drafts#9175 because an "invalid" @property
still makes a following @import
invalid.
Basically, it seems that people do not want a rule to be removed because its block contents is "invalid", right?
from css-houdini-drafts.
I don't recall having that discussion either (but that doesn't mean it didn't occur - my memory is notoriously faulty). Happy to either fix the spec to match impls or leave it and let impls get fixed, tho. I don't think I care too much how it goes, but making the actual rule invalid in simple grammatical failures like this is the more common behavior, and is what is generally meant by "X is invalid" across our specs.
Per blame, this text does come directly from @andruud (a5cd596) and was early in their spec-writing career, so it was likely just some loose wording.
from css-houdini-drafts.
was early in their spec-writing career
Yeah, maybe I was just confused at the time.
"rule is invalid" only has one meaning in my book, which is that the whole rule should be dropped
OK, then let's change WPTs to reflect that and I'll adjust our implementation.
from css-houdini-drafts.
Hi people, I uploaded a patch to align Firefox's behavior with the spec and the WPTs are adjusted accordingly there. I also opened web-platform-tests/interop#575
It's possible that we also want to follow what @emilio mentioned and align the spec with @counter-style
and @font-face
, but I'm not sure what was the conclusion here.
from css-houdini-drafts.
One thing I forgot to mention is about the interpretation of invalid inherits
values. It seems they should be dropped, so the descriptor would be missing and the full @property
rule becomes invalid (similar to what the spec describes for the syntax
descriptor). But the spec is not explicit about that and existing tests assume it would take value false
.
from css-houdini-drafts.
align the spec with
@counter-style
and@font-face
, but I'm not sure what was the conclusion here
It does not seem usefull to preserve the rule in the CSSOM if it is invalid and cannot become later valid, since its attributes are read-only, as I noted it in w3c/csswg-drafts#9417.
But if later people ask for updating these attributes via CSSOM, I think there would be a compat issue.
But the spec is not explicit about that and existing tests assume it would take value false.
And people seem to want true
as the initial value (cf. #994), which would have to be defined in the descriptor definition table. Currently, it is n/a (see prose)
.
I think descriptors declarations with invalid value must be ignored would be better defined in CSS Syntax, and any explicit mention of this parsing rule in other specs should be removed.
from css-houdini-drafts.
FYI, I've filed web-platform-tests/interop#587 about the test changes affecting Interop 2023. We have no CI enforcement that Interop 2023 tests aren't changed, but we do review any changes. Filing test change proposals before the changes are made is appreciated.
from css-houdini-drafts.
As per the above, it was discussed on another interop issue. Let's change this since implementations should start matching the spec shortly.
from css-houdini-drafts.
Related Issues (20)
- [css-typed-om] "Add two types" algorithm seems overly complicated? HOT 2
- [css-properties-values-api] JS API should use CSSOMString
- [css-typed-om] structuredClone for typed-om objects
- [css-properties-values-api] Add <string> as a supported syntax name HOT 3
- [css-properties-values-api] Clarify whether lengths using viewport units are "computationally independent"
- [css-typed-om] Add missing font units to CSSNumericFactory HOT 1
- [css-properties-values-api] Providing a way for @property to be opinionated about its usage
- [css-properties-values-api] Make `initial-value` descriptor optional
- [css-properties-values-api] `<transform-function>` interpolation between different function types
- [css-properties-values-api] Clarify parsing of duplicate descriptor declarations
- [css-properties-values-api-1] Multiple custom `@property` with the same name
- [css-properties-values-api-1] `CSSPropertyRule.initialValue` should not be nullable HOT 1
- [css-typed-om-1] Combining a number and the division of two dimensions of the same type HOT 2
- [scroll-customization-api] is there still interest/ongoing discussions for scroll customization? HOT 5
- [css-properties-values-api] `initial-value` for `*` with arbitrary substitution values HOT 1
- [css-typed-om-1] Broken references in CSS Typed OM Level 1 HOT 1
- [css-animation-worklet-1] how to enable CSS.animationWorklet
- [css-typed-om-1] Republish WD HOT 4
- [css-typed-om-1] `currentColor` is not the only non-absolute color 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 css-houdini-drafts.