diff --git a/layout/html/document/src/html.css b/layout/html/document/src/html.css
index af73911b736b..d20a0005c1ad 100644
--- a/layout/html/document/src/html.css
+++ b/layout/html/document/src/html.css
@@ -307,10 +307,10 @@ li {
}
/* nested lists have no top/bottom margins */
-ul ul, ul ol, ul dir, ul menu, ul dl
-ol ul, ol ol, ol dir, ol menu, ol dl
-dir ul, dir ol, dir dir, dir menu, dir dl
-menu ul, menu ol, menu dir, menu menu, menu dl
+ul ul, ul ol, ul dir, ul menu, ul dl,
+ol ul, ol ol, ol dir, ol menu, ol dl,
+dir ul, dir ol, dir dir, dir menu, dir dl,
+menu ul, menu ol, menu dir, menu menu, menu dl,
dl ul, dl ol, dl dir, dl menu, dl dl {
margin-top: 0;
margin-bottom: 0;
diff --git a/layout/style/html.css b/layout/style/html.css
index af73911b736b..d20a0005c1ad 100644
--- a/layout/style/html.css
+++ b/layout/style/html.css
@@ -307,10 +307,10 @@ li {
}
/* nested lists have no top/bottom margins */
-ul ul, ul ol, ul dir, ul menu, ul dl
-ol ul, ol ol, ol dir, ol menu, ol dl
-dir ul, dir ol, dir dir, dir menu, dir dl
-menu ul, menu ol, menu dir, menu menu, menu dl
+ul ul, ul ol, ul dir, ul menu, ul dl,
+ol ul, ol ol, ol dir, ol menu, ol dl,
+dir ul, dir ol, dir dir, dir menu, dir dl,
+menu ul, menu ol, menu dir, menu menu, menu dl,
dl ul, dl ol, dl dir, dl menu, dl dl {
margin-top: 0;
margin-bottom: 0;