Skip to content

Commit f9c143e

Browse files
authored
fix: Respect user agent font size set in browser (#2466)
1 parent 6fd4076 commit f9c143e

40 files changed

+280
-293
lines changed

assets/css/_autocomplete-theme.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
}
66

77
// styles that will be used for every instance
8-
[phx-hook='AlgoliaAutocomplete'], .aa-Detached {
8+
[phx-hook="AlgoliaAutocomplete"], .aa-Detached {
99
.text-danger & {
1010
--aa-accent-color: 179, 0, 15; // matches $error-text
1111
}
@@ -15,6 +15,13 @@
1515
--aa-primary-color-rgb: var(--aa-accent-color);
1616
--aa-input-border-color-rgb: var(--aa-accent-color);
1717
--aa-overlay-color-rgb: var(--aa-accent-color);
18+
--aa-search-input-height: 2.75rem; // override the default 44px
19+
--aa-font-size: 1rem;
20+
}
21+
22+
.aa-Input {
23+
font-size: 1rem !important; // override the default `font` declaration
24+
height: 2.75rem; // override default height
1825
}
1926

2027
.aa-Label {
@@ -88,6 +95,7 @@
8895
}
8996

9097
.aa-Panel {
98+
font-size: 1rem;
9199
margin-top: .25rem;
92100
z-index: var(--aa-base-z-index);
93101
}

assets/css/_bootstrap.scss

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

5656
// Overrides
5757
.c-select {
58-
border: 2px solid $brand-primary;
58+
border: .125rem solid $brand-primary;
5959
cursor: pointer;
6060
padding: $base-spacing-sm;
6161
text-align: left;

assets/css/_buttons.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// Allows button to inherit size of surrounding/body text.
1212
font-size: inherit;
1313
font-weight: $font-weight-medium;
14+
white-space: normal;
1415

1516
&.btn-primary {
1617
@include hover {
@@ -149,11 +150,6 @@
149150

150151
.btn {
151152
margin-bottom: 0;
152-
white-space: normal;
153-
154-
@include media-breakpoint-down(sm) {
155-
white-space: normal;
156-
}
157153
}
158154
}
159155

assets/css/_checkbox.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
&:focus {
1616
+ .c-checkbox__label::before {
17-
outline: 3px solid; // Focus for IE11, auto doesn't work the same
17+
outline: .25rem solid; // Focus for IE11, auto doesn't work the same
1818
// Use webkit focus color so IE11 above works
19-
outline: auto -webkit-focus-ring-color 5px;
19+
outline: auto -webkit-focus-ring-color .25rem;
2020
outline-color: $brand-primary-light;
2121
-moz-outline-radius: $border-radius; // Less ugly focus style for FF
2222
}
@@ -42,7 +42,7 @@
4242

4343
&::before {
4444
background: $input-bg;
45-
border: 2px solid $brand-primary-dark;
45+
border: .125rem solid $brand-primary-dark;
4646
border-radius: $border-radius;
4747
content: '';
4848
cursor: pointer;
@@ -56,7 +56,7 @@
5656

5757
&::after {
5858
background: transparent;
59-
border: 4px solid $white;
59+
border: .25rem solid $white;
6060
border-right: 0;
6161
border-top: 0;
6262
content: none;

assets/css/_customer-support.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
}
117117

118118
.upload-photo-link {
119-
border: 2px solid $brand-primary;
119+
border: .125rem solid $brand-primary;
120120
border-radius: calc(#{$base-spacing} / 4);
121121
cursor: pointer;
122122
display: inline-block;
@@ -165,7 +165,7 @@ body {
165165

166166
// styles the input fields
167167
.support-form-input {
168-
border: 2px solid $brand-primary;
168+
border: .125rem solid $brand-primary;
169169
display: block;
170170
font-size: inherit; // Bootstrap override
171171
padding: calc(#{$base-spacing} / 2);

assets/css/_errors.scss

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
// Used in the error layout page
44
.error-page {
55
@include media-breakpoint-between(md, xxl) {
6-
margin-top: 40px;
6+
margin-top: 2.5rem;
77
}
88
@include media-breakpoint-only(sm) {
9-
margin: 24px 40px;
9+
margin: 1.5rem 2.5rem;
1010
}
1111
@include media-breakpoint-only(xs) {
12-
margin: 16px 24px;
12+
margin: 1rem 1.5rem;
1313
}
1414
}
1515

@@ -20,7 +20,7 @@
2020
}
2121

2222
.error-details-container .error-title {
23-
margin-bottom: 40px;
23+
margin-bottom: 2.5rem;
2424
@include media-breakpoint-between(xs, sm) {
2525
display: none;
2626
}
@@ -29,9 +29,9 @@
2929
.error-pre-title {
3030
color: $gray;
3131
line-height: 1.4;
32-
margin-bottom: 16px;
32+
margin-bottom: 1rem;
3333
@include media-breakpoint-only(sm) {
34-
margin-bottom: 8px;
34+
margin-bottom: .5rem;
3535
}
3636
}
3737

@@ -47,7 +47,7 @@
4747
flex-direction: column;
4848
@include media-breakpoint-up(sm) {
4949
flex-direction: row-reverse;
50-
margin-top: 24px;
50+
margin-top: 1.5rem;
5151
}
5252
@include media-breakpoint-up(xxl) {
5353
margin-top: 0;
@@ -56,11 +56,11 @@
5656

5757
.error-details-container {
5858
@include media-breakpoint-only(sm) {
59-
margin-right: 24px;
60-
margin-top: 16px;
59+
margin-right: 1.5rem;
60+
margin-top: 1rem;
6161
}
6262
@include media-breakpoint-between(md, lg) {
63-
margin-right: 40px;
63+
margin-right: 2.5rem;
6464
}
6565
@include media-breakpoint-only(xxl) {
6666
margin-right: 60px;
@@ -70,15 +70,15 @@
7070
.error-svg-container {
7171
flex: 0 0 auto;
7272
@include media-breakpoint-only(xxl) {
73-
margin: 0 80px;
73+
margin: 0 5rem;
7474
width: 380px;
7575
}
7676
@include media-breakpoint-between(md,lg) {
77-
margin: 0 40px;
77+
margin: 0 2.5rem;
7878
width: 280px;
7979
}
8080
@include media-breakpoint-down(sm) {
81-
margin: 0 24px;
81+
margin: 0 1.5rem;
8282
width: 220px;
8383
}
8484
@include media-breakpoint-only(xs) {

assets/css/_event-details.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212

1313
.m-event__date-range {
14-
font-size: 16px;
14+
font-size: 1rem;
1515
font-weight: bold;
1616
}
1717

@@ -46,12 +46,12 @@
4646

4747
.m-event__livestream {
4848
height: 56vw;
49-
max-height: 560px;
49+
max-height: 35rem;
5050
width: 100%;
5151
}
5252
}
5353

54-
$bullet-size: math.div(32px, $font-size-base-xxl) * $base-spacing; // 32px on large viewport
54+
$bullet-size: 2rem;
5555
$separator-border: solid 1px $gray-lightest;
5656
$agenda-column-gap: $base-spacing * .75;
5757

assets/css/_event-overlay.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
[data-a11y-dialog-hide] {
3535
background-color: transparent;
3636
border: 0;
37-
font-size: 26px;
37+
font-size: 1.5rem;
3838
font-weight: bold;
39-
height: 18px;
40-
line-height: 18px;
41-
margin-left: 10px;
39+
height: 1.125rem;
40+
line-height: 1.125rem;
41+
margin-left: .625rem;
4242
padding: 0;
4343
}
4444

0 commit comments

Comments
 (0)