Skip to content

Commit 6d5a278

Browse files
committed
Make sure the "browser unsupported" message is styled properly
1 parent 847cfbb commit 6d5a278

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

assets/stylesheets/components/_fail.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
._fail {
1+
._fail { // Don't use CSS variables, in case the browser doesn't support them.
22
display: block;
33
position: relative;
44
top: 1.5rem;
@@ -23,7 +23,7 @@
2323
._fail-title {
2424
margin: 0 0 1rem;
2525
font-size: 1rem;
26-
font-weight: var(--boldFontWeight);
26+
font-weight: bold;
2727
}
2828

2929
._fail-text, ._fail-list {

assets/stylesheets/global/_base.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
html {
22
height: 100%;
33
font-size: 100%;
4+
background: #fff; // fallback to show the error message to browsers that don't support CSS variables.
45
background: var(--documentBackground);
56

67
@include mobile { font-size: 93.75%; }
@@ -15,8 +16,9 @@ body {
1516
overflow: auto;
1617
font-size: 1em;
1718
font-weight: normal;
18-
font-family: var(--baseFont);
19+
font-family: $baseFont;
1920
line-height: 1.7;
21+
color: $textColor; // fallback to show the error message to browsers that don't support CSS variables.
2022
color: var(--textColor);
2123
word-wrap: break-word;
2224
overflow-wrap: break-word;

assets/stylesheets/global/_variables.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
// Variables needed to style the error message for browsers that don't support CSS variables.
2+
$baseFont: -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
3+
$textColor: #333;
4+
15
html {
2-
--baseFont: -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
6+
--baseFont: #{$baseFont};
37
--monoFont: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
48
--boldFontWeight: 500;
59
--bolderFontWeight: 600;

0 commit comments

Comments
 (0)