Skip to content

Commit ba064a2

Browse files
committed
Reinstate support for IE 11
1 parent 19262a0 commit ba064a2

File tree

5 files changed

+79
-21
lines changed

5 files changed

+79
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Official 2017+ website of the [Textpattern](https://textpattern.com/) project. *
77

88
## Supported web browsers
99

10-
* Internet Explorer 11.
1110
* Chrome, Edge, Firefox, Safari and Opera the last two recent stable releases.
11+
* Internet Explorer 11.
1212
* Firefox ESR latest major point release.
1313

1414
Older versions of the above and other browsers may work, but these are the ones we verify.

src/assets/sass/modules/_base.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
/* Reset
22
========================================================================== */
33

4+
/**
5+
* Render the `main` element consistently in IE 11.
6+
*/
7+
8+
main {
9+
display: block;
10+
}
11+
12+
/**
13+
* Add the correct display in IE 11.
14+
*/
15+
16+
template {
17+
display: none;
18+
}
19+
420
/**
521
* Remove tap delay in modern browsers.
622
*/

src/assets/sass/modules/_forms.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,16 +407,18 @@ optgroup {
407407
}
408408

409409
/**
410-
* 1. Remove unwanted space below `textarea` in Safari, Chrome, Opera.
411-
* 2. Restrict to vertical resizing to prevent layout breakage.
410+
* 1. Remove the default vertical scrollbar in IE 11.
411+
* 2. Remove unwanted space below `textarea` in Safari, Chrome, Opera.
412+
* 3. Restrict to vertical resizing to prevent layout breakage.
412413
*/
413414

414415
textarea {
415416
width: 100%;
416417
height: auto;
417418
min-height: 3em;
418-
vertical-align: top; /* 1 */
419-
resize: vertical; /* 2 */
419+
overflow: auto; /* 1 */
420+
vertical-align: top; /* 2 */
421+
resize: vertical; /* 3 */
420422
}
421423

422424
/**

src/assets/sass/modules/_layout.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ body {
1919
flex-direction: column;
2020
min-height: 100vh;
2121
margin: 0; /* 1 */
22-
background: $color-background;
23-
color: $color-text;
22+
background-color: $color-text;
23+
color: $color-text-inverse;
2424
scroll-behavior: smooth; // https://caniuse.com/#search=scroll-behavior
2525
}
2626

@@ -84,6 +84,8 @@ noscript {
8484
.wrapper {
8585
position: relative;
8686
padding: 1px 0;
87+
background: $color-background;
88+
color: $color-text;
8789
}
8890

8991
/**
@@ -100,8 +102,6 @@ noscript {
100102
.wrapper-footer {
101103
flex: 1;
102104
padding-bottom: 0.5em;
103-
background-color: $color-text;
104-
color: $color-text-inverse;
105105
}
106106

107107
/**

src/assets/sass/modules/_responsive.scss

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,35 @@
44

55
@media screen and (min-width: $breakpoint-1) {
66

7+
/**
8+
* Screen size-specific elements.
9+
*/
10+
11+
.screen-small {
12+
display: none;
13+
}
14+
15+
.screen-large {
16+
display: initial; // TODO: use `display: revert` when browser support is widespread.
17+
}
18+
719
/**
820
* Grid container.
921
*/
1022

1123
.layout-container {
24+
display: flex; // Flexbox fallback for browsers without CSS Grid support.
1225
display: grid;
26+
flex-wrap: wrap; // Flexbox fallback for browsers without CSS Grid support.
27+
margin: 0 -1em; // Flexbox fallback for browsers without CSS Grid support.
1328
grid-template-columns: repeat(12, 1fr);
1429
grid-gap: 0 2em;
1530

1631
> * {
32+
flex: 1; // Flexbox fallback.
1733
min-width: 0; // Fix Firefox `pre` overflow issues.
34+
padding: 0 1em; // Flexbox fallback.
35+
box-sizing: border-box; // Flexbox fallback.
1836
}
1937
}
2038

@@ -42,29 +60,31 @@
4260
.layout-4col,
4361
.layout-4col-2span,
4462
.layout-4col-3span {
63+
width: 100%; // Flexbox fallback.
4564
grid-column: span 12;
4665
}
4766

48-
/**
49-
* Screen size-specific elements.
50-
*/
51-
52-
.screen-small {
53-
display: none;
54-
}
55-
56-
.screen-large {
57-
display: initial; // TODO: use `display: revert` when browser support is widespread.
58-
}
59-
6067
/**
6168
* Cells for 4 column layouts are generated, but as 2 columns at this width.
6269
*/
6370

6471
.layout-4col:not(.sidebar) {
72+
width: 50%; // Flexbox fallback.
6573
grid-column: span 6;
6674
}
6775

76+
// Override Flexbox fallback for browsers with CSS Grid support.
77+
@supports (display: grid) {
78+
.layout-container {
79+
margin: 0;
80+
}
81+
82+
.layout-container > * {
83+
width: auto;
84+
padding: 0;
85+
}
86+
}
87+
6888
/**
6989
* Allow two columns of text.
7090
*/
@@ -199,17 +219,27 @@
199219
*/
200220

201221
.layout-2col {
222+
width: 50%; // Flexbox fallback.
202223
grid-column: span 6;
203224
}
204225

205226
.layout-3col {
227+
width: 33.333%; // Flexbox fallback.
206228
grid-column: span 4;
207229
}
208230

209231
.layout-3col-2span {
232+
width: 66.666%; // Flexbox fallback.
210233
grid-column: span 8;
211234
}
212235

236+
// Override Flexbox fallback for browsers with CSS Grid support.
237+
@supports (display: grid) {
238+
.layout-container > * {
239+
width: auto;
240+
}
241+
}
242+
213243
/**
214244
* Allow three columns of text.
215245
*/
@@ -413,17 +443,27 @@
413443

414444
.layout-4col,
415445
.layout-4col:not(.sidebar) {
446+
width: 25%; // Flexbox fallback.
416447
grid-column: span 3;
417448
}
418449

419450
.layout-4col-2span {
451+
width: 50%; // Flexbox fallback.
420452
grid-column: span 6;
421453
}
422454

423455
.layout-4col-3span {
456+
width: 75%; // Flexbox fallback.
424457
grid-column: span 9;
425458
}
426459

460+
// Override Flexbox fallback for browsers with CSS Grid support.
461+
@supports (display: grid) {
462+
.layout-container > * {
463+
width: auto;
464+
}
465+
}
466+
427467
/**
428468
* Allow four columns of text.
429469
*/

0 commit comments

Comments
 (0)