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
With the introduction of text-decoration-trim, we also defined that it takes box-decoration-break into account. So box-decoration-break affects whether the text decoration is split or cloned across fragments.
Though box-decoration-break also affects other parts of the box, which may be styled differently regarding fragmentation.
Therefore, I suggest a way to differentiate between the layout-related and content-related parts. I see three solutions to this:
Extend box-decoration-break
Change box-decoration-break so that it allows to distinguish to what it applies, e.g. via new keywords that target layout, background, and contents.
Make box-decoration-break a shorthand
Turn box-decoration-break into a shorthand for different longhands for layout, background, and contents. I.e. you'd have box-decoration-break-layout, box-decoration-break-background, and box-decoration-break-content, which take slice and clone.
With the introduction of
text-decoration-trim, we also defined that it takesbox-decoration-breakinto account. Sobox-decoration-breakaffects whether the text decoration is split or cloned across fragments.Though
box-decoration-breakalso affects other parts of the box, which may be styled differently regarding fragmentation.Therefore, I suggest a way to differentiate between the layout-related and content-related parts. I see three solutions to this:
Extend
box-decoration-breakChange
box-decoration-breakso that it allows to distinguish to what it applies, e.g. via new keywords that target layout, background, and contents.Make
box-decoration-breaka shorthandTurn
box-decoration-breakinto a shorthand for different longhands for layout, background, and contents. I.e. you'd havebox-decoration-break-layout,box-decoration-break-background, andbox-decoration-break-content, which takesliceandclone.Introduce a new property
As suggested in [css-text-decor-4] Allow percentages in
text-decoration-inset#8403 (comment), we might also introduce a completely separate property liketext-decoration-break.See also #8535, which refers to allow targetting only the background (and suggests to go either with option 1 or 2).
Option 2 currently seems to make the most sense to me, as it aligns well with what we already have and is backwards compatible.
Sebastian