mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 05:44:59 +00:00
LibHTML: Various little improvements to the CSS parser
The parser now kinda recognizes immediate child selectors, !important, and various other little things. It's still extremely far from robust and/or correct. :^)
This commit is contained in:
parent
48f43a7429
commit
306b9dfb51
4 changed files with 100 additions and 15 deletions
|
@ -11,9 +11,16 @@ public:
|
|||
Invalid,
|
||||
TagName,
|
||||
Id,
|
||||
Class
|
||||
Class,
|
||||
};
|
||||
Type type { Type::Invalid };
|
||||
|
||||
enum class Relation {
|
||||
None,
|
||||
ImmediateChild,
|
||||
};
|
||||
Relation relation { Relation::None };
|
||||
|
||||
String value;
|
||||
};
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
struct StyleProperty {
|
||||
String name;
|
||||
NonnullRefPtr<StyleValue> value;
|
||||
bool important { false };
|
||||
};
|
||||
|
||||
class StyleDeclaration : public RefCounted<StyleDeclaration> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue