Bug 258258

Summary: Update `:empty` pseudo-class to also match elements with only whitespace
Product: WebKit Reporter: Niklas Ljunglöf <slipped-gazette.0w>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ntim, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: All   

Description Niklas Ljunglöf 2023-06-17 18:29:52 PDT
According to Selectors Level 4 (https://www.w3.org/TR/selectors-4/#the-empty-pseudo), the `:empty` pseudo-class should match whitespace-only elements. Currently it only matches elements with no child elements or content nodes.
Comment 1 Tim Nguyen (:ntim) 2023-06-17 19:09:01 PDT
See also: https://github.com/w3c/csswg-drafts/issues/8106
Comment 2 Radar WebKit Bug Importer 2023-06-24 18:30:16 PDT
<rdar://problem/111273263>