Re: [csswg-drafts] [css-cascade] Better name for "custom origins"? (#4981)

> These "custom origins" represent layers of intent, not specifically related to DOM structure

You're right, "scope" implies a different concept.

The way I see it, it would definitely be extending the first layer of the cascade (currently named [Origin and Importance](https://www.w3.org/TR/css-cascade-3/#cascade-origin)), rather than creating a new layer. However, I think "origin" should only be referring to one of "user agent", "user", and "author", while "importance" should be either "important" or "normal". What if, on top of these two concepts, we added the concept of "priority" for stylesheets / declarations (possibly only for the "author" origin, but could be for any origin). So effectively this would be adding entirely new "buckets" in the "Origin and Importance" layer, which should be renamed to "Origin, Importance, and Priority" or something else. It would look something like this (assuming this is for the "author" origin only):

- Transition declarations
- Important user agent declarations
- Important user declarations
- Repeat the following for each value of "priority" used, in descending order:
  - Important author declarations
  - Animation declarations
  - Normal author declarations
- Normal user declarations
- Normal user agent declarations

So, if in a project there are two stylesheets, one with a priority of `0` (the default) and one with a priority of `10`, the buckets would look like this:

- Transition declarations
- Important user agent declarations
- Important user declarations
- Important author declarations of priority 10
- Animation declarations of priority 10
- Normal author declarations of priority 10
- Important author declarations of priority 0
- Animation declarations of priority 0
- Normal author declarations of priority 0
- Normal user declarations
- Normal user agent declarations

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

Received on Thursday, 30 April 2020 17:57:09 UTC