Skip to content

Commit 1cdf514

Browse files
committed
Possibility to use normal heading options for main layouts
1 parent 5e01767 commit 1cdf514

File tree

8 files changed

+132
-100
lines changed

8 files changed

+132
-100
lines changed

contao/templates/theme-manager-config.html5

Lines changed: 61 additions & 55 deletions
Large diffs are not rendered by default.

public/backend/css/ctmcore.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/backend/css/ctmcore.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $select-type-wdth: 54px; // Select option width - Also for wizards
5050

5151
form#tl_thememanager {
5252

53-
.widget label {
53+
.widget > label {
5454
//font-size: 14px;
5555
text-overflow: ellipsis;
5656
white-space: nowrap;
@@ -291,6 +291,17 @@ form#tl_thememanager {
291291
}
292292
}
293293

294+
.heading-field {
295+
296+
[data-read-only=true] {
297+
color: var(--form-text-disabled, #bbb);
298+
background-color: var(--form-bg-disabled, #f9f9f9);
299+
border-color: var(--form-border-disabled, #c8c8c8);
300+
cursor: not-allowed;
301+
outline: none;
302+
}
303+
}
304+
294305
// Widgets
295306
.clr { width: calc(100% - #{$field-gap}); }
296307
.widget { margin: 0 #{math.div($field-gap, 2)}; }

public/framework/scss/_config.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ $h6-letter-spacing: 0rem !default;
113113
$h6-transform: none !default;
114114

115115
// Content headings
116+
$disable-content-heading: false !default;
116117
$h1-content-font-size-small: 1.5rem !default;
117118
$h1-content-font-size-medium: 1.86rem !default;
118119
$h1-content-font-size: 2.4rem !default;

public/framework/scss/ctm_base/_typography.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ strong {
5252
5:(line-height:$h5-content-line-height,font-weight:$h5-content-font-weight,letter-spacing:$h5-content-letter-spacing,text-transform:$h5-content-transform),
5353
6:(line-height:$h6-content-line-height,font-weight:$h6-content-font-weight,letter-spacing:$h6-content-letter-spacing,text-transform:$h6-content-transform)
5454
)
55-
));
55+
), $disable-content-heading);

public/framework/scss/ctm_base/_vars.scss

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@
9393
--h5-clr:#{$h5-color};
9494
--h6-clr:#{$h6-color};
9595

96-
--h1-c-clr:#{$h1-content-color};
97-
--h2-c-clr:#{$h2-content-color};
98-
--h3-c-clr:#{$h3-content-color};
99-
--h4-c-clr:#{$h4-content-color};
100-
--h5-c-clr:#{$h5-content-color};
101-
--h6-c-clr:#{$h6-content-color};
96+
@if ($disable-content-heading != 1) {
97+
--h1-c-clr: #{$h1-content-color};
98+
--h2-c-clr: #{$h2-content-color};
99+
--h3-c-clr: #{$h3-content-color};
100+
--h4-c-clr: #{$h4-content-color};
101+
--h5-c-clr: #{$h5-content-color};
102+
--h6-c-clr: #{$h6-content-color};
103+
}
102104

103105
--h1-fs:#{$h1-font-size-small};
104106
--h2-fs:#{$h2-font-size-small};
@@ -107,12 +109,14 @@
107109
--h5-fs:#{$h5-font-size-small};
108110
--h6-fs:#{$h6-font-size-small};
109111

110-
--h1-c-fs:#{$h1-content-font-size-small};
111-
--h2-c-fs:#{$h2-content-font-size-small};
112-
--h3-c-fs:#{$h3-content-font-size-small};
113-
--h4-c-fs:#{$h4-content-font-size-small};
114-
--h5-c-fs:#{$h5-content-font-size-small};
115-
--h6-c-fs:#{$h6-content-font-size-small};
112+
@if ($disable-content-heading != 1) {
113+
--h1-c-fs: #{$h1-content-font-size-small};
114+
--h2-c-fs: #{$h2-content-font-size-small};
115+
--h3-c-fs: #{$h3-content-font-size-small};
116+
--h4-c-fs: #{$h4-content-font-size-small};
117+
--h5-c-fs: #{$h5-content-font-size-small};
118+
--h6-c-fs: #{$h6-content-font-size-small};
119+
}
116120

117121
// Headline spacings
118122
--hl-mb-1:#{$headline-spacing-small};
@@ -188,12 +192,14 @@
188192
--h5-fs:#{$h5-font-size-medium};
189193
--h6-fs:#{$h6-font-size-medium};
190194

191-
--h1-c-fs:#{$h1-content-font-size-medium};
192-
--h2-c-fs:#{$h2-content-font-size-medium};
193-
--h3-c-fs:#{$h3-content-font-size-medium};
194-
--h4-c-fs:#{$h4-content-font-size-medium};
195-
--h5-c-fs:#{$h5-content-font-size-medium};
196-
--h6-c-fs:#{$h6-content-font-size-medium};
195+
@if ($disable-content-heading != 1) {
196+
--h1-c-fs: #{$h1-content-font-size-medium};
197+
--h2-c-fs: #{$h2-content-font-size-medium};
198+
--h3-c-fs: #{$h3-content-font-size-medium};
199+
--h4-c-fs: #{$h4-content-font-size-medium};
200+
--h5-c-fs: #{$h5-content-font-size-medium};
201+
--h6-c-fs: #{$h6-content-font-size-medium};
202+
}
197203
}
198204
}
199205

@@ -207,12 +213,14 @@
207213
--h5-fs:#{$h5-font-size};
208214
--h6-fs:#{$h6-font-size};
209215

210-
--h1-c-fs:#{$h1-content-font-size};
211-
--h2-c-fs:#{$h2-content-font-size};
212-
--h3-c-fs:#{$h3-content-font-size};
213-
--h4-c-fs:#{$h4-content-font-size};
214-
--h5-c-fs:#{$h5-content-font-size};
215-
--h6-c-fs:#{$h6-content-font-size};
216+
@if ($disable-content-heading != 1) {
217+
--h1-c-fs: #{$h1-content-font-size};
218+
--h2-c-fs: #{$h2-content-font-size};
219+
--h3-c-fs: #{$h3-content-font-size};
220+
--h4-c-fs: #{$h4-content-font-size};
221+
--h5-c-fs: #{$h5-content-font-size};
222+
--h6-c-fs: #{$h6-content-font-size};
223+
}
216224
}
217225
}
218226

public/framework/scss/ctm_overrides/_text-color.scss

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
--h5-clr:#{$h5-color};
1414
--h6-clr:#{$h6-color};
1515

16-
--h1-c-clr:#{$h1-content-color};
17-
--h2-c-clr:#{$h2-content-color};
18-
--h3-c-clr:#{$h3-content-color};
19-
--h4-c-clr:#{$h4-content-color};
20-
--h5-c-clr:#{$h5-content-color};
21-
--h6-c-clr:#{$h6-content-color};
16+
@if ($disable-content-heading != 1) {
17+
--h1-c-clr: #{$h1-content-color};
18+
--h2-c-clr: #{$h2-content-color};
19+
--h3-c-clr: #{$h3-content-color};
20+
--h4-c-clr: #{$h4-content-color};
21+
--h5-c-clr: #{$h5-content-color};
22+
--h6-c-clr: #{$h6-content-color};
23+
}
2224

2325
--a-clr:#{$link-color-regular};
2426
--a-clr-hvr:#{$link-hover-color-regular};
@@ -65,12 +67,14 @@
6567
--h5-clr:#{$h5-color-invert};
6668
--h6-clr:#{$h6-color-invert};
6769

68-
--h1-c-clr:#{$h1-content-color-invert};
69-
--h2-c-clr:#{$h2-content-color-invert};
70-
--h3-c-clr:#{$h3-content-color-invert};
71-
--h4-c-clr:#{$h4-content-color-invert};
72-
--h5-c-clr:#{$h5-content-color-invert};
73-
--h6-c-clr:#{$h6-content-color-invert};
70+
@if ($disable-content-heading != 1) {
71+
--h1-c-clr: #{$h1-content-color-invert};
72+
--h2-c-clr: #{$h2-content-color-invert};
73+
--h3-c-clr: #{$h3-content-color-invert};
74+
--h4-c-clr: #{$h4-content-color-invert};
75+
--h5-c-clr: #{$h5-content-color-invert};
76+
--h6-c-clr: #{$h6-content-color-invert};
77+
}
7478

7579
--a-clr:#{$link-color-invert};
7680
--a-clr-hvr:#{$link-hover-color-invert};

public/framework/scss/ctm_utils/_mixins/_typography.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,21 @@
2929
}
3030
}
3131

32-
@mixin heading-typography($list) {
32+
@mixin heading-typography($list, $disable-content-heading) {
3333
@each $k, $v in get-heading-classlist(false) {
3434
#{$v} {
3535
color: var(--h#{$k}-clr);
3636
font-size: var(--h#{$k}-fs);
3737
@each $class, $style in map-get(map-get($list, normal), $k) {
3838
#{$class}: $style;
3939
}
40-
#main & {
41-
color: var(--h#{$k}-c-clr);
42-
font-size: var(--h#{$k}-c-fs);
43-
@each $class, $style in map-get(map-get($list, content), $k) {
44-
#{$class}: $style;
40+
@if ($disable-content-heading != 1) {
41+
#main & {
42+
color: var(--h#{$k}-c-clr);
43+
font-size: var(--h#{$k}-c-fs);
44+
@each $class, $style in map-get(map-get($list, content), $k) {
45+
#{$class}: $style;
46+
}
4547
}
4648
}
4749
}

0 commit comments

Comments
 (0)