Skip to content

Commit 48363d8

Browse files
tmp
1 parent 6759b74 commit 48363d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1744
-395
lines changed

scss/_config.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Configuration file for OUDS Web
2+
3+
$prefix: bs- !default;

scss/_maps.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,38 @@ $ouds-elevations: (
8383
) !default;
8484
// scss-docs-end ouds-maps-elevations
8585

86+
// scss-docs-start ouds-maps-fonts
87+
$ouds-font-sizes: (
88+
dl: "%display-large",
89+
dm: "%display-medium",
90+
ds: "%display-small",
91+
hxl: "%heading-xlarge",
92+
hl: "%heading-large",
93+
hm: "%heading-medium",
94+
hs: "%heading-small",
95+
hxs: "%heading-xsmall",
96+
bl: "%body-large",
97+
bm: "%body-medium",
98+
bs: "%body-small",
99+
lxl: "%label-xlarge",
100+
ll: "%label-large",
101+
lm: "%label-medium",
102+
ls: "%label-small",
103+
cm: "%code-medium",
104+
cs: "%code-small"
105+
) !default;
106+
107+
$ouds-font-weights: (
108+
normal: $ouds-font-weight-web-default,
109+
bold: $ouds-font-weight-web-strong
110+
) !default;
111+
112+
$ouds-line-lengths: (
113+
sm: 40ch,
114+
md: 80ch
115+
) !default;
116+
// scss-docs-end ouds-maps-fonts
117+
86118
// scss-docs-start ouds-maps-opacities
87119
$ouds-opacities: (
88120
"transparent": $ouds-opacity-transparent,

scss/_reboot.scss

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
// 2. As a best practice, apply a default `background-color`.
5858
// 3. Prevent adjustments of font size after orientation changes in iOS.
5959
// 4. Change the default tap highlight to be completely transparent in iOS.
60-
// 5. Prevent faux-bold/italic
60+
// 5. Prevent faux-bold/italic maybe for some RTL fonts
6161
// See https://developer.mozilla.org/fr/docs/Web/CSS/font-synthesis
6262

6363
// scss-docs-start reboot-body-rules
@@ -69,11 +69,11 @@ body {
6969
@include font-size(var(--#{$prefix}body-font-size));
7070
font-weight: var(--#{$prefix}body-font-weight);
7171
line-height: var(--#{$prefix}body-line-height);
72-
// OUDS mod: no color
72+
color: var(--#{$prefix}body-color);
7373
text-align: var(--#{$prefix}body-text-align);
7474

7575
/* rtl:remove */
76-
letter-spacing: $letter-spacing-base; // OUDS mod
76+
letter-spacing: var(--#{$prefix}body-letter-spacing); // OUDS mod
7777
background-color: var(--#{$prefix}body-bg); // 2
7878
-webkit-text-size-adjust: 100%; // 3
7979
-webkit-tap-highlight-color: rgba($black, 0); // 4
@@ -134,43 +134,46 @@ hr {
134134
%heading {
135135
margin-top: 0; // 1
136136
margin-bottom: $headings-margin-bottom;
137-
@include font-size($font-size-base); // OUDS mod
138137
font-family: $headings-font-family;
139138
font-style: $headings-font-style;
140139
font-weight: $headings-font-weight;
141140
line-height: $headings-line-height;
142141
color: var(--#{$prefix}heading-color);
143142

144143
/* rtl:remove */
145-
letter-spacing: $letter-spacing-base; // OUDS mod
146144
-webkit-font-smoothing: antialiased; // OUDS mod
147145
-moz-osx-font-smoothing: grayscale; // OUDS mod
148146
text-rendering: optimizelegibility; // OUDS mod
149147
}
150148

151149
h1 {
152150
@extend %heading;
153-
@include font-size($h4-font-size);
154-
line-height: $h4-line-height;
151+
@extend %heading-xlarge; // OUDS mod: instead of `@include font-size($h1-font-size)`
152+
}
155153

156-
/* rtl:remove */
157-
letter-spacing: $h4-spacing;
154+
h2 {
155+
@extend %heading;
156+
@extend %heading-large; // OUDS mod: instead of `@include font-size($h2-font-size)`
158157
}
159158

160-
h2,
161159
h3 {
162160
@extend %heading;
163-
@include font-size($h5-font-size);
164-
line-height: $h5-line-height;
161+
@extend %heading-medium; // OUDS mod: instead of `@include font-size($h3-font-size)`
162+
}
165163

166-
/* rtl:remove */
167-
letter-spacing: $h5-spacing;
164+
h4 {
165+
@extend %heading;
166+
@extend %heading-small; // OUDS mod: instead of `@include font-size($h4-font-size)`
167+
}
168+
169+
h5 {
170+
@extend %heading;
171+
@extend %heading-xsmall; // OUDS mod: instead of `@include font-size($h5-font-size)`
168172
}
169173

170-
h4,
171-
h5,
172174
h6 {
173175
@extend %heading;
176+
@extend %body-large; // OUDS mod: instead of `@include font-size($h6-font-size)` // Makes sense for me to have the smallest title the same font-size as the largest body since it's Bold and spaced correctly
174177
}
175178

176179

@@ -286,6 +289,13 @@ blockquote {
286289
margin: 0 0 1rem;
287290
}
288291

292+
// OUDS mod: No italic
293+
em,
294+
cite {
295+
font-style: normal; // OUDS mod: remove italic.
296+
}
297+
// End mod
298+
289299

290300
// Strong
291301
//
@@ -304,10 +314,6 @@ strong {
304314

305315
small {
306316
@include font-size($small-font-size);
307-
// OUDS mod
308-
font-weight: $font-weight-normal;
309-
line-height: $line-height-sm;
310-
// End mod
311317
}
312318

313319

@@ -383,8 +389,7 @@ pre {
383389
margin-top: 0; // 1
384390
margin-bottom: 1rem; // 2
385391
overflow: auto; // 3
386-
@include font-size($code-font-size);
387-
line-height: $pre-line-height; // OUDS mod
392+
@extend %code-small; // OUDS mod: instead of `@include font-size($code-font-size)`
388393
color: $pre-color;
389394

390395
// Account for some code outputs that place code tags in pre tags
@@ -399,7 +404,6 @@ var, // OUDS mod
399404
code {
400405
@include font-size($code-font-size);
401406
font-style: normal; // OUDS mod: <var> is italic in all browsers
402-
line-height: $line-height-sm; // OUDS mod
403407
color: var(--#{$prefix}code-color);
404408
word-wrap: break-word;
405409

@@ -460,13 +464,10 @@ table {
460464
caption {
461465
padding-top: $table-caption-padding-y;
462466
padding-bottom: $table-caption-padding-y;
463-
@include font-size($h1-font-size); // OUDS mod
464-
font-weight: $font-weight-bold; // OUDS mod
467+
@extend %heading-xlarge; // OUDS mod
468+
font-weight: $font-weight-bold; // OUDS mod
465469
color: $table-caption-color;
466470
text-align: left;
467-
468-
/* rtl:remove */
469-
letter-spacing: $h1-spacing; // OUDS mod
470471
-webkit-font-smoothing: antialiased; // OUDS mod
471472
-moz-osx-font-smoothing: grayscale; // OUDS mod
472473
text-rendering: optimizelegibility; // OUDS mod
@@ -500,7 +501,6 @@ th {
500501

501502
label {
502503
display: inline-block; // 1
503-
font-weight: $form-label-font-weight; // OUDS mod
504504
}
505505

506506
// Remove the default `border-radius` that macOS Chrome adds.
@@ -626,9 +626,8 @@ legend {
626626
width: 100%;
627627
padding: 0;
628628
margin-bottom: $legend-margin-bottom;
629-
@include font-size($legend-font-size);
629+
@extend %body-large; // OUDS mod: instead of `@include font-size($legend-font-size)`
630630
font-weight: $legend-font-weight;
631-
line-height: inherit;
632631

633632
+ * {
634633
clear: left; // 2

0 commit comments

Comments
 (0)