Skip to content

Commit ddd8fca

Browse files
committed
Rationalise intro styles and ensure intro has its own custom font-size
1 parent bd34ee2 commit ddd8fca

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{% load wagtailcore_tags %}
2-
<div class="grid__intro streamfield__intro heading heading--four rich-text">
2+
<div class="grid__intro streamfield__intro rich-text">
33
{{ value|richtext }}
44
</div>

tbx/project_styleguide/templates/patterns/pages/service/service_page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
</div>
99

1010
{% if page.intro %}
11-
<div class="grid__intro streamfield__intro">
12-
<div class="heading heading--four">{{page.intro|richtext}}</div>
11+
<div class="grid__intro streamfield__intro rich-text">
12+
{{ page.intro|richtext }}
1313
</div>
1414
{% endif %}
1515

tbx/project_styleguide/templates/patterns/pages/team/team_detail.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
</div>
2222

2323
{% if page.intro %}
24-
<div class="grid__intro streamfield__intro">
25-
<div class="heading heading--four">{{page.intro|richtext}}</div>
24+
<div class="grid__intro streamfield__intro rich-text">
25+
{{ page.intro|richtext }}
2626
</div>
2727
{% endif %}
2828

tbx/project_styleguide/templates/patterns/pages/work/work_page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{% block intro %}
55
{% if page.intro %}
6-
<div class="streamfield__intro heading heading--four">
6+
<div class="streamfield__intro rich-text">
77
{{ page.intro|richtext }}
88
</div>
99
{% endif %}

tbx/static_src/sass/components/_streamfield.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
&:last-child {
1313
margin-bottom: 0;
1414
}
15+
}
1516

16-
.template-standard-page &,
17-
.template-blog-page & {
18-
font-weight: $weight--medium;
19-
}
17+
// override the rich-text font-size
18+
&.rich-text {
19+
@include font-size(intro);
2020
}
2121
}
2222

@@ -71,10 +71,12 @@
7171
.template-work-page &,
7272
.template-historical-work-page & {
7373
&__intro {
74-
margin-bottom: $spacer-small;
74+
margin-top: $spacer-small;
75+
margin-bottom: $spacer-medium;
7576

7677
@include media-query(large) {
7778
margin-bottom: 0;
79+
margin-top: 0;
7880
}
7981
}
8082
}

tbx/static_src/sass/config/_variables.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ $large-font-sizes: (
373373
32px,
374374
1.4,
375375
),
376+
intro: (
377+
24px,
378+
1.6,
379+
),
376380
);
377381

378382
$small-font-sizes: (
@@ -448,6 +452,10 @@ $small-font-sizes: (
448452
32px,
449453
1.4,
450454
),
455+
intro: (
456+
20px,
457+
1.6,
458+
),
451459
);
452460

453461
// --------------------------------- Sizing ------------------------------------

0 commit comments

Comments
 (0)