- From: Mayank via GitHub <sysbot+gh@w3.org>
- Date: Wed, 19 Feb 2025 22:36:13 +0000
- To: public-css-archive@w3.org
mayank99 has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-cascade] A way to layer styles before or with presentational hints ==
_This idea was originally posted in https://github.com/w3c/csswg-drafts/issues/10094#issuecomment-2179369415 and later moved into its own issue._
There is currently no designated place for "lowest-priority author styles". #10094 suggests an "always first" layer, however any such layer still wins over styles from inner context (i.e. shadow DOM).
What if there was a way to add styles either _to_ the presentational-hints layer, or even _before_ it?
Example syntax using a hypothetical (_very_ bikesheddable) `@first-context` at-rule.
```html
<head>
<style>
@first-context {
* { margin: 0; } /* lowest priority */
}
</style>
</head>
<my-component>
<template shadowrootmode="open">
<style>
/* This still takes priority over styles in first-context */
:host { margin: 1rem }
</style>
<slot></slot>
</template>
</my-component>
```
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11751 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 19 February 2025 22:36:14 UTC