diff --git a/Tests/LibWeb/Layout/expected/css-import-rule.txt b/Tests/LibWeb/Layout/expected/css-import-rule.txt new file mode 100644 index 00000000000..075781c7b75 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/css-import-rule.txt @@ -0,0 +1,7 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x70.589843 children: not-inline + BlockContainer
at (8,8) content-size 784x54.589843 children: inline + line 0 width: 137.646484, height: 54.589843, bottom: 54.589843, baseline: 42.285156 + frag 0 from TextNode start: 0, length: 5, rect: [8,8 137.646484x54.589843] + "Crazy" + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/css-import-rule-sheet-1.css b/Tests/LibWeb/Layout/input/css-import-rule-sheet-1.css new file mode 100644 index 00000000000..fd22bf27a4a --- /dev/null +++ b/Tests/LibWeb/Layout/input/css-import-rule-sheet-1.css @@ -0,0 +1,5 @@ +@import "css-import-rule-sheet-2.css"; + +body { + background: green; +} diff --git a/Tests/LibWeb/Layout/input/css-import-rule-sheet-2.css b/Tests/LibWeb/Layout/input/css-import-rule-sheet-2.css new file mode 100644 index 00000000000..636a7e34e42 --- /dev/null +++ b/Tests/LibWeb/Layout/input/css-import-rule-sheet-2.css @@ -0,0 +1,3 @@ +body { + font-size: 50px; +} diff --git a/Tests/LibWeb/Layout/input/css-import-rule.html b/Tests/LibWeb/Layout/input/css-import-rule.html new file mode 100644 index 00000000000..75a86737e7e --- /dev/null +++ b/Tests/LibWeb/Layout/input/css-import-rule.html @@ -0,0 +1,7 @@ + +Crazy diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index 809fb427951..751cf0d73c0 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -19,6 +19,7 @@ #include