Re: [csswg-drafts] [css-cascade-5] Allow authors to explicitly place unlayered styles in the cascade layer order (#6323)

Let me describe a case I am dealing with where reset CSS on an external web site platform is preventing me form using CSS Layers with a native web component, non-shadow DOM, architecture.

I manage a service that enables developers to construct promotional landing pages for thousands of online shops. These pages, compiled into HTML, CSS, and JS, are then distributed to various online eCommerce platforms. Each of these sites has its own resets, UI library frameworks, styles, etc. Altogether, these are generally unlayered styles.

Providing the capacity to determine the order of these unlayered styles would make CSS Layers a viable option for developers who lack control over external factors.

It was surprised to learn that unlayered styles have a greater specificity than CSS Layers. CSS Layers are intentionally set by the developer and legacy or external styles might be beyond the developers ability to control. From my perspective, if something is defined intentionally it should receive priority.

I acknowledge the likelihood of changing the specific implementation between CSS Layers and unlayered styles is low at this stage. However, adding the capability to specify the order of unlayered styles, as purposed by @mirisuzanne, doesn't appear to be detrimental to the existing implementation. If the order isn't specified, the current behavior is maintained.



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


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

Received on Thursday, 16 May 2024 15:55:10 UTC