Re: [csswg-drafts] [css-cascade] What is a valid at-rule? Or what is an invalid at-rule? (#9175)

> per the relevant spec defining that at-rule

That is obvious in hindsight :)
I was looking for answers in the `[css-cascade]` specifications and I wasn't reading the relevant documents for each at-rule.

-----------

@cdoublev Does raises an interesting point about `@property`.

https://drafts.css-houdini.org/css-properties-values-api/#at-property-rule

> `@property` rules require a syntax and inherits descriptor; if either are missing, the entire rule is invalid and must be ignored. The initial-value descriptor is optional only if the syntax is the universal syntax definition, otherwise the descriptor is required; if it’s missing, the entire rule is invalid and must be ignored.

This doesn't work :

```css
@property --foo {
 inherits: false;
 initial-value: 0;
}

@import url("./green.css");
```

This does :

```css
@property (--foo) {
 inherits: false;
 initial-value: 0;
}

@import url("./green.css");
```

From the outside this looks as if only the prelude is checked for validity in this specific case.

-------

I think the specifications are clear but maybe there are a few blind spots in WPT and some bugs in implementations?

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9175#issuecomment-1675776230 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 12 August 2023 07:59:27 UTC