Skip to content

Commit 17c91b4

Browse files
authored
fix: The headless template included inline CSS (#8291)
1 parent e043702 commit 17c91b4

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

cms/static/cms/sass/cms.headless.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@import "settings/all";
2+
3+
html.cms-structure-mode-structure section {
4+
margin-inline-end: 436px;
5+
}
6+
7+
.cms-placeholder-view section {
8+
font: normal 18px/24px Helvetica,Arial,sans-serif;
9+
padding: 20px;
10+
}
11+
12+
.cms-placeholder-view h1 {
13+
margin: 0 0 20px;
14+
padding: 0;
15+
padding-bottom: 10px;
16+
font-size: 1.5em;
17+
border-bottom: 1px solid $gray-light;
18+
small {
19+
font-size: 0.5em;
20+
color: $gray;
21+
}
22+
}
23+
24+
.cms-placeholder-view section img {
25+
max-width: 100%;
26+
padding: 3px;
27+
margin: -5px;
28+
border: 1px solid $gray-light;
29+
}

cms/templates/cms/headless/placeholder.html

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,11 @@
1-
<!DOCTYPE html>{% load cms_tags menu_tags sekizai_tags static i18n %}{% spaceless %}
1+
<!DOCTYPE html>{% load cms_tags cms_static menu_tags sekizai_tags static i18n %}{% spaceless %}
22
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
33
<html class="cms-placeholder-view" lang="{{ LANGUAGE_CODE|default:"en-us" }}" dir="{{ LANGUAGE_BIDI|yesno:'rtl,ltr,auto' }}">
44
<head>
55
<meta charset="utf-8"/>
66
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
77
<title>{% block title %}{{ request.current_page.get_page_title|striptags }}{% endblock %}</title>
8-
<style>
9-
html.cms-structure-mode-structure section {
10-
margin-inline-end: 436px;
11-
}
12-
.cms-placeholder-view section {
13-
font: normal 18px/24px Helvetica,Arial,sans-serif;
14-
margin: 20px;
15-
padding: 20px;
16-
border: 1px solid #ccc;
17-
}
18-
.cms-placeholder-view h1 {
19-
margin: 0 0 20px;
20-
padding: 0;
21-
padding-bottom: 10px;
22-
font-size: 1.5em;
23-
border-bottom: 1px solid #ccc;
24-
small {
25-
font-size: 0.5em;
26-
color: #999;
27-
}
28-
}
29-
.cms-placeholder-view section img {
30-
max-width: 100%;
31-
padding: 3px;
32-
margin: -5px;
33-
border: 1px solid #ccc;
34-
}
35-
</style>
8+
<link rel="stylesheet" href="{% static_with_version 'cms/css/cms.headless.css' %}"/>
369
{% endspaceless %}{% render_block 'css' %}{% spaceless %}
3710
{% block page_head %}{% endblock %}
3811
</head>

0 commit comments

Comments
 (0)