Skip to content

Commit 827adf3

Browse files
committed
CSS optimisations
1 parent c80bf51 commit 827adf3

File tree

6 files changed

+19
-59
lines changed

6 files changed

+19
-59
lines changed

src/assets/sass/designpatterns.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,18 +195,14 @@ $dark-colors: (
195195
*
196196
* Example HTML:
197197
*
198-
* <ol class="design-patterns--breakpoints list--no-bullets clearfix">
198+
* <ol class="design-patterns--breakpoints list--no-bullets">
199199
* <li class="design-patterns--breakpoint-0">No breakpoint</li>
200200
* <li class="design-patterns--breakpoint-1">Breakpoint 1</li>
201201
* <li class="design-patterns--breakpoint-2">Breakpoint 2</li>
202202
* <li class="design-patterns--breakpoint-3">Breakpoint 3</li>
203203
* </ol>
204204
*/
205205

206-
.design-patterns--breakpoints li {
207-
float: left;
208-
}
209-
210206
.design-patterns--breakpoint-0,
211207
.design-patterns--breakpoint-1,
212208
.design-patterns--breakpoint-2,

src/assets/sass/modules/_base.scss

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,3 @@ input,
2626
button {
2727
touch-action: manipulation;
2828
}
29-
30-
31-
/* Clearfix
32-
========================================================================== */
33-
34-
header,
35-
footer,
36-
nav ul,
37-
nav ol,
38-
.clearfix {
39-
&::after {
40-
content: "";
41-
display: table;
42-
clear: both;
43-
}
44-
}
45-
46-
/**
47-
* Basic float clearer.
48-
*/
49-
50-
.clear {
51-
clear: both;
52-
}

src/assets/sass/modules/_print.scss

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,6 @@ a {
6161
text-decoration: none;
6262
}
6363

64-
/**
65-
* Show long-form for abbreviations in print.
66-
*/
67-
68-
abbr[title] {
69-
&::after {
70-
content: " (" attr(title) ")";
71-
}
72-
}
73-
7464
/**
7565
* Harmonize size, style and vertical margin of headings.
7666
*/
@@ -82,49 +72,44 @@ h1 {
8272
line-height: 36pt;
8373
}
8474

75+
h2,
76+
h3,
77+
h4,
78+
h5,
79+
h6 {
80+
orphans: 2;
81+
widows: 2;
82+
page-break-after: avoid;
83+
}
84+
8585
h2 {
8686
margin: 14pt 0;
8787
font-size: 24pt;
8888
line-height: 28pt;
89-
orphans: 2;
90-
widows: 2;
91-
page-break-after: avoid;
9289
}
9390

9491
h3 {
9592
margin: 12pt 0;
9693
font-size: 18pt;
9794
line-height: 22pt;
98-
orphans: 2;
99-
widows: 2;
100-
page-break-after: avoid;
10195
}
10296

10397
h4 {
10498
margin: 11pt 0;
10599
font-size: 14pt;
106100
line-height: 18pt;
107-
orphans: 2;
108-
widows: 2;
109-
page-break-after: avoid;
110101
}
111102

112103
h5 {
113104
margin: 10pt 0;
114105
font-size: 12pt;
115106
line-height: 16pt;
116-
orphans: 2;
117-
widows: 2;
118-
page-break-after: avoid;
119107
}
120108

121109
h6 {
122110
margin: 9pt 0;
123111
font-size: 10pt;
124112
line-height: 14pt;
125-
orphans: 2;
126-
widows: 2;
127-
page-break-after: avoid;
128113
}
129114

130115
/**

src/assets/sass/modules/_responsive.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,11 @@
324324
}
325325

326326
ul {
327+
display: flex;
327328
width: 90%;
328329
}
329330

330331
li {
331-
float: left;
332332
border: 0;
333333

334334
&:first-child,

src/assets/sass/modules/_typography.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,24 +104,27 @@ h6,
104104
}
105105
}
106106

107+
h1,
108+
h2,
109+
h3 {
110+
letter-spacing: -0.25px;
111+
}
112+
107113
h1 {
108114
margin: 0.6315789em 0; // 24px / 38px
109115
font-size: 2.375rem; // 38px / 16px
110-
letter-spacing: -0.25px;
111116
line-height: 1.1842105; // 45px / 38px
112117
}
113118

114119
h2 {
115120
margin: 0.8571429em 0; // 24px / 28px
116121
font-size: 1.75rem; // 28px / 16px
117-
letter-spacing: -0.25px;
118122
line-height: 1.25; // 35px / 28px
119123
}
120124

121125
h3 {
122126
margin: 1em 0; // 22px
123127
font-size: 1.375rem; // 22px / 16px
124-
letter-spacing: -0.25px;
125128
line-height: 1.3181818; // 29px / 22px
126129
}
127130

src/docs/design-patterns.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ <h2>Responsive grid</h2>
186186
<p>Grid layout with 1 to 4 column options.</p>
187187

188188
<h3>Current active breakpoint</h3>
189-
<ol class="design-patterns--breakpoints list--no-bullets clearfix">
189+
<ol class="design-patterns--breakpoints list--no-bullets">
190190
<li class="design-patterns--breakpoint-0">No breakpoint</li>
191191
<li class="design-patterns--breakpoint-1">Breakpoint 1</li>
192192
<li class="design-patterns--breakpoint-2">Breakpoint 2</li>

0 commit comments

Comments
 (0)