1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:28:13 +00:00
serenity/Userland
Andreas Kling d965a9552f LibWeb: Start implementing the CSS cascade
The 'C' in "CSS" is for Cascade, so let's actually implement the cascade
in LibWeb. :^)

StyleResolver::resolve_style() now begins by collecting all the matching
CSS rules for the given DOM::Element. Rules are then processed in the
spec's cascade order (instead of in the order we encounter them.)

With this, "!important" is now honored on CSS properties.

After performing the cascade, we do another pass of what the spec calls
"defaulting" where we resolve "inherit" and "initial" values.
I've left a FIXME about supporting correct "initial" values for every
property, since we're currently lacking some coverage there.

Note that this mechanism now resolves every known CSS property. This is
*not* space-efficient and we'll eventually need to come up with some
strategies to reduce memory usage around this. However, this will do
fine until we have more of the engine working correctly. :^)
2021-09-21 12:49:28 +02:00
..
Applets AudioApplet: Refactor window resizing 2021-09-19 21:52:32 +02:00
Applications WidgetGallery+MouseSettings: Use LexicalPath::basename() 2021-09-20 15:59:34 +02:00
Demos WidgetGallery: Crop animated cursors 2021-09-20 15:59:34 +02:00
DevTools HackStudio: Make sure Window is destroyed before Application object 2021-09-18 16:45:50 +02:00
DynamicLoader Meta: Switch to a SuperBuild that splits host and target builds 2021-09-15 19:04:52 +04:30
Games Breakout: Tag fallthrough statement 2021-09-15 14:22:34 +00:00
Libraries LibWeb: Start implementing the CSS cascade 2021-09-21 12:49:28 +02:00
Services WindowServer: Apply screen scaling when getting bitmap around cursor 2021-09-20 22:25:24 +02:00
Shell Shell: Make ArgsParser not exit on failure in builtin_exit() 2021-09-20 03:31:57 +04:30
Utilities Utilities: Fix asctl volume units 2021-09-19 21:52:32 +02:00
CMakeLists.txt Tests: Establish root Tests directory, move Userland/Tests there 2021-05-06 17:54:28 +02:00