diff --git a/Tests/LibWeb/Layout/expected/css-var-in-calc-block.txt b/Tests/LibWeb/Layout/expected/css-var-in-calc-block.txt
new file mode 100644
index 0000000000..b9395176a4
--- /dev/null
+++ b/Tests/LibWeb/Layout/expected/css-var-in-calc-block.txt
@@ -0,0 +1,4 @@
+Viewport <#document> at (0,0) content-size 800x600 children: not-inline
+ BlockContainer at (1,1) content-size 798x270 [BFC] children: not-inline
+ BlockContainer
at (10,10) content-size 780x252 children: not-inline
+ BlockContainer at (11,11) content-size 250x250 children: not-inline
diff --git a/Tests/LibWeb/Layout/input/css-var-in-calc-block.html b/Tests/LibWeb/Layout/input/css-var-in-calc-block.html
new file mode 100644
index 0000000000..8dec5dcb0f
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/css-var-in-calc-block.html
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
index 0ed1d65533..c794fa2902 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
@@ -836,6 +836,16 @@ bool StyleComputer::expand_variables(DOM::Element& element, Optional
block_values;
+ Parser::TokenStream source_block_contents { source_block.values() };
+ if (!expand_variables(element, pseudo_element, property_name, dependencies, source_block_contents, block_values))
+ return false;
+ NonnullRefPtr block = Parser::Block::create(source_block.token(), move(block_values));
+ dest.empend(block);
+ continue;
+ }
if (!value.is_function()) {
dest.empend(value);
continue;