diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html
index f3de11ad0..bf2c52733 100644
--- a/sphinx_rtd_theme/layout.html
+++ b/sphinx_rtd_theme/layout.html
@@ -28,12 +28,13 @@
{%- endif %}
- {%- for css in css_files %}
- {{ css_tag(css) }}
+ {%- for css_file in css_files %}
+ {{ css_tag(css_file) }}
{%- endfor %}
- {%- for cssfile in extra_css_files %}
- {{ css_tag(cssfile) }}
+ {# "extra_css_files" is a theme option and it's always a string #}
+ {%- for css_file in extra_css_files %}
+
{%- endfor -%}
{#- FAVICON