Bug 280941

Summary: background: repeating linear gradient does not work with line-height when using line-height units
Product: WebKit Reporter: snake_worthy0a
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Major CC: koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 18   
Hardware: All   
OS: All   

snake_worthy0a
Reported 2024-10-05 14:03:04 PDT
width: 100%; height: 300px; padding: 0; /* there is a default padding */ background: repeating-linear-gradient(#0000 0 calc(1lh - 1px), #000 0 1lh); /* line-height: 1.5; use this to increase the height of the line */ /* background-attachment: local; use this to make background move with text */ something like the above would not adjust if the line-height is increased or decreased. line-height on safari will increase the line height for a given piece of text, but this does not change the repeating linear gradient's height. this was working on the previous iteration of safari in line with chrome and FF, but it seems that the latest iteration (18+) no longer matches background calculations to the line-height if specified. instead there is a singular line-height for the repeating gradient and it doesn’t change with the text area's line-height sizing. also does not work when turning the linear gradient 90 degrees for vertical text. repeating-linear-gradient(90deg, calc(1lh - 0.1vw), calc(1lh - 0.1vw), 1lh) ideally background-attachment: Local should also make the background move with text.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-10-12 14:04:15 PDT
Note You need to log in before you can comment on or make changes to this bug.