Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@sheet] Naming / Bikeshedding #939

Open
2 tasks
aluhrs13 opened this issue Jan 22, 2025 · 1 comment
Open
2 tasks

[@sheet] Naming / Bikeshedding #939

aluhrs13 opened this issue Jan 22, 2025 · 1 comment
Assignees
Labels

Comments

@aluhrs13
Copy link
Contributor

  • The name nestedStyleSheets is up for discussion.
  • Should we add name to the StyleSheet interface or overload the existing title attribute instead?
@aluhrs13 aluhrs13 self-assigned this Jan 22, 2025
@kbabbitt
Copy link
Member

Is there a specific author use case for something with the shape of nestedStyleSheets? The reason I ask is that it's incongruous with how other at-rules are represented in the CSSOM. I would expect to see @sheet represented by an interface derived from either CSSRule or perhaps CSSGroupingRule, for example:

// Deriving inspiration from CSSImportRule
interface CSSSheetRule : CSSRule {
    [SameObject] readonly attribute CSSStyleSheet? styleSheet;
    readonly attribute CSSOMString name;
}

Or:

// Deriving inspiration from CSSMediaRule
interface CSSSheetRule : CSSGroupingRule {
    readonly attribute CSSOMString name;
}

Then authors can reach the sheets/rules and manipulate them in the OM using existing methods on CSSStyleSheet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants