mirror of
https://github.com/RGBCube/serenity
synced 2025-05-17 18:25:07 +00:00

The styling of elements using the `use_pseudo_element()` was only applied on layout. When an element style was recomputed later that styling was not overruled with the pseudo element selector styles. This moves the styling override from `TreeBuilder.cpp` to `StyleComputer.cpp`. Now the styles are always correctly applied. I also removed the method `property_id_by_index()` because it was not needed anymore. Als some calls to `invalidate_layout()` in the Meter, Progress and Select elements where not needed anymore because the style values are update on the changing of the style attribute. This fixes issue #22278.
9 lines
181 B
HTML
9 lines
181 B
HTML
<style>
|
|
* {
|
|
font: 20px 'SerenitySans';
|
|
}
|
|
</style>
|
|
<progress id="a"></progress>
|
|
<script>
|
|
a.style.backgroundColor = 'red'; // Trigger style invalidation
|
|
</script>
|