Re: [csswg-drafts] [css-mixins] Proposal: `@like` rule for repurposing page default styles (#10222)

This enables circular dependencies unless resolved somehow:
~~~~ css
foo {
  color: green;
  @like bar;
}
bar {
  @like foo;
  background: green;
  color: orange;
}

quuz > baz {
  font-size: 2em;
}
quuz {
  @like baz;
}
~~~~
Is this a problem?

----

Would it be possible to move the referencing statement into the selector?
~~~~ css
bar:extends(foo) {
  background: green;
}
~~~~
I would not object to a syntax like that. (Although the circular dependency consideration applies as well.)

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


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

Received on Tuesday, 2 July 2024 18:15:43 UTC