You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's figure out what the right UA stylesheet rules should be for ::interest-button. From this comment (and tweaked according to that conversation), here's a proposal:
Since the layout tree issue was resolved to make ::interest-button a trailing sibling layout box, I believe the UA stylesheet in the OP here makes sense. It roughly:
If we're doing it an opt-in I still don't see the point of doing the trailing-sibling thing? Authors can very easily keep it in flow with margin-inline-end or so...
11. If we're doing it an opt-in I still don't see the point of doing the trailing-sibling thing? Authors can very easily keep it in flow with margin-inline-end or so...
How? I.e. how would you make a <button> where the ::interest-button is outside the button, and still in-flow? (And not overlapping other content?) Also, we already resolved this so I'd like to avoid re-opening that question if we can.
12. And a trailing pseudo is super confusing if you're using anything but inline/block layout
It's a bit different, but I would argue it's not super confusing. Or at least, after playing with it, and understanding roughly "it's a sibling", it's pretty clear how to deal with it. It just works in the common case, and for the other cases (e.g. flex) you just add <div>.
/* What the author would write */--width-of-the-thing:43.72px; /* width of "HELLO" */--borderwidth:5px;
--padding:5px;
border-width:var(--borderwidth);
padding:var(--padding);
margin-inline-end:var(--width-of-the-thing);
&::after {
content:'HELLO'/'';
margin-inline-start:calc(-var(--width-of-the-thing));
position: relative;
left:calc(var(--width-of-the-thing) +var(--borderwidth) +var(--padding)); /* pseudo width + padding end + border */
}
Your version hard-coded the width of "ⓘ" as 24px, and hard-coded the border and padding. Accounting for the width of the content is a pain for developers, right? The sibling approach means the author CSS can just be this:
/* What the author would write */&::interest-button {
content:'HELLO'/'';
}
and the result looks the same as the huge CSS chunk above.
Activity
mfreed7 commentedon Oct 1, 2026
Since the layout tree issue was resolved to make
::interest-buttona trailing sibling layout box, I believe the UA stylesheet in the OP here makes sense. It roughly:cursor: helpto help indicate what it does, anduser-select:noneto avoid selecting itSuggestions appreciated for improvements. Otherwise, my proposed resolution is:
sb3nder commentedon Oct 8, 2026
mfreed7 commentedon Oct 15, 2026
I've added the proposed async resolution label, and I'd like to propose the resolution in the comment above.
emilio commentedon Oct 15, 2026
If we're doing it an opt-in I still don't see the point of doing the trailing-sibling thing? Authors can very easily keep it in flow with margin-inline-end or so...
emilio commentedon Oct 15, 2026
And a trailing pseudo is super confusing if you're using anything but inline/block layout
mfreed7 commentedon Oct 15, 2026
How? I.e. how would you make a
<button>where the::interest-buttonis outside the button, and still in-flow? (And not overlapping other content?) Also, we already resolved this so I'd like to avoid re-opening that question if we can.It's a bit different, but I would argue it's not super confusing. Or at least, after playing with it, and understanding roughly "it's a sibling", it's pretty clear how to deal with it. It just works in the common case, and for the other cases (e.g. flex) you just add
<div>.emilio commentedon Oct 16, 2026
Something like this:
mfreed7 commentedon Oct 16, 2026
Well, yeah something like that can work, and we discussed that on the other issue. See this discussion, and in particular the comments from @fantasai. The issue with it is that the actual code would need to be this, right?
Your version hard-coded the width of "ⓘ" as 24px, and hard-coded the border and padding. Accounting for the width of the content is a pain for developers, right? The sibling approach means the author CSS can just be this:
and the result looks the same as the huge CSS chunk above.