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

[css-anchor-position-1] Add CSSOM interfaces #9005

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

xiaochengh
Copy link
Contributor

No description provided.

@xiaochengh
Copy link
Contributor Author

@tabatkins

@tabatkins
Copy link
Member

Are we sure we want this rule to be readonly? The @try rule isn't readonly (you can adjust the style), so it feels a little weird for @position-fallback to be.

If it's not readonly, we can probably just inherit from CSSGroupingRule and add the name attribute.

@xiaochengh
Copy link
Contributor Author

OK, I'll make them mutable (aka I'll make a closer copy of CSSKeyframesRule).

If it's not readonly, we can probably just inherit from CSSGroupingRule and add the name attribute.

I think inheritance from CSSGroupingRule is more appropriate if the child rules can be of any type.

If only one type of child rules are allowed, then it should inherit from CSSRule (again using CSSKeyframesRule as an example).

@tabatkins
Copy link
Member

(aka I'll make a closer copy of CSSKeyframesRule).

Nah CSSKeyframesRule has a weird set of operations. This is why I'm suggested CSSGroupingRule instead.

I think inheritance from CSSGroupingRule is more appropriate if the child rules can be of any type.

If only one type of child rules are allowed, then it should inherit from CSSRule (again using CSSKeyframesRule as an example).

Nothing about CSSGroupingRule suggests it's specifically for multiple child rule types. The "insert a rule" operation checks if the rule type is allowed in that context.

If they'd been created in the opposite order, we've have CSSKeyframesRule inherit from CSSGroupingRule rather than use some weird bespoke operations.

@xiaochengh xiaochengh changed the title [css-anchor-1] Add CSSOM interfaces [css-anchor-position-1] Add CSSOM interfaces Jul 6, 2023
@xiaochengh
Copy link
Contributor Author

Done. Now it's inheritting from CSSGroupingRule.

I guess the only thing remaining is the ASCII art.

@tabatkins tabatkins merged commit a1fa1a5 into w3c:main Jul 6, 2023
1 check was pending
@xiaochengh xiaochengh deleted the anchor-api branch July 6, 2023 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants