diff --git a/src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java b/src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java
index ddb79deb2c8..0d4cc2b4e3c 100644
--- a/src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java
+++ b/src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java
@@ -181,7 +181,6 @@
import org.htmlunit.html.HtmlVariable;
import org.htmlunit.html.HtmlWordBreak;
import org.htmlunit.platform.Platform;
-import org.w3c.dom.Text;
/**
* An object for a CSSStyleDeclaration, which is computed.
@@ -1289,7 +1288,6 @@ private int getEmptyHeight() {
|| element instanceof HtmlDefinition
|| element instanceof HtmlDefinitionDescription
|| element instanceof HtmlDefinitionTerm
- || element instanceof HtmlElement
|| element instanceof HtmlEmphasis
|| element instanceof HtmlFigure
|| element instanceof HtmlFigureCaption
@@ -1322,6 +1320,7 @@ private int getEmptyHeight() {
|| element instanceof HtmlSuperscript
|| element instanceof HtmlTeletype
|| element instanceof HtmlUnderlined
+ || element instanceof HtmlUnknownElement
|| element instanceof HtmlWordBreak
|| element instanceof HtmlMain
|| element instanceof HtmlVariable