@qld-gov-au/qgds-bootstrap5 2.0.1 → 2.0.3

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.
Files changed (137) hide show
  1. package/.storybook/preview.js +4 -1
  2. package/dist/assets/components/bs5/accordion/accordion.hbs +3 -6
  3. package/dist/assets/components/bs5/directionLinks/directionLinks.hbs +2 -1
  4. package/dist/assets/components/bs5/head/head.hbs +1 -1
  5. package/dist/assets/components/bs5/header/header.hbs +6 -9
  6. package/dist/assets/components/bs5/navbar/navbar.hbs +21 -14
  7. package/dist/assets/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
  8. package/dist/assets/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
  9. package/dist/assets/components/bs5/pageLayout/templates/homePage.hbs +1 -1
  10. package/dist/assets/components/bs5/quickexit/quickexit.hbs +1 -1
  11. package/dist/assets/components/bs5/sidenav/sidenav.hbs +56 -37
  12. package/dist/assets/css/qld.bootstrap.css +1 -6
  13. package/dist/assets/css/qld.bootstrap.css.map +3 -3
  14. package/dist/assets/js/handlebars.init.min.js +232 -179
  15. package/dist/assets/js/handlebars.init.min.js.map +2 -2
  16. package/dist/assets/js/qld.bootstrap.min.js +5 -5
  17. package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
  18. package/dist/assets/node/handlebars.init.min.js +55 -23
  19. package/dist/assets/node/handlebars.init.min.js.map +2 -2
  20. package/dist/components/bs5/accordion/accordion.hbs +3 -6
  21. package/dist/components/bs5/directionLinks/directionLinks.hbs +2 -1
  22. package/dist/components/bs5/head/head.hbs +1 -1
  23. package/dist/components/bs5/header/header.hbs +6 -9
  24. package/dist/components/bs5/navbar/navbar.hbs +21 -14
  25. package/dist/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
  26. package/dist/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
  27. package/dist/components/bs5/pageLayout/templates/homePage.hbs +1 -1
  28. package/dist/components/bs5/quickexit/quickexit.hbs +1 -1
  29. package/dist/components/bs5/sidenav/sidenav.hbs +56 -37
  30. package/dist/package.json +2 -4
  31. package/dist/sample-data/accordion/accordion.data.json +24 -23
  32. package/dist/sample-data/navbar/navbar.data.json +91 -25
  33. package/dist/sample-data/pagination/pagination.data.json +19 -19
  34. package/dist/sample-data/sidenav/sidenav.data.json +81 -80
  35. package/package.json +2 -4
  36. package/src/components/bs5/accordion/Accordion.mdx +34 -12
  37. package/src/components/bs5/accordion/__snapshots__/accordion.test.js.snap +3 -6
  38. package/src/components/bs5/accordion/accordion.data.json +24 -23
  39. package/src/components/bs5/accordion/accordion.hbs +3 -6
  40. package/src/components/bs5/accordion/accordion.scss +19 -9
  41. package/src/components/bs5/accordion/accordion.stories.js +8 -0
  42. package/src/components/bs5/accordion/accordion.test.js +5 -0
  43. package/src/components/bs5/accordion/mdx/_designResources.mdx +6 -0
  44. package/src/components/bs5/accordion/mdx/_usageInstructions.mdx +10 -0
  45. package/src/components/bs5/backToTop/backToTop.mdx +4 -5
  46. package/src/components/bs5/banner/Banner.mdx +1 -3
  47. package/src/components/bs5/blockquote/Blockquote.mdx +4 -5
  48. package/src/components/bs5/blockquote/blockquote.scss +47 -7
  49. package/src/components/bs5/breadcrumbs/Breadcrumbs.mdx +1 -3
  50. package/src/components/bs5/button/Button.mdx +4 -5
  51. package/src/components/bs5/button/button.scss +13 -1
  52. package/src/components/bs5/callToAction/callToAction.mdx +1 -3
  53. package/src/components/bs5/callout/Callout.mdx +4 -5
  54. package/src/components/bs5/card/Card.mdx +1 -3
  55. package/src/components/bs5/card/card.scss +1 -25
  56. package/src/components/bs5/directionLinks/DirectionLinks.mdx +4 -5
  57. package/src/components/bs5/directionLinks/directionLinks.hbs +2 -1
  58. package/src/components/bs5/directionLinks/directionLinks.scss +27 -80
  59. package/src/components/bs5/directionLinks/directionLinks.stories.js +7 -14
  60. package/src/components/bs5/footer/Footer.mdx +1 -3
  61. package/src/components/bs5/footer/footer.scss +4 -11
  62. package/src/components/bs5/formcheck/stories/checkbox/Checkbox.mdx +7 -6
  63. package/src/components/bs5/formcheck/stories/radio/Radio.mdx +7 -6
  64. package/src/components/bs5/globalAlert/GlobalAlert.mdx +1 -3
  65. package/src/components/bs5/globalAlert/globalAlert.scss +6 -0
  66. package/src/components/bs5/header/Header.mdx +1 -3
  67. package/src/components/bs5/header/header.hbs +6 -9
  68. package/src/components/bs5/header/header.scss +6 -2
  69. package/src/components/bs5/icons/Icons.mdx +167 -7
  70. package/src/components/bs5/icons/_icons.sizes.scss +9 -0
  71. package/src/components/bs5/icons/icons.scss +23 -71
  72. package/src/components/bs5/icons/icons.stories.js +34 -57
  73. package/src/components/bs5/icons/mdx/_IconsSizes.mdx +112 -0
  74. package/src/components/bs5/icons/stories/storyFlexContainer.html +18 -0
  75. package/src/components/bs5/icons/stories/storyInlineWithText.html +18 -0
  76. package/src/components/bs5/icons/stories/storySizes.html +89 -0
  77. package/src/components/bs5/image/Image.mdx +1 -4
  78. package/src/components/bs5/inpageAlert/InpageAlert.mdx +1 -3
  79. package/src/components/bs5/inpagenav/Inpagenav.mdx +4 -5
  80. package/src/components/bs5/inpagenav/inpagenav.scss +7 -3
  81. package/src/components/bs5/link/link.mdx +1 -3
  82. package/src/components/bs5/link/link.scss +2 -15
  83. package/src/components/bs5/linkColumns/linkColumns.mdx +1 -3
  84. package/src/components/bs5/logo/Logo.mdx +1 -3
  85. package/src/components/bs5/navbar/navbar.data.json +91 -25
  86. package/src/components/bs5/navbar/navbar.functions.js +4 -0
  87. package/src/components/bs5/navbar/navbar.hbs +21 -14
  88. package/src/components/bs5/navbar/navbar.scss +219 -166
  89. package/src/components/bs5/navbar/navbar.stories.js +31 -2
  90. package/src/components/bs5/pageLayout/ThemeShowcase.stories.js +249 -0
  91. package/src/components/bs5/pageLayout/pageLayout.stories.js +3 -1
  92. package/src/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
  93. package/src/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
  94. package/src/components/bs5/pageLayout/templates/homePage.hbs +1 -1
  95. package/src/components/bs5/pagination/Pagination.mdx +4 -5
  96. package/src/components/bs5/pagination/pagination.data.json +19 -19
  97. package/src/components/bs5/pagination/pagination.scss +37 -63
  98. package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +1 -3
  99. package/src/components/bs5/promotionalPanel/promotionalPanel.scss +23 -22
  100. package/src/components/bs5/quickexit/quickexit.functions.js +24 -37
  101. package/src/components/bs5/quickexit/quickexit.hbs +1 -1
  102. package/src/components/bs5/quickexit/quickexit.scss +27 -10
  103. package/src/components/bs5/searchInput/SearchInput.mdx +5 -5
  104. package/src/components/bs5/sidenav/Sidenav.mdx +4 -5
  105. package/src/components/bs5/sidenav/sidenav.data.json +81 -80
  106. package/src/components/bs5/sidenav/sidenav.hbs +56 -37
  107. package/src/components/bs5/sidenav/sidenav.scss +236 -151
  108. package/src/components/bs5/skiplinks/SkipLinks.mdx +1 -3
  109. package/src/components/bs5/skiplinks/skipLinks.functions.js +0 -9
  110. package/src/components/bs5/skiplinks/skipLinks.test.js +0 -1
  111. package/src/components/bs5/table/Table.mdx +4 -5
  112. package/src/components/bs5/tabs/Tabs.mdx +4 -5
  113. package/src/components/bs5/tabs/tabs.scss +22 -1
  114. package/src/components/bs5/tag/Tag.mdx +4 -5
  115. package/src/components/bs5/typography/Typography.mdx +4 -5
  116. package/src/components/bs5/video/Video.mdx +4 -5
  117. package/src/components/common/layout/container.scss +5 -0
  118. package/src/components/common/layout/content.scss +16 -8
  119. package/src/css/functions/_index.scss +1 -0
  120. package/src/css/functions/in-list.scss +5 -0
  121. package/src/css/main.scss +4 -10
  122. package/src/css/mixins/_index.scss +3 -0
  123. package/src/css/mixins/make-icon.scss +87 -0
  124. package/src/css/qld-theme.scss +74 -31
  125. package/src/css/qld-type.scss +26 -140
  126. package/src/css/qld-utilities.scss +29 -14
  127. package/src/css/qld-variables.scss +4 -4
  128. package/src/css/utilities/_index.scss +1 -0
  129. package/src/css/utilities/sr-only.scss +5 -0
  130. package/src/css/variables/_index.scss +1 -0
  131. package/src/css/variables/type.scss +58 -0
  132. package/src/js/qld.bootstrap.js +1 -9
  133. package/src/stories/documentation/_storybookDocsTabs.jsx +63 -0
  134. package/src/stories/documentation/storybook-documentation.scss +51 -0
  135. package/src/components/bs5/icons/story-icon-sizing.html +0 -131
  136. package/src/components/bs5/icons/story-icon-usage.html +0 -89
  137. package/src/components/bs5/pagination/health-icon-sprite.svg +0 -156
package/src/css/main.scss CHANGED
@@ -19,11 +19,6 @@ $font-family-sans-serif:
19
19
  "Noto Color Emoji" !default;
20
20
  $font-family-sitename: "Fira Sans";
21
21
 
22
- //Icons
23
- @import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.css");
24
- //TODO: should we pull from ../../node_modules/@fortawesome/fontawesome-free/css/all.css instead of cdn
25
- @import "../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss";
26
-
27
22
  //Prefix to namespace design-system classes
28
23
  $prefix: "qld-";
29
24
  $enable-cssgrid: true;
@@ -37,8 +32,7 @@ $enable-dark-mode: true;
37
32
 
38
33
  // 2. QLD Design System variables (Bootstrap overrides)
39
34
  @import "./qld-variables";
40
-
41
- // @import "./scss/qld-variables-dark"; //future state
35
+ @import "variables";
42
36
 
43
37
  // 3. Include remainder of bootstrap
44
38
  // 3.1 Required
@@ -88,6 +82,9 @@ $enable-dark-mode: true;
88
82
  // 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss`
89
83
  @import "../../node_modules/bootstrap/scss/utilities/api";
90
84
 
85
+ // Themes
86
+ @import "qld-theme";
87
+
91
88
  //8. QLD Design System typography (bootstrap overrides and custom). Please maintain naming consistency.
92
89
  @import "./qld-type";
93
90
 
@@ -136,8 +133,5 @@ $enable-dark-mode: true;
136
133
  // Custom utility classes
137
134
  @import "utilities";
138
135
 
139
- // Themes
140
- @import "qld-theme";
141
-
142
136
  // Print
143
137
  @import "qld-print";
@@ -1,4 +1,7 @@
1
1
  @forward "focusable";
2
2
  @forward "generate-color-vars";
3
+ @forward "make-icon" with (
4
+ $prefix: "qld-"
5
+ );
3
6
  @forward "register-vars";
4
7
  @forward "unset-button-styles";
@@ -0,0 +1,87 @@
1
+ @use "sass:list";
2
+ @use "sass:map";
3
+ @use "../../components/bs5/icons/icons.list" as *;
4
+ @use "../../components/bs5/icons/icons-multicolours.list" as *;
5
+ @use "../../components/bs5/icons/icons.sizes" as *;
6
+ @use "../functions" as f;
7
+
8
+ $prefix: "qld-" !default;
9
+
10
+ ///
11
+ /// @param {String} $name [null] - The name of icon
12
+ /// @param {String} $size ["sm"] - The icon size, valid values are "xs" | "sm" | "md" | "lg" | "xl" | "xxl"
13
+ /// @param {String | null} $pseudo [null] - Whether the mixin applies styles as a pseudo-element. Valid string values are "before" | "after"
14
+ /// @param {false} $is-inline - Applies extra styles to assist with vertical alignent when used inline with text.
15
+ /// @param {Boolean} $include-base [true] - Apply all base styles. Set to false when reusing this mixin to create modifier classes where base styles are already applied (For instance qld-icon-{name})
16
+ @mixin make-icon(
17
+ $name: null,
18
+ $size: "sm",
19
+ $pseudo: null,
20
+ $is-inline: false,
21
+ $include-base: true
22
+ ) {
23
+ // validate $name
24
+ @if ($name and not f.in-list($name, $icon-names)) {
25
+ @error "Invalid parameter $name: " + $name;
26
+ }
27
+ // validate $include-base
28
+ @if (not $name and not $include-base and not $is-inline) {
29
+ @error "Must include either $name or $include-base or $is-inline";
30
+ }
31
+
32
+ //validate size
33
+ @if (not map.get($icon-sizes, $size)) {
34
+ @error "Invalid parameter $size. Use one of " + map.keys($icon-sizes);
35
+ }
36
+
37
+ // validate $pseudo
38
+ @if (not list.index(("before", "after", null), $pseudo)) {
39
+ @error 'Invalid $pseudo value, can only be "before", "after" or null';
40
+ }
41
+
42
+ @if $pseudo {
43
+ &::#{$pseudo} {
44
+ content: "";
45
+ // recursively call this mixin with $pseudo set to null
46
+ @include make-icon($name, $size, null, $is-inline, $include-base);
47
+ }
48
+ } @else {
49
+ @if $include-base {
50
+ --_icon-size: var(--icon-size, #{map.get($icon-sizes, $size)});
51
+ display: inline-block;
52
+ width: var(--_icon-size);
53
+ height: var(--_icon-size);
54
+ background-position: center center;
55
+ background-repeat: no-repeat;
56
+ mask-position: center center;
57
+ mask-repeat: no-repeat;
58
+ mask-size: contain;
59
+ background-size: contain;
60
+ vertical-align: middle;
61
+
62
+ // What's going on here?
63
+ // These styles unify svg and mask-image implementations
64
+ // Color is the property we can share across both, since we can apply currentColor to backgroundColor.
65
+ // Preferred API to set color on icons is via --qld-icon-color property.
66
+ // This is not set intentionally by default, so we can inherit --qld-action-icon-color from palette context.
67
+ // Final fallback to inherit in case these go wrong.
68
+ color: var(--#{$prefix}icon-color, var(--qld-action-icon-color, inherit));
69
+ background-color: currentColor;
70
+ }
71
+ @if $is-inline {
72
+ vertical-align: baseline;
73
+ position: relative;
74
+ top: calc(calc(var(--_icon-size) / 2) - 0.5cap);
75
+ }
76
+ @if $name {
77
+ @if f.in-list($name, $icons-multicolour) {
78
+ background-image: var(--qgds-icon-#{$name});
79
+ -webkit-background-image: var(--qgds-icon-#{$name});
80
+ background-color: transparent;
81
+ } @else {
82
+ mask-image: var(--qgds-icon-#{$name});
83
+ -webkit-mask-image: var(--qgds-icon-#{$name});
84
+ }
85
+ }
86
+ }
87
+ }
@@ -1,44 +1,87 @@
1
- // Dark mode.
2
- // Note that you can't read custom variables into media queries (as at Sep 2023).
3
- // Example: "background: var(--theme-background);"
1
+ // QLD Theme Palette Classes
2
+ // Provides complete theme styling including color, background-color, and CSS variables
4
3
 
5
- // However, you can set them, however:
6
- // example: --theme-background: #000;
7
-
8
- //You can also fall back to SASS variable to set at compile time.
9
-
10
- @include color-mode(dark) {
11
- :root {
12
- --#{$prefix}body-bg: var(--qld-brand-primary-dark);
13
- --#{$prefix}body-color: #FFF;
14
- --#{$prefix}heading-color: #FFF;
15
- --#{$prefix}link-color: #FFF;
16
- --#{$prefix}link-hover-color: var(--qld-brand-accent);
17
- }
4
+ // Theme properties mixins to avoid duplication
5
+ @mixin light-theme-properties {
6
+ background-color: var(--qld-body-bg);
7
+ color: var(--qld-body-color);
8
+ --qld-action-icon-color: var(--qld-light-action-secondary);
9
+ --qld-action-icon-hover-color: var(--qld-light-action-secondary-hover);
10
+ --qld-body-color: #{$body-color};
11
+ --qld-body-font-weight: #{$body-font-weight};
12
+ --qld-focus-color: var(--qld-light-focus);
13
+ --qld-headings-color: #{$headings-color};
14
+ --qld-link-color: #{$link-color};
15
+ --qld-link-color-rgb: #{to-rgb($link-color)};
16
+ --qld-link-font-weight: 400;
17
+ --qld-link-hover-color: var(--qld-link-color);
18
+ --qld-link-hover-color-rgb: var(--qld-link-color-rgb);
19
+ --qld-link-underline: #{$color-default-color-light-underline-default};
20
+ --qld-link-underline-hover: #{$color-default-color-light-underline-default-hover};
21
+ --qld-link-underline-offset: 0.3rem;
22
+ --qld-link-underline-thickness: 0.5px;
23
+ --qld-link-underline-thickness-hover: 2px;
24
+ --qld-link-underline-visited: #{$color-default-color-light-underline-visited};
25
+ --qld-link-underline-visited-hover: #{$color-default-color-light-underline-visited-hover};
26
+ --qld-selection-bg: var(--qld-brand-primary);
27
+ --qld-selection-color: var(--qld-white);
28
+ }
18
29
 
19
- //...etc
30
+ @mixin dark-theme-properties {
31
+ background-color: var(--qld-body-bg);
32
+ color: var(--qld-body-color);
33
+ --qld-action-icon-color: var(--qld-dark-action-secondary);
34
+ --qld-action-icon-hover-color: var(--qld-dark-action-secondary-hover);
35
+ --qld-body-color: #fff;
36
+ --qld-focus-color: var(--qld-dark-focus);
37
+ --qld-headings-color: #fff;
38
+ --qld-link-color: #fff;
39
+ --qld-link-color-rgb: 255, 255, 255;
40
+ --qld-link-hover-color: #fff;
41
+ --qld-link-hover-color-rgb: 255, 255, 255;
42
+ --qld-link-visited: var(--qld-link-visited-dark);
43
+ --qld-selection-bg: var(--qld-white);
44
+ --qld-selection-color: var(--qld-brand-primary);
20
45
  }
21
46
 
47
+ // Default theme (inherits :root variables) and root variables
48
+ :root,
49
+ .default {
50
+ @include light-theme-properties;
51
+ --qld-body-bg: var(--qld-default-background);
52
+ --qld-border-color: var(--qld-light-border);
53
+ }
22
54
 
55
+ // Light theme
23
56
  .light {
24
- background: var(--#{$prefix}light-background);
57
+ @include light-theme-properties;
58
+ --qld-body-bg: var(--qld-light-background);
59
+ --qld-border-color: var(--#{$prefix}color-default-color-light-border-light);
25
60
  }
26
61
 
62
+ // Alt theme (light alternative)
27
63
  .alt {
28
- background: var(--#{$prefix}light-alt-background);
64
+ @include light-theme-properties;
65
+ --qld-body-bg: var(--qld-light-alt-background);
66
+ --qld-border-color: var(--qld-soft-grey);
29
67
  }
30
68
 
31
- .bg-default { background-color: var(--qld-default-background); }
32
- .bg-default-shade { background-color: var(--qld-default-background-shade); }
33
-
34
- .bg-light { background-color: var(--qld-light-background); }
35
- .bg-light-shade { background-color: var(--qld-light-background-shade); }
36
-
37
- .bg-light-alt { background-color: var(--qld-light-alt-background); }
38
- .bg-light-alt-shade { background-color: var(--qld-light-alt-background-shade); }
69
+ // Dark theme
70
+ .dark {
71
+ @include dark-theme-properties;
72
+ --qld-body-bg: var(--qld-dark-background);
73
+ --qld-border-color: var(--qld-dark-border);
74
+ }
39
75
 
40
- .bg-dark { background-color: var(--qld-dark-background); }
41
- .bg-dark-shade { background-color: var(--qld-dark-background-shade); }
76
+ // Dark alt theme
77
+ .dark-alt {
78
+ @include dark-theme-properties;
79
+ --qld-body-bg: var(--qld-dark-alt-background);
80
+ --qld-border-color: var(--qld-dark-alt-border);
81
+ }
42
82
 
43
- .bg-dark-alt { background-color: var(--qld-dark-alt-background); }
44
- .bg-dark-alt-shade { background-color: var(--qld-dark-alt-background-shade); }
83
+ // Bootstrap dark mode support
84
+ :root[data-bs-theme="dark"] {
85
+ @include dark-theme-properties;
86
+ --qld-body-bg: var(--qld-brand-primary);
87
+ }
@@ -1,125 +1,4 @@
1
- //Typography
2
- $font-family-sans-serif: "Noto Sans",
3
- system-ui,
4
- -apple-system,
5
- "Segoe UI",
6
- Roboto,
7
- "Helvetica Neue",
8
- "Noto Sans",
9
- "Liberation Sans",
10
- Arial,
11
- sans-serif,
12
- "Apple Color Emoji",
13
- "Segoe UI Emoji",
14
- "Segoe UI Symbol",
15
- "Noto Color Emoji" !default;
16
-
17
- // Override Bootstrap font variables
18
- $font-weight-base: 400;
19
- $font-weight-bold: 600;
20
- $font-weight-bolder: 900;
21
-
22
- // Apply custom font weights to Bootstrap's utility classes
23
- $font-weights: (
24
- normal: 400,
25
- bold: 600,
26
- bolder: 900
27
- );
28
-
29
- $body-color: $qld-text-grey;
30
- $body-font-weight: 400;
31
- $font-size-base: 1rem;
32
-
33
- // https: //www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=58880-54175&t=35PGuqUnIyLmf28d-0
34
- // Headings font weight and line height
35
- $headings-font-weight: 600;
36
- $headings-line-height: 1.3;
37
-
38
- // Headings font sizes
39
- $h1-font-size: $font-size-base * 2.5;
40
- $h2-font-size: $font-size-base * 2;
41
- $h3-font-size: $font-size-base * 1.5;
42
- $h4-font-size: $font-size-base * 1.25;
43
- $h5-font-size: $font-size-base * 1;
44
- $h6-font-size: $font-size-base * 0.875;
45
-
46
- // < 991 Mobile Tablet font sizes and line heights
47
- $h1-font-size-mobile: $font-size-base * 2; // 32
48
- $h2-font-size-mobile: $font-size-base * 1.75; // 28
49
- $h1-line-height-mobile: 1.25; //40
50
- $h2-line-height-mobile: 1.285; //36
51
-
52
- $headings-color: $qld-text-headings;
53
- $qld-heading-color: $core-default-color-brand-primary-light-green;
54
-
55
-
56
- $link-color: $qld-brand-primary;
57
- $link-hover-color: $qld-brand-primary;
58
- $link-visited-color: $qld-link-visited;
59
-
60
- //Links
61
- .default,
62
- .light,
63
- .alt,
64
- :root {
65
- --qld-headings-color: #{$headings-color};
66
- --qld-body-color: #{$body-color};
67
- --qld-body-font-weight: #{$body-font-weight};
68
- --qld-link-font-weight: 400;
69
- --qld-link-color: #{$link-color};
70
- --qld-link-color-rgb: #{to-rgb($link-color)};
71
- --qld-link-hover-color: var(--qld-link-color);
72
- --qld-link-hover-color-rgb: var(--qld-link-color-rgb);
73
- --qld-link-underline-offset: 0.3rem;
74
- --qld-link-underline-thickness: 0.5px;
75
- --qld-link-underline-thickness-hover: 2px;
76
- --qld-link-underline: #{$color-default-color-light-underline-default};
77
- --qld-link-underline-hover: #{$color-default-color-light-underline-default-hover};
78
- --qld-link-underline-visited: #{$color-default-color-light-underline-visited};
79
- --qld-link-underline-visited-hover: #{$color-default-color-light-underline-visited-hover};
80
- --qld-selection-color: var(--qld-white);
81
- --qld-selection-bg: var(--qld-brand-primary);
82
- --qld-focus-color: var(--qld-light-focus);
83
- --qld-action-icon-color: var(--qld-light-action-secondary);
84
- --qld-action-icon-hover-color: var(--qld-light-action-secondary-hover);
85
- }
86
-
87
- .dark,
88
- .dark-alt,
89
- :root[data-bs-theme="dark"] {
90
- --qld-headings-color: #fff;
91
- --qld-body-color: #fff;
92
- --qld-body-bg: var(--qld-brand-primary);
93
- --qld-link-color: #fff;
94
- --qld-link-color-rgb: 255, 255, 255;
95
- --qld-link-hover-color: #fff;
96
- --qld-link-hover-color-rgb: 255, 255, 255;
97
- --qld-link-visited: var(--qld-link-visited-dark);
98
- --qld-selection-color: var(--qld-brand-primary);
99
- --qld-selection-bg: var(--qld-white);
100
- --qld-focus-color: var(--qld-dark-focus);
101
- --qld-action-icon-color: var(--qld-dark-action-secondary);
102
- --qld-action-icon-hover-color: var(--qld-dark-action-secondary-hover);
103
- }
104
-
105
- .default {
106
- --qld-border-color: var(--qld-light-border);
107
- }
108
- .light {
109
- --qld-border-color: var(--#{$prefix}color-default-color-light-border-light);
110
- }
111
- .alt {
112
- --qld-body-bg: var(--qld-light-alt-background);
113
- --qld-border-color: var(--qld-soft-grey);
114
- }
115
- .dark {
116
- --qld-border-color: var(--qld-dark-border);
117
- }
118
- .dark-alt {
119
- --qld-body-bg: var(--qld-dark-alt-background);
120
- --qld-border-color: var(--qld-dark-alt-border);
121
- }
122
-
1
+ //Links - default root variables moved to qld-theme.scss
123
2
 
124
3
  //Content and links
125
4
  body {
@@ -127,7 +6,6 @@ body {
127
6
  }
128
7
 
129
8
  .qld-content-body {
130
-
131
9
  p {
132
10
  margin-bottom: 1.25rem;
133
11
  }
@@ -141,7 +19,6 @@ body {
141
19
  li {
142
20
  margin-top: 0.5rem;
143
21
  }
144
-
145
22
  }
146
23
 
147
24
  // Apply correct bold font-weight
@@ -164,7 +41,6 @@ dt {
164
41
  font-weight: $font-weight-bold;
165
42
  }
166
43
 
167
-
168
44
  // Definition list
169
45
  dt {
170
46
  margin-top: 0.5rem;
@@ -182,10 +58,8 @@ dl.qld-content-dates {
182
58
  dd {
183
59
  margin-top: 0.5rem;
184
60
  }
185
-
186
61
  }
187
62
 
188
-
189
63
  // Light, Light alt
190
64
 
191
65
  h1,
@@ -197,26 +71,32 @@ h6 {
197
71
  color: var(--#{$prefix}color-default-color-light-text-heading);
198
72
  }
199
73
 
200
-
201
-
202
74
  a,
203
75
  a.nav-link {
204
76
  text-underline-offset: var(--qld-link-underline-offset);
205
77
  text-decoration-thickness: var(--qld-link-underline-thickness);
206
- text-decoration-color: var(--#{$prefix}color-default-color-light-underline-default);
78
+ text-decoration-color: var(
79
+ --#{$prefix}color-default-color-light-underline-default
80
+ );
207
81
 
208
82
  &:hover {
209
83
  text-decoration-thickness: var(--qld-link-underline-thickness-hover);
210
- text-decoration-color: var(--#{$prefix}color-default-color-light-underline-default-hover);
84
+ text-decoration-color: var(
85
+ --#{$prefix}color-default-color-light-underline-default-hover
86
+ );
211
87
  }
212
88
 
213
89
  &:visited {
214
90
  color: var(--#{$prefix}color-default-color-light-link-visited);
215
- text-decoration-color: var(--#{$prefix}color-default-color-light-underline-visited);
91
+ text-decoration-color: var(
92
+ --#{$prefix}color-default-color-light-underline-visited
93
+ );
216
94
 
217
95
  &:hover {
218
96
  text-decoration-thickness: var(--qld-link-underline-thickness-hover);
219
- text-decoration-color: var(--#{$prefix}color-default-color-light-underline-visited-hover);
97
+ text-decoration-color: var(
98
+ --#{$prefix}color-default-color-light-underline-visited-hover
99
+ );
220
100
  }
221
101
  }
222
102
 
@@ -232,10 +112,9 @@ figure > figcaption {
232
112
  line-height: 20px;
233
113
  }
234
114
 
235
- // Dark, dark alt
115
+ // Theme-specific typography styles
236
116
  .dark,
237
117
  .dark-alt {
238
-
239
118
  h1,
240
119
  h2,
241
120
  h3,
@@ -244,25 +123,32 @@ figure > figcaption {
244
123
  h6 {
245
124
  color: var(--#{$prefix}color-default-color-dark-text-heading);
246
125
  }
126
+
247
127
  body & {
248
128
  color: var(--qld-body-color);
249
129
  }
130
+
250
131
  a,
251
132
  a.nav-link {
252
- text-decoration-color: var(--#{$prefix}color-default-color-dark-underline-default);
133
+ text-decoration-color: var(
134
+ --#{$prefix}color-default-color-dark-underline-default
135
+ );
253
136
 
254
137
  &:visited {
255
138
  color: var(--#{$prefix}color-default-color-dark-link-visited);
256
- text-decoration-color: var(--#{$prefix}color-default-color-dark-underline-visited);
139
+ text-decoration-color: var(
140
+ --#{$prefix}color-default-color-dark-underline-visited
141
+ );
257
142
 
258
143
  &:hover {
259
- text-decoration-color: var(--#{$prefix}color-default-color-dark-underline-default-hover);
144
+ text-decoration-color: var(
145
+ --#{$prefix}color-default-color-dark-underline-default-hover
146
+ );
260
147
  }
261
148
  }
262
149
  }
263
150
  }
264
151
 
265
-
266
152
  a.nostyle {
267
153
  text-decoration: unset;
268
154
  text-underline-offset: unset;
@@ -282,4 +168,4 @@ a.nostyle {
282
168
  color: var(--qld-selection-color);
283
169
  background: var(--qld-selection-bg);
284
170
  text-shadow: none;
285
- }
171
+ }
@@ -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
- property: width,
10
- class: w,
11
- responsive: true,
12
- values: (
13
- 25: 25%,
14
- 50: 50%,
15
- 75: 75%,
16
- 100: 100%
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);
@@ -1 +1,2 @@
1
1
  @import "responsive-visually-hidden";
2
+ @import "sr-only";
@@ -0,0 +1,5 @@
1
+ ///
2
+ /// Screen reader only utility - hides content visually while keeping it accessible to screen readers
3
+ .sr-only {
4
+ @include visually-hidden();
5
+ }
@@ -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;