mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 12:49:08 +00:00
LibWeb: Inherit CSS variables across shadow boundaries
This fixes a bunch of issues on https://wpt.fyi/
This commit is contained in:
committed by
Andreas Kling
parent
cf6929fef3
commit
de2b9eebe6
@@ -7651,7 +7651,7 @@ static RefPtr<StyleValue const> get_custom_property(DOM::Element const& element,
|
||||
return it->value.value;
|
||||
}
|
||||
|
||||
for (auto const* current_element = &element; current_element; current_element = current_element->parent_element()) {
|
||||
for (auto const* current_element = &element; current_element; current_element = current_element->parent_or_shadow_host_element()) {
|
||||
if (auto it = current_element->custom_properties({}).find(custom_property_name); it != current_element->custom_properties({}).end())
|
||||
return it->value.value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user