Skip to content

fix: The headless template included inline CSS #8291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions cms/static/cms/sass/cms.headless.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@import "settings/all";

html.cms-structure-mode-structure section {
margin-inline-end: 436px;
}

.cms-placeholder-view section {
font: normal 18px/24px Helvetica,Arial,sans-serif;
padding: 20px;
}

.cms-placeholder-view h1 {
margin: 0 0 20px;
padding: 0;
padding-bottom: 10px;
font-size: 1.5em;
border-bottom: 1px solid $gray-light;
small {
font-size: 0.5em;
color: $gray;
}
}

.cms-placeholder-view section img {
max-width: 100%;
padding: 3px;
margin: -5px;
border: 1px solid $gray-light;
}
31 changes: 2 additions & 29 deletions cms/templates/cms/headless/placeholder.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
<!DOCTYPE html>{% load cms_tags menu_tags sekizai_tags static i18n %}{% spaceless %}
<!DOCTYPE html>{% load cms_tags cms_static menu_tags sekizai_tags static i18n %}{% spaceless %}
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
<html class="cms-placeholder-view" lang="{{ LANGUAGE_CODE|default:"en-us" }}" dir="{{ LANGUAGE_BIDI|yesno:'rtl,ltr,auto' }}">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<title>{% block title %}{{ request.current_page.get_page_title|striptags }}{% endblock %}</title>
<style>
html.cms-structure-mode-structure section {
margin-inline-end: 436px;
}
.cms-placeholder-view section {
font: normal 18px/24px Helvetica,Arial,sans-serif;
margin: 20px;
padding: 20px;
border: 1px solid #ccc;
}
.cms-placeholder-view h1 {
margin: 0 0 20px;
padding: 0;
padding-bottom: 10px;
font-size: 1.5em;
border-bottom: 1px solid #ccc;
small {
font-size: 0.5em;
color: #999;
}
}
.cms-placeholder-view section img {
max-width: 100%;
padding: 3px;
margin: -5px;
border: 1px solid #ccc;
}
</style>
<link rel="stylesheet" href="{% static_with_version 'cms/css/cms.headless.css' %}"/>
{% endspaceless %}{% render_block 'css' %}{% spaceless %}
{% block page_head %}{% endblock %}
</head>
Expand Down
Loading