- From: ecartz via GitHub <noreply@w3.org>
- Date: Tue, 08 Jul 2025 16:25:47 +0000
- To: public-css-archive@w3.org
I would be opposed to moving it out of the block. Regardless of syntax, whether pseudo-selector or not, it confuses the selector with what defines display. I.e. in `bar>.baz @extends foo>.fiz` it is `bar>.baz` that is the selector that gets matched. This is a bit confusing, since it looks like baz extends foo and the selector is bar>.baz>.fiz. Also, it makes multiple extensions confusing. E.g. for a real example from a Bootstrapped component: ``` .card-body { extends: flex-grow-1; extends: fs-5; extends: fw-semibold; extends: mb-3; } ``` Try that with extends in the selector. There's simply no good way to write it. And (at least to me) Bootstrap is one of the major reasons to want something like this. With Bootstrap, you have to write these kinds of things into the HTML all over the site. CSS would at least allow you to reduce the repetitiveness. And of course, you'd be able to change the display without also changing the HTML. Inside the block is where the display is defined, and this would be part of the display definition. I.e. `.card-body` displays with the characteristics of `flex-grow-1`, `fs-5`, `fw-semibold`, `mb-3`. In general, rather than coming up with a new proposal (like), I think it would be better to support the extends proposal, which is 1. In general use in SASS. 2. Already in existence as a [proposal](https://tabatkins.github.io/specs/css-extend-rule/) for CSS. 3. Already reviewed and discussed. 4. A more natural way of saying this than "like", which is more commonly used in the sense of "I approve" than "resembles" online. I think it's clear that there's nothing in this proposal that isn't also covered by the existing extends proposal. The reverse is not true. The extends proposal is much more mature. I absolutely support the feature that would be offered. I just would rather support it as Tab Atkins' extend rather than like. -- GitHub Notification of comment by ecartz Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10222#issuecomment-3049580126 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 8 July 2025 16:25:48 UTC