diff --git a/tests/roots/test-html_style/_static/default.css b/tests/roots/test-html_style/_static/default.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/roots/test-html_style/conf.py b/tests/roots/test-html_style/conf.py
new file mode 100644
index 000000000..df1b3103c
--- /dev/null
+++ b/tests/roots/test-html_style/conf.py
@@ -0,0 +1,2 @@
+html_style = 'default.css'
+html_static_path = ['_static']
diff --git a/tests/roots/test-html_style/index.rst b/tests/roots/test-html_style/index.rst
new file mode 100644
index 000000000..d8aef481c
--- /dev/null
+++ b/tests/roots/test-html_style/index.rst
@@ -0,0 +1,2 @@
+html_style
+==========
diff --git a/tests/roots/test-root/conf.py b/tests/roots/test-root/conf.py
index a8e317304..36130dae9 100644
--- a/tests/roots/test-root/conf.py
+++ b/tests/roots/test-root/conf.py
@@ -37,7 +37,6 @@ rst_epilog = '.. |subst| replace:: global substitution'
html_sidebars = {'**': ['localtoc.html', 'relations.html', 'sourcelink.html',
'customsb.html', 'searchbox.html'],
'index': ['contentssb.html', 'localtoc.html', 'globaltoc.html']}
-html_style = 'default.css'
html_last_updated_fmt = '%b %d, %Y'
html_context = {'hckey': 'hcval', 'hckey_co': 'wrong_hcval_co'}
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index 70fc2e32b..c600dd7de 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -1252,6 +1252,15 @@ def test_alternate_stylesheets(app, cached_etree_parse, fname, expect):
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
+@pytest.mark.sphinx('html', testroot='html_style')
+def test_html_style(app, status, warning):
+ app.build()
+ result = (app.outdir / 'index.html').text()
+ assert '' in result
+ assert (''
+ not in result)
+
+
@pytest.mark.sphinx('html', testroot='images')
def test_html_remote_images(app, status, warning):
app.builder.build_all()