You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/content/docs/0.0/content/typography.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -240,7 +240,7 @@ While not shown above, feel free to use `<b>` and `<i>` in HTML5. `<b>` is meant
240
240
241
241
## Text utilities
242
242
243
-
Change text alignment, transform, style, weight, line-height, decoration<!-- and color--> with our [text utilities]({{< docsref "/utilities/text" >}})<!-- and [color utilities]({{< docsref "/utilities/colors" >}})-->.
243
+
Change text alignment, transform, style, weight, line-height, decoration and color with our [text utilities]({{< docsref "/utilities/text" >}}) and [color utilities]({{< docsref "/utilities/colors" >}}).
Copy file name to clipboardExpand all lines: site/content/docs/0.0/customize/color-palette.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,8 +128,7 @@ Here's how you should use these in your Sass:
128
128
}
129
129
```
130
130
131
-
<!-- [Color]({{< docsref "/utilities/colors" >}}) and -->
132
-
[Background]({{< docsref "/utilities/background" >}}) utility classes are also available for setting <!--`color` and -->`background-color`.
131
+
[Color]({{< docsref "/utilities/colors" >}}) and [Background]({{< docsref "/utilities/background" >}}) utility classes are also available for setting `color` and `background-color`.
Copy file name to clipboardExpand all lines: site/content/docs/0.0/getting-started/accessibility.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ OUDS Web's interactive components<!--—such as modal dialogs, dropdown menus, a
24
24
25
25
Because OUDS Web's components are purposely designed to be fairly generic, authors may need to include further <abbrtitle="Accessible Rich Internet Applications">ARIA</abbr> roles and attributes, as well as JavaScript behavior, to more accurately convey the precise nature and functionality of their component. This is usually noted in the documentation.
26
26
27
-
<!--### Color contrast
27
+
<!-- TODO LM: ### Color contrast
28
28
29
29
Some combinations of colors that currently make up OUDS Web's default palette—used throughout the framework for things such as button variations, alert variations, form validation indicators—may lead to *insufficient* color contrast (below the recommended [WCAG 2.1 text color contrast ratio of 4.5:1](https://www.w3.org/TR/WCAG/#contrast-minimum) and the [WCAG 2.1 non-text color contrast ratio of 3:1](https://www.w3.org/TR/WCAG21/#non-text-contrast)), particularly when used against a light background.
Copy file name to clipboardExpand all lines: site/content/docs/0.0/utilities/background.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,9 @@ toc: true
17
17
Background utilities like `.bg-*` are generated from our `$ouds-backgrounds` Sass map and respond to color modes.
18
18
19
19
Similar to the contextual text color classes, set the background of an element to any contextual class. Background utilities **do not set `color`**, so depending on the cases you'll want to use an additional:
20
-
*`[data-bs-theme]`[color mode attribute]({{< docsref "/customize/color-modes#how-to-use" >}}) when the element using a background utility contains complex sub-elements such as components that need to respond to color modes
21
-
<!--* `.text-*` [color utilities]({{< docsref "/utilities/colors" >}}) when the background color remains the same in light and dark mode
*`[data-bs-theme]`[color mode attribute]({{< docsref "/customize/color-modes#how-to-use" >}}) is the best option all the time and moreover when the element using a background utility contains complex sub-elements such as components that need to respond to color modes
21
+
*`.text-*`[color utilities]({{< docsref "/utilities/colors" >}}) when the background color remains the same in light and dark mode
Colorize text with color utilities.<!-- If you want to colorize links, you can use the [`.link-*` helper classes]({{< docsref "/helpers/colored-links" >}}) which have `:hover` and `:focus` states.-->
18
+
<!-- To colorize icons, please refer to our [icon color documentation]({{< docsref "extend/icons#modify-icons-color" >}}). -->
19
+
20
+
OUDS Web provides many `.text-*` and `.bg-*` utilities, but they should be used with care to meet our design specifications and [WCAG 2.2 accessibility standards for color contrast](https://www.w3.org/TR/WCAG/#distinguishable).
21
+
To be sure to respect the specifications, it is necessary to define `color`, `background-color` and `font-size` altogether.
22
+
23
+
Thus, the `.text-primary` color on white background (`#f16e00`) can only be used in a font size greater than 24px (using for example `.fs-3` utility), or 19px bold (using for example `.fs-4` and `.fw-bold` utilities).
24
+
The `.text-primary` color on dark background (`#ff7900`) can be used in any size, and it shouldn't be used on light grey backgrounds at all.
25
+
26
+
Here are some compliant combinations examples for texts:
<!-- TODO LM: Insert table including text-brand-primary, font-weight, and font-size depending on the background-color/color mode or maybe lists the allowed couples depending on the font-size/font-weight -->
50
+
51
+
If you don't see the couple you need, please mind using one of the table
52
+
53
+
{{< bs-table >}}
54
+
| Font reference | Allowed `.text-*` and `.bg-*` couples |
55
+
| --- | --- |
56
+
| All `font-sizes`/`font-weight` are allowed ||
57
+
|||
58
+
|||
59
+
{{< /bs-table >}}
60
+
61
+
{{< callout warning >}}
62
+
When the interface allows to switch between light and dark backgrounds, the light mode stricter restrictions must be applied!
63
+
{{< /callout >}}
64
+
65
+
<!-- The following colors are meant to be used with icons.
66
+
67
+
{{< example >}}
68
+
{{< colors.inline >}}
69
+
{{- range (index $.Site.Data "theme-colors") }}
70
+
<p class="text-{{ .name }}{{ with .contrast_color }} bg-{{ . }}{{ end }}">.text-{{ .name }}</p>
<summary>See Bootstrap examples that are incompatible with Orange Design System.</summary>
84
+
<br>
85
+
{{< design-callout-alert >}}
86
+
Some of the colors combinations below do not belong to the Orange Design System specifications, and do not meet accessibility standards.
87
+
88
+
Please refer to our [Orange's colors section]({{< docsref "/utilities/colors#colors" >}}) above and to the [Color guidelines](https://system.design.orange.com/0c1af118d/p/7059a5-colour/b/17b829) on the Orange Design System website.
89
+
{{< /design-callout-alert >}}
90
+
91
+
{{< example >}}
92
+
{{< colors.inline >}}
93
+
{{- range (index $.Site.Data "theme-colors") }}
94
+
<p class="text-{{ .name }}{{ with .contrast_color }} bg-{{ . }}{{ end }}">.text-{{ .name }}</p>
95
+
<p class="text-{{ .name }}-emphasis{{ with .contrast_color }} bg-{{ . }}{{ end }}">.text-{{ .name }}-emphasis</p>
**Deprecation:** With the addition of `.text-opacity-*` utilities and CSS variables for text utilities, `.text-black-50` and `.text-white-50` are deprecated as of v5.1.0. They'll be removed in v6.0.0.
112
+
{{< /callout >}}
113
+
</details> -->
114
+
115
+
<!-- ## Opacity
116
+
117
+
{{< added-in "5.1.0" >}}
118
+
119
+
As of v5.1.0, text color utilities are generated with Sass using CSS variables. This allows for real-time color changes without compilation and dynamic alpha transparency changes.
We use an RGB version of our `--bs-primary` (with the value of `241, 110, 0` in light mode) CSS variable and attached a second CSS variable, `--bs-text-opacity`, for the alpha transparency (with a default value `1` thanks to a local CSS variable). That means anytime you use `.text-primary` now, your computed `color` value is `rgba(241, 110, 0, 1)` in light mode. The local CSS variable inside each `.text-*` class avoids inheritance issues so nested instances of the utilities don't automatically have a modified alpha transparency.
133
+
134
+
When used in dark mode, `--bs-primary-rgb` will use the value of (with the value of `255, 121, 0`).
135
+
136
+
### Example
137
+
138
+
To change that opacity, override `--bs-text-opacity` via custom styles or inline styles.
139
+
140
+
<details>
141
+
<summary>See Bootstrap examples that are incompatible with Orange Design System.</summary>
142
+
<br>
143
+
{{< design-callout-alert >}}
144
+
Some of the colors combinations below do not belong to the Orange Design System specifications, and do not meet accessibility standards.
<div class="text-primary">This is default primary text</div>
151
+
<div class="text-primary" style="--bs-text-opacity: .5;">This is 50% opacity primary text</div>
152
+
{{< /example >}}
153
+
154
+
Or, choose from any of the `.text-opacity` utilities:
155
+
156
+
{{< example >}}
157
+
<div class="text-primary">This is default primary text</div>
158
+
<div class="text-primary text-opacity-75">This is 75% opacity primary text</div>
159
+
<div class="text-primary text-opacity-50">This is 50% opacity primary text</div>
160
+
<div class="text-primary text-opacity-25">This is 25% opacity primary text</div>
161
+
{{< /example >}}
162
+
</details> -->
163
+
164
+
## Specificity
165
+
166
+
Sometimes contextual classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a `<div>` or more semantic element with the desired class.
167
+
168
+
## CSS
169
+
170
+
<!-- TODO LM: The rest of it -->
171
+
172
+
In addition to the following Sass functionality, consider reading about our included [CSS custom properties]({{< docsref "/customize/css-variables" >}}) (aka CSS variables) for colors and more.
173
+
174
+
### Sass variables
175
+
176
+
Most `color` utilities are generated by our theme colors, reassigned from our generic color palette variables.
177
+
178
+
<!-- Boosted mod -->
179
+
Boosted supersedes Bootstrap color variables with Orange brand color.
Color utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}})
0 commit comments