@qld-gov-au/qgds-bootstrap5 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/bs5/accordion/accordion.hbs +3 -3
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/quickexit/quickexit.hbs +1 -1
- package/dist/assets/css/qld.bootstrap.css +1 -1
- package/dist/assets/css/qld.bootstrap.css.map +3 -3
- package/dist/assets/js/handlebars.init.min.js +5 -5
- package/dist/assets/js/handlebars.init.min.js.map +1 -1
- package/dist/assets/node/handlebars.init.min.js +31 -3
- package/dist/assets/node/handlebars.init.min.js.map +2 -2
- package/dist/components/bs5/accordion/accordion.hbs +3 -3
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/quickexit/quickexit.hbs +1 -1
- package/dist/package.json +1 -1
- package/dist/sample-data/accordion/accordion.data.json +24 -23
- package/package.json +1 -1
- package/src/components/bs5/accordion/Accordion.mdx +1 -3
- package/src/components/bs5/accordion/__snapshots__/accordion.test.js.snap +3 -3
- package/src/components/bs5/accordion/accordion.data.json +24 -23
- package/src/components/bs5/accordion/accordion.hbs +3 -3
- package/src/components/bs5/accordion/accordion.scss +19 -9
- package/src/components/bs5/accordion/accordion.stories.js +8 -0
- package/src/components/bs5/accordion/accordion.test.js +5 -0
- package/src/components/bs5/backToTop/backToTop.mdx +4 -5
- package/src/components/bs5/banner/Banner.mdx +1 -3
- package/src/components/bs5/blockquote/Blockquote.mdx +4 -5
- package/src/components/bs5/breadcrumbs/Breadcrumbs.mdx +1 -3
- package/src/components/bs5/button/Button.mdx +4 -5
- package/src/components/bs5/button/button.scss +9 -1
- package/src/components/bs5/callToAction/callToAction.mdx +1 -3
- package/src/components/bs5/callout/Callout.mdx +4 -5
- package/src/components/bs5/card/Card.mdx +1 -3
- package/src/components/bs5/card/card.scss +1 -25
- package/src/components/bs5/directionLinks/DirectionLinks.mdx +4 -5
- package/src/components/bs5/footer/Footer.mdx +1 -3
- package/src/components/bs5/footer/footer.scss +4 -11
- package/src/components/bs5/formcheck/stories/checkbox/Checkbox.mdx +7 -6
- package/src/components/bs5/formcheck/stories/radio/Radio.mdx +7 -6
- package/src/components/bs5/globalAlert/GlobalAlert.mdx +1 -3
- package/src/components/bs5/globalAlert/globalAlert.scss +6 -0
- package/src/components/bs5/header/Header.mdx +1 -3
- package/src/components/bs5/header/header.scss +6 -2
- package/src/components/bs5/icons/Icons.mdx +167 -7
- package/src/components/bs5/icons/_icons.sizes.scss +9 -0
- package/src/components/bs5/icons/icons.scss +23 -71
- package/src/components/bs5/icons/icons.stories.js +34 -57
- package/src/components/bs5/icons/mdx/_IconsSizes.mdx +112 -0
- package/src/components/bs5/icons/stories/storyFlexContainer.html +18 -0
- package/src/components/bs5/icons/stories/storyInlineWithText.html +18 -0
- package/src/components/bs5/icons/stories/storySizes.html +89 -0
- package/src/components/bs5/image/Image.mdx +1 -4
- package/src/components/bs5/inpageAlert/InpageAlert.mdx +1 -3
- package/src/components/bs5/inpagenav/Inpagenav.mdx +4 -5
- package/src/components/bs5/link/link.mdx +1 -3
- package/src/components/bs5/link/link.scss +2 -15
- package/src/components/bs5/linkColumns/linkColumns.mdx +1 -3
- package/src/components/bs5/logo/Logo.mdx +1 -3
- package/src/components/bs5/pageLayout/ThemeShowcase.stories.js +249 -0
- package/src/components/bs5/pagination/Pagination.mdx +4 -5
- package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +1 -3
- package/src/components/bs5/quickexit/quickexit.hbs +1 -1
- package/src/components/bs5/quickexit/quickexit.scss +23 -10
- package/src/components/bs5/searchInput/SearchInput.mdx +5 -5
- package/src/components/bs5/sidenav/Sidenav.mdx +4 -5
- package/src/components/bs5/skiplinks/SkipLinks.mdx +1 -3
- package/src/components/bs5/table/Table.mdx +4 -5
- package/src/components/bs5/tabs/Tabs.mdx +4 -5
- package/src/components/bs5/tabs/tabs.scss +22 -1
- package/src/components/bs5/tag/Tag.mdx +4 -5
- package/src/components/bs5/typography/Typography.mdx +4 -5
- package/src/components/bs5/video/Video.mdx +4 -5
- package/src/css/functions/_index.scss +1 -0
- package/src/css/functions/in-list.scss +5 -0
- package/src/css/main.scss +4 -3
- package/src/css/mixins/_index.scss +3 -0
- package/src/css/mixins/make-icon.scss +87 -0
- package/src/css/qld-theme.scss +73 -31
- package/src/css/qld-type.scss +26 -140
- package/src/css/qld-utilities.scss +29 -14
- package/src/css/qld-variables.scss +4 -4
- package/src/css/variables/_index.scss +1 -0
- package/src/css/variables/type.scss +58 -0
- package/src/components/bs5/icons/story-icon-sizing.html +0 -131
- package/src/components/bs5/icons/story-icon-usage.html +0 -89
|
@@ -1,20 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
// QLD Customm Utilities, extends Bootstrap utilities
|
|
3
|
-
|
|
4
|
-
// Responsive width classes (w-md-25, w-lg-50, etc.)
|
|
1
|
+
// QLD Custom Utilities, extends Bootstrap utilities
|
|
5
2
|
$utilities: map-merge(
|
|
6
3
|
$utilities,
|
|
7
4
|
(
|
|
5
|
+
// Responsive width classes (w-md-25, w-lg-50, etc.)
|
|
8
6
|
"width": (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
property: width,
|
|
8
|
+
class: w,
|
|
9
|
+
responsive: true,
|
|
10
|
+
values: (
|
|
11
|
+
25: 25%,
|
|
12
|
+
50: 50%,
|
|
13
|
+
75: 75%,
|
|
14
|
+
100: 100%,
|
|
15
|
+
),
|
|
16
|
+
),
|
|
17
|
+
// QLD Background theme utilities (bg-dark, bg-dark-alt, etc.)
|
|
18
|
+
"qld-background": (
|
|
19
|
+
property: background-color,
|
|
20
|
+
class: bg,
|
|
21
|
+
values: (
|
|
22
|
+
"default": var(--qld-default-background),
|
|
23
|
+
"default-shade": var(--qld-default-background-shade),
|
|
24
|
+
"light": var(--qld-light-background),
|
|
25
|
+
"light-shade": var(--qld-light-background-shade),
|
|
26
|
+
"light-alt": var(--qld-light-alt-background),
|
|
27
|
+
"light-alt-shade": var(--qld-light-alt-background-shade),
|
|
28
|
+
"dark": var(--qld-dark-background),
|
|
29
|
+
"dark-shade": var(--qld-dark-background-shade),
|
|
30
|
+
"dark-alt": var(--qld-dark-alt-background),
|
|
31
|
+
"dark-alt-shade": var(--qld-dark-alt-background-shade),
|
|
32
|
+
),
|
|
17
33
|
)
|
|
18
|
-
)
|
|
19
34
|
)
|
|
20
|
-
);
|
|
35
|
+
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "mixins" as
|
|
1
|
+
@use "mixins" as m;
|
|
2
2
|
|
|
3
3
|
// GLOBALLY SCOPED VARIABLES
|
|
4
4
|
// These variables are available to the full project and all components. (This file is included at the top of main.css to ensure this)
|
|
@@ -222,7 +222,7 @@ $project-colors: (
|
|
|
222
222
|
"default-border": $qld-light-border,
|
|
223
223
|
"light-border": $color-default-color-light-border-light,
|
|
224
224
|
"light-border-alt": $qld-light-border-alt,
|
|
225
|
-
|
|
225
|
+
|
|
226
226
|
//Links
|
|
227
227
|
"light-link": $color-default-color-light-link-default,
|
|
228
228
|
"dark-link": $color-default-color-dark-link-default,
|
|
@@ -306,8 +306,8 @@ $project-base-colors: (
|
|
|
306
306
|
|
|
307
307
|
// Generate CSS custom properties for qld-tokens & project colours on :root to prevent utility class generation
|
|
308
308
|
:root {
|
|
309
|
-
@include generate-color-vars($qld-tokens);
|
|
310
|
-
@include generate-color-vars($project-colors);
|
|
309
|
+
@include m.generate-color-vars($qld-tokens);
|
|
310
|
+
@include m.generate-color-vars($project-colors);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
$theme-colors: map-merge($theme-colors, $project-base-colors);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "type";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//Typography
|
|
2
|
+
$font-family-sans-serif:
|
|
3
|
+
"Noto Sans",
|
|
4
|
+
system-ui,
|
|
5
|
+
-apple-system,
|
|
6
|
+
"Segoe UI",
|
|
7
|
+
Roboto,
|
|
8
|
+
"Helvetica Neue",
|
|
9
|
+
"Noto Sans",
|
|
10
|
+
"Liberation Sans",
|
|
11
|
+
Arial,
|
|
12
|
+
sans-serif,
|
|
13
|
+
"Apple Color Emoji",
|
|
14
|
+
"Segoe UI Emoji",
|
|
15
|
+
"Segoe UI Symbol",
|
|
16
|
+
"Noto Color Emoji" !default;
|
|
17
|
+
|
|
18
|
+
// Override Bootstrap font variables
|
|
19
|
+
$font-weight-base: 400;
|
|
20
|
+
$font-weight-bold: 600;
|
|
21
|
+
$font-weight-bolder: 900;
|
|
22
|
+
|
|
23
|
+
// Apply custom font weights to Bootstrap's utility classes
|
|
24
|
+
$font-weights: (
|
|
25
|
+
normal: 400,
|
|
26
|
+
bold: 600,
|
|
27
|
+
bolder: 900,
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
$body-color: $qld-text-grey;
|
|
31
|
+
$body-font-weight: 400;
|
|
32
|
+
$font-size-base: 1rem;
|
|
33
|
+
|
|
34
|
+
// https: //www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=58880-54175&t=35PGuqUnIyLmf28d-0
|
|
35
|
+
// Headings font weight and line height
|
|
36
|
+
$headings-font-weight: 600;
|
|
37
|
+
$headings-line-height: 1.3;
|
|
38
|
+
|
|
39
|
+
// Headings font sizes
|
|
40
|
+
$h1-font-size: $font-size-base * 2.5;
|
|
41
|
+
$h2-font-size: $font-size-base * 2;
|
|
42
|
+
$h3-font-size: $font-size-base * 1.5;
|
|
43
|
+
$h4-font-size: $font-size-base * 1.25;
|
|
44
|
+
$h5-font-size: $font-size-base * 1;
|
|
45
|
+
$h6-font-size: $font-size-base * 0.875;
|
|
46
|
+
|
|
47
|
+
// < 991 Mobile Tablet font sizes and line heights
|
|
48
|
+
$h1-font-size-mobile: $font-size-base * 2; // 32
|
|
49
|
+
$h2-font-size-mobile: $font-size-base * 1.75; // 28
|
|
50
|
+
$h1-line-height-mobile: 1.25; //40
|
|
51
|
+
$h2-line-height-mobile: 1.285; //36
|
|
52
|
+
|
|
53
|
+
$headings-color: $qld-text-headings;
|
|
54
|
+
$qld-heading-color: $core-default-color-brand-primary-light-green;
|
|
55
|
+
|
|
56
|
+
$link-color: $qld-brand-primary;
|
|
57
|
+
$link-hover-color: $qld-brand-primary;
|
|
58
|
+
$link-visited-color: $qld-link-visited;
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
<h2>Icon sizes</h2>
|
|
2
|
-
<article>
|
|
3
|
-
<p>
|
|
4
|
-
We have 6 preset sizes for icons ranging from extra small (xs) to extra extra large (xxl) and a dedicated feature size for large or detailed icons.
|
|
5
|
-
Feature icons use a background shade to help make it stand out from other elements on the page.
|
|
6
|
-
</p>
|
|
7
|
-
<p>
|
|
8
|
-
This size range allows for flexibility and adaptability in various design contexts while maintaining visual harmony and balance. These predefined sizes ensure that icons are proportionate and legible, enhancing their effectiveness and the overall aesthetic of the site.
|
|
9
|
-
</p>
|
|
10
|
-
</article>
|
|
11
|
-
|
|
12
|
-
<h4>Example:</h4>
|
|
13
|
-
<div class="row align-items-end text-start">
|
|
14
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
15
|
-
<span class="qld-icon qld-icon-xxl qld-icon-design" aria-hidden="true"></span>
|
|
16
|
-
<pre class="mt-2"><strong>XXL:</strong> 64x64</pre>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
19
|
-
<span class="qld-icon qld-icon-xl qld-icon-design" aria-hidden="true"></span>
|
|
20
|
-
<pre class="mt-2"><strong>XL:</strong> 48x48</pre>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
23
|
-
<span class="qld-icon qld-icon-lg qld-icon-design" aria-hidden="true"></span>
|
|
24
|
-
<pre class="mt-2"><strong>LG:</strong> 32x32</pre>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
27
|
-
<span class="qld-icon qld-icon-md qld-icon-design" aria-hidden="true"></span>
|
|
28
|
-
<pre class="mt-2"><strong>MD:</strong> 24x24</pre>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
31
|
-
<span class="qld-icon qld-icon-sm qld-icon-design" aria-hidden="true"></span>
|
|
32
|
-
<pre class="mt-2"><strong>SM:</strong> 20x20</pre>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
35
|
-
<span class="qld-icon qld-icon-xs qld-icon-design" aria-hidden="true"></span>
|
|
36
|
-
<pre class="mt-2"><strong>XS:</strong> 16x16</pre>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<div class="row align-items-end text-start">
|
|
41
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
42
|
-
<span class="qld-icon qld-icon-xxl qld-icon-alert-cancel" aria-hidden="true"></span>
|
|
43
|
-
<pre class="mt-2"><strong>XXL:</strong> 64x64</pre>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
46
|
-
<span class="qld-icon qld-icon-xl qld-icon-alert-cancel" aria-hidden="true"></span>
|
|
47
|
-
<pre class="mt-2"><strong>XL:</strong> 48x48</pre>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
50
|
-
<span class="qld-icon qld-icon-lg qld-icon-alert-cancel" aria-hidden="true"></span>
|
|
51
|
-
<pre class="mt-2"><strong>LG:</strong> 32x32</pre>
|
|
52
|
-
</div>
|
|
53
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
54
|
-
<span class="qld-icon qld-icon-md qld-icon-alert-cancel" aria-hidden="true"></span>
|
|
55
|
-
<pre class="mt-2"><strong>MD:</strong> 24x24</pre>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
58
|
-
<span class="qld-icon qld-icon-sm qld-icon-alert-cancel" aria-hidden="true"></span>
|
|
59
|
-
<pre class="mt-2"><strong>SM:</strong> 20x20</pre>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="col d-flex flex-column flex-grow-0 align-items-start">
|
|
62
|
-
<span class="qld-icon qld-icon-xs qld-icon-alert-cancel" aria-hidden="true"></span>
|
|
63
|
-
<pre class="mt-2"><strong>XS:</strong> 16x16</pre>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<h4>Usage:</h4>
|
|
68
|
-
<p>
|
|
69
|
-
Combine base class <code>qld-icon</code> with specific icon name and size class as listed here to set the icon size.
|
|
70
|
-
</p>
|
|
71
|
-
<table class="table table-responsive">
|
|
72
|
-
<thead class="table-light">
|
|
73
|
-
<tr>
|
|
74
|
-
<th scope="col">Class</th>
|
|
75
|
-
<th scope="col">REM size</th>
|
|
76
|
-
<th scope="col">Pixel size</th>
|
|
77
|
-
</tr>
|
|
78
|
-
</thead>
|
|
79
|
-
<tbody>
|
|
80
|
-
<tr>
|
|
81
|
-
<td><code>.qld-icon-xs</code></td>
|
|
82
|
-
<td><pre>1rem</pre></td>
|
|
83
|
-
<td><pre>16x16</pre></td>
|
|
84
|
-
</tr>
|
|
85
|
-
<tr>
|
|
86
|
-
<td><code>.qld-icon-sm</code></td>
|
|
87
|
-
<td><pre>1.25rem</pre></td>
|
|
88
|
-
<td><pre>20x20</pre></td>
|
|
89
|
-
</tr>
|
|
90
|
-
<tr>
|
|
91
|
-
<td><code>.qld-icon-md</code></td>
|
|
92
|
-
<td><pre>1.5rem</pre></td>
|
|
93
|
-
<td><pre>24x24</pre></td>
|
|
94
|
-
</tr>
|
|
95
|
-
<tr>
|
|
96
|
-
<td><code>.qld-icon-lg</code></td>
|
|
97
|
-
<td><pre>2rem</pre></td>
|
|
98
|
-
<td><pre>32x32</pre></td>
|
|
99
|
-
</tr>
|
|
100
|
-
<tr>
|
|
101
|
-
<td><code>.qld-icon-xl</code></td>
|
|
102
|
-
<td><pre>2.5rem</pre></td>
|
|
103
|
-
<td><pre>40x40</pre></td>
|
|
104
|
-
</tr>
|
|
105
|
-
<tr>
|
|
106
|
-
<td><code>.qld-icon-xxl</code></td>
|
|
107
|
-
<td><pre>3rem</pre></td>
|
|
108
|
-
<td><pre>48x48</pre></td>
|
|
109
|
-
</tr>
|
|
110
|
-
</tbody>
|
|
111
|
-
</table>
|
|
112
|
-
|
|
113
|
-
<h5 class="mt-5">Example code:</h5>
|
|
114
|
-
<pre>
|
|
115
|
-
<code class="language-html">
|
|
116
|
-
<span class="qld-icon qld-icon-xxl qld-icon-design" aria-hidden="true"></span>
|
|
117
|
-
<span class="qld-icon qld-icon-xl qld-icon-design" aria-hidden="true"></span>
|
|
118
|
-
<span class="qld-icon qld-icon-lg qld-icon-design" aria-hidden="true"></span>
|
|
119
|
-
<span class="qld-icon qld-icon-md qld-icon-design" aria-hidden="true"></span>
|
|
120
|
-
<span class="qld-icon qld-icon-sm qld-icon-design" aria-hidden="true"></span>
|
|
121
|
-
<span class="qld-icon qld-icon-xs qld-icon-design" aria-hidden="true"></span>
|
|
122
|
-
</code>
|
|
123
|
-
</pre>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<h1>Iconography</h1>
|
|
2
|
-
<p>The icons in QGDS can be used in multiple ways depending on your needs and environment. This guide covers the three primary methods as well as the sizing utilities:</p>
|
|
3
|
-
<ul>
|
|
4
|
-
<li><strong>Inline SVG</strong></li>
|
|
5
|
-
<li><strong>CSS utility class</strong></li>
|
|
6
|
-
<li><strong>CSS variables</strong></li>
|
|
7
|
-
</ul>
|
|
8
|
-
|
|
9
|
-
<h2>1. Inline SVG (HTML Embed)</h2>
|
|
10
|
-
<p>
|
|
11
|
-
This method allows for full control over the icon's appearance, eg: colour, size, stroke, etc. Recommended for developers and content editors embedding icons directly in HTML.<br>
|
|
12
|
-
Place the Symbol ID on to the <code><use></code> element within an <code><svg></code> tag.<br>
|
|
13
|
-
Example:
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
<svg class="qld-icon-lg" style="color: #dd0000" aria-label="Cancel alert" role="img">
|
|
17
|
-
<use href="./assets/img/icons-sprite.svg#qgds-icon-alert-cancel"></use>
|
|
18
|
-
</svg>
|
|
19
|
-
<svg class="qld-icon-lg" style="color: #ffa500" aria-label="Warning alert" role="img">
|
|
20
|
-
<use href="./assets/img/icons-sprite.svg#qgds-icon-alert-warning"></use>
|
|
21
|
-
</svg>
|
|
22
|
-
<svg class="qld-icon-lg" style="color:#00dd00" aria-label="Success alert" role="img">
|
|
23
|
-
<use href="./assets/img/icons-sprite.svg#qgds-icon-alert-success"></use>
|
|
24
|
-
</svg>
|
|
25
|
-
<pre>
|
|
26
|
-
<code class="language-html">
|
|
27
|
-
<svg class="qld-icon-lg" aria-label="Cancel alert">
|
|
28
|
-
<use href="./assets/img/icons-sprite.svg#qgds-icon-alert-cancel"></use>
|
|
29
|
-
</svg>
|
|
30
|
-
</code>
|
|
31
|
-
</pre>
|
|
32
|
-
|
|
33
|
-
<h4>Accessibility</h4>
|
|
34
|
-
<ul>
|
|
35
|
-
<li>Always include <code>role="img"</code> and <code>aria-label</code> attributes to provide context for screen readers.</li>
|
|
36
|
-
<li>Use <code>aria-hidden="true"</code> when the icon is decorative</li>
|
|
37
|
-
</ul>
|
|
38
|
-
|
|
39
|
-
<h2>2. CSS Utility Class</h2>
|
|
40
|
-
<p>
|
|
41
|
-
This method is suitable for developers who want to apply icons in their stylesheets.<br>
|
|
42
|
-
Use the <code>qld-icon</code> + <code>qld-icon-{icon-name}</code> utility class to render icons as CSS masked elements.<br>
|
|
43
|
-
Example:
|
|
44
|
-
</p>
|
|
45
|
-
|
|
46
|
-
<div>
|
|
47
|
-
<span class="qld-icon qld-icon-lg qld-icon-home" style="background-color: #00dd00;" aria-hidden="true"></span>
|
|
48
|
-
<span class="qld-icon qld-icon-lg qld-icon-search" style="background-color: #0000ff;" aria-hidden="true"></span>
|
|
49
|
-
<span class="qld-icon qld-icon-lg qld-icon-menu" style="background-color: #dd0000;" aria-hidden="true"></span>
|
|
50
|
-
</div>
|
|
51
|
-
<pre>
|
|
52
|
-
<code class="language-html">
|
|
53
|
-
<span class="qld-icon qld-icon-lg qld-icon-alert-cancel" aria-hidden="true"></span>
|
|
54
|
-
</code>
|
|
55
|
-
</pre>
|
|
56
|
-
<ul>
|
|
57
|
-
<li><code>qld-icon</code> is the base class for all icons</li>
|
|
58
|
-
<li><code>qld-icon-{icon-name}</code> is the specific icon class</li>
|
|
59
|
-
<li><code>qld-icon-{size}</code> is the size utility class (Optional, see below)</li>
|
|
60
|
-
</ul>
|
|
61
|
-
|
|
62
|
-
<h4>Accessibility</h4>
|
|
63
|
-
<ul>
|
|
64
|
-
<li>This method is for decorative only. Use <code>aria-hidden="true"</code> to hide the icon from screen readers.</li>
|
|
65
|
-
<li>Ensure to use it alongside text or other elements that provide context for screen readers users.</li>
|
|
66
|
-
</ul>
|
|
67
|
-
|
|
68
|
-
<h2>3. CSS Variables</h2>
|
|
69
|
-
<p>
|
|
70
|
-
This method allows developers to create custom styles with any CSS property that accepts a URL, such as <code>mask-image</code> and <code>background-image</code>.<br>
|
|
71
|
-
Example:
|
|
72
|
-
</p>
|
|
73
|
-
<pre>
|
|
74
|
-
<code class="language-css">
|
|
75
|
-
.mysite-icon-cancel-payment {
|
|
76
|
-
mask-image: var(--qgds-icon-alert-cancel);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.abc-icon-login {
|
|
80
|
-
background-image: var(--qgds-icon-identity);
|
|
81
|
-
}
|
|
82
|
-
</code>
|
|
83
|
-
</pre>
|
|
84
|
-
|
|
85
|
-
<h4>Accessibility</h4>
|
|
86
|
-
<ul>
|
|
87
|
-
<li>This method is for decorative only. Use <code>aria-hidden="true"</code> to hide the icon from screen readers.</li>
|
|
88
|
-
<li>Ensure to use it alongside text or other elements that provide context for screen readers users.</li>
|
|
89
|
-
</ul>
|