Bug 325780

Summary: revert-rule does not roll back to an earlier declaration of a logical or physical counterpart property
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, fantasai.bugs, koivisto, ntim, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 305601    

Anne van Kesteren
Reported 2026-09-30 00:34:04 PDT
When revert-rule is used on a property, the cascade should behave as if that declaration were absent. WebKit only looks back for earlier declarations of the same property. It ignores earlier declarations of the logical or physical counterpart, which fill the same computed value. The property then falls back to its initial value. revert-layer handles this correctly. Same-property cases work, for example padding-left: 5px followed by padding: revert-rule. Impact: The UA stylesheet uses -internal-auto-base(revert-rule, …) so that base appearance rules revert for native controls. selectMultipleAndListBox.css set padding: -internal-auto-base(revert-rule, 0) on list boxes, while html.css sets the iOS menu list padding with padding-inline. So with HTMLEnhancedSelectMultipleAndListBoxEnabled, native <select multiple> and <select size> on iOS lost their inline padding. That was worked around in bug 325465 by using logical longhands, but any UA or author revert-rule that mixes logical and physical forms is affected.
Attachments
Ahmad Saleem
Comment 1 2026-09-30 01:45:37 PDT
Radar WebKit Bug Importer
Comment 2 2026-10-07 00:34:13 PDT
Note You need to log in before you can comment on or make changes to this bug.