-{{/each}}
-
-{{#each model.font as |value property|}}
-
{{capitalize @key}}
-
-
-
-
-
-
-
Class
-
-
-
Description
-
-
- {{#each this}}
-
-
-
nsw-{{this}}
-
-
-
Applies {{this}} font size to element
-
-
- {{/each}}
-
-
-
-
-{{/each}}
-
-{{#each model.border as |value property|}}
-
{{capitalize @key}}
-
-
-
-
-
-
-
Class
-
-
-
Description
-
-
- {{#each this}}
-
-
-
nsw-border--{{@key}}
-
-
-
Applies {{this}} Brand Accent border to element
-
-
- {{/each}}
-
-
-
-
-{{/each}}
-
-
-
Box shadow
-
-
-
-
-
-
-
-
Class
-
-
-
-
-
Description
-
-
-
-
-
-
nsw-box-shadow
-
-
-
Applies box-shadow to element
-
-
-
-
-
-
-
-
Viewport Visibility
-
Grid classes give you the option to show or hide elements in certain breakpoints. For example, displaying an image on a large screen when it supports the content, but hiding it on a small screen when it hinders the users access to information.
-
The classes are named using the format nsw-{display}-{breakpoint}
-
Where breakpoint is one of xs, sm, md, lg, xl.
-
Where display is one of:
-
-
show - displays the elements
-
hide - hides the elements
-
-
-
Showing
-{{#>_docs-example separated="true"}}
-
-
This text is only visible in large breakpoint and up
-
-{{/_docs-example}}
-
-
Hiding
-{{#>_docs-example separated="true"}}
-
-
This text is only visible from large breakpoint and lower
diff --git a/src/docs/content/utilities/borders.hbs b/src/docs/content/utilities/borders.hbs
index f1099a23..cffc4cda 100644
--- a/src/docs/content/utilities/borders.hbs
+++ b/src/docs/content/utilities/borders.hbs
@@ -1,24 +1,40 @@
---
title: Borders
width: narrow
-intro:
+intro: Utilities for controlling the border radius, width, style and the color of an element's borders.
no-blank: true
order: 2
model: json/utilities.json
-meta-description:
+meta-description: Utilities for controlling the border radius, width, style and the color of an element's borders.
meta-index: true
---
-
+
+ {{/each}}
+{{/_docs-code}}
\ No newline at end of file
diff --git a/src/docs/content/utilities/text.hbs b/src/docs/content/utilities/text.hbs
index 67468045..b02ed4e1 100644
--- a/src/docs/content/utilities/text.hbs
+++ b/src/docs/content/utilities/text.hbs
@@ -1,11 +1,11 @@
---
title: Text
width: narrow
-intro:
+intro: Documentation and examples for common text utilities to control alignment, wrapping, weight, and more.
no-blank: true
order: 14
model: json/utilities.json
-meta-description:
+meta-description: Documentation and examples for common text utilities to control alignment, wrapping, weight, and more.
meta-index: true
---
diff --git a/src/docs/content/utilities/vertical-align.hbs b/src/docs/content/utilities/vertical-align.hbs
index 9c7dfd09..ed31e7f5 100644
--- a/src/docs/content/utilities/vertical-align.hbs
+++ b/src/docs/content/utilities/vertical-align.hbs
@@ -1,11 +1,11 @@
---
title: Vertical align
width: narrow
-intro:
+intro: Easily change the vertical alignment of inline, inline-block, inline-table, and table cell elements.
no-blank: true
order: 15
model: json/utilities.json
-meta-description:
+meta-description: Easily change the vertical alignment of inline, inline-block, inline-table, and table cell elements.
meta-index: true
---
diff --git a/src/docs/content/utilities/vertical-rule.hbs b/src/docs/content/utilities/vertical-rule.hbs
index 9c747e6e..1475f097 100644
--- a/src/docs/content/utilities/vertical-rule.hbs
+++ b/src/docs/content/utilities/vertical-rule.hbs
@@ -1,11 +1,11 @@
---
title: Vertical rule
width: narrow
-intro:
+intro: Use the custom vertical rule helper to create vertical dividers like the element.
no-blank: true
order: 16
model: json/utilities.json
-meta-description:
+meta-description: Use the custom vertical rule helper to create vertical dividers like the element.
meta-index: true
---
diff --git a/src/docs/content/utilities/visibility.hbs b/src/docs/content/utilities/visibility.hbs
index 00aaae31..c9deb00f 100644
--- a/src/docs/content/utilities/visibility.hbs
+++ b/src/docs/content/utilities/visibility.hbs
@@ -1,24 +1,25 @@
---
title: Visibility
width: narrow
-intro:
+intro: Control the visibility of elements, without modifying their display, with visibility utilities.
no-blank: true
order: 17
model: json/utilities.json
-meta-description:
+meta-description: Control the visibility of elements, without modifying their display, with visibility utilities.
meta-index: true
---
-{{#>_docs-example}}
- {{#each model.colours as |value property|}}
- {{#each this}}
-
Visually hide an element while still allowing it to be exposed to assistive technologies (such as screen readers) with .visually-hidden. Use .visually-hidden-focusable to visually hide an element by default, but to display it when it’s focused (e.g. by a keyboard-only user). .visually-hidden-focusable can also be applied to a container–thanks to :focus-within, the container will be displayed when any child element of the container receives focus.
+
+{{#>_docs-code open=true}}
+
+
+{{/_docs-code}}
\ No newline at end of file
diff --git a/src/docs/content/utilities/z-index.hbs b/src/docs/content/utilities/z-index.hbs
index e3180fa4..ab395014 100644
--- a/src/docs/content/utilities/z-index.hbs
+++ b/src/docs/content/utilities/z-index.hbs
@@ -1,24 +1,55 @@
---
title: Z-index
width: narrow
-intro:
+intro: Utilities for controlling the stack order of an element.
no-blank: true
order: 18
model: json/utilities.json
-meta-description:
+meta-description: Utilities for controlling the stack order of an element.
meta-index: true
---
-
+
Setting the z-index
+
Control the stack order (or three-dimensional positioning) of an element, regardless of order it has been displayed, using the z-{index} utilities.
There are special occasions on NSW public holidays. Australia Day is January 26. The national day celebrates Australia’s diversity and achievements. The main stage is Sydney Harbour, one of the world’s great natural harbours. A lovely way to enjoy the waterway is on a ferry or harbour cruise.
Spacing is recommended using an 8-pixel grid to create a consistent visual structure. There are also pre-set responsive spacing units that can be used to create consistent spacing relationships across breakpoints.
-
-
-
-
-
-
-
Spacing token
-
0 - 767px
-
68px +
-
-
-
xs
-
4px
-
8px
-
-
-
sm
-
8px
-
16px
-
-
-
md
-
16px
-
32px
-
-
-
lg
-
2px
-
48px
-
-
-
xl
-
32px
-
64px
-
-
-
xxl
-
40px
-
80px
-
-
-
-
-
-
-
Spacing helper classes
-
Add responsive margin or padding values to entire element or its sides with shorthand classes.
-
The classes are named using the format nsw-{property}-{sides}-{size}.
-
Where property is one of:
-
-
m - for classes that set margin
-
p - for classes that set padding
-
-
Where sides is one of:
-
-
top - for classes that set margin-top or padding-top
-
bottom - for classes that set margin-bottom or padding-bottom
-
left - for classes that set margin-left or padding-left
-
right - for classes that set margin-right or padding-right
-
x - for classes that set margin or padding on both left and right
-
y - for classes that set margin or padding on both top and bottom
-
blank - for classes that set a margin or padding on all 4 sides of the element
-
-
Where size is one of the responsive spacing tokens: xs, sm, md, lg, xl, xxl
-{{/_docs-example}}
diff --git a/src/core/spacing/index.hbs b/src/core/spacing/index.hbs
deleted file mode 100644
index 06d7efa5..00000000
--- a/src/core/spacing/index.hbs
+++ /dev/null
@@ -1,93 +0,0 @@
----
-title: Spacing
-order: 60
-no-blank: true
-directory: spacing
-intro: A defined set of spacing units provides good alignment and consistent spacing relationships in components and layout.
-meta-description: The NSW Design System defined set of spacing units for alignment and consistent spacing relationships in components and layout.
-meta-index: true
----
-
-
Responsive spacing
-
Spacing is recommended using an 8-pixel grid with pre-set responsive spacing units that can be used to create consistent spacing relationships across breakpoints.
-
-
-
-
-
-
Spacing token
-
0 - 767px
-
768px +
-
-
-
xs
-
4px
-
8px
-
-
-
sm
-
8px
-
16px
-
-
-
md
-
16px
-
32px
-
-
-
lg
-
24px
-
48px
-
-
-
xl
-
32px
-
64px
-
-
-
xxl
-
40px
-
80px
-
-
-
-
-
-
-
Helper classes
-
Add responsive margin or padding values to entire element or its sides with shorthand classes.
-
The classes are named using the format nsw-{property}-{sides}-{size}.
-
Where property is one of:
-
-
m - for classes that set margin
-
p - for classes that set padding
-
-
Where sides is one of:
-
-
top - for classes that set margin-top or padding-top
-
bottom - for classes that set margin-bottom or padding-bottom
-
-
left - for classes that set margin-left or padding-left
-
-
right - for classes that set margin-right or padding-right
-
-
x - for classes that set margin or padding on both left and right
-
-
y - for classes that set margin or padding on both top and bottom
-
-
blank - for classes that set a margin or padding on all 4 sides of the element
-
-
-
Where size is one of the responsive spacing tokens: xs, sm, md, lg, xl, xxl.
-
Here is a demo of creating a banner component using utility classes alone:
This is a intro text with longer vertical space to the button
-
-
-
-{{/_docs-example}}
diff --git a/src/docs/content/utilities/spacing.hbs b/src/docs/content/utilities/spacing.hbs
index ac148ec0..2a5e5ddf 100644
--- a/src/docs/content/utilities/spacing.hbs
+++ b/src/docs/content/utilities/spacing.hbs
@@ -1,24 +1,94 @@
---
title: Spacing
width: narrow
-intro: Utilities for controlling an element's margin and padding and the space between child elements.
+intro: A defined set of spacing units provides good alignment and consistent spacing relationships in components and layout.
no-blank: true
order: 13
model: json/utilities.json
-meta-description: Utilities for controlling an element's margin and padding and the space between child elements.
+meta-description: The NSW Design System defined set of spacing units for alignment and consistent spacing relationships in components and layout.
meta-index: true
---
-
+
Responsive spacing
+
Spacing is recommended using an 8-pixel grid with pre-set responsive spacing units that can be used to create consistent spacing relationships across breakpoints.
-{{#>_docs-example separated="true"}}
- {{#each model.background-opacity as |value property|}}
-
-
.{{this.class}}
-
+{{#>_docs-example showcode=true separated="true"}}
+ {{#each model.border.color as |value property|}}
+
{{/each}}
{{/_docs-example}}
+
+{{#>_docs-code open=true}}
+ {{#each model.border.color as |value property|}}
+
+ {{/each}}
+{{/_docs-code}}
diff --git a/src/docs/content/utilities/display.hbs b/src/docs/content/utilities/display.hbs
index c18c795c..7b3ab425 100644
--- a/src/docs/content/utilities/display.hbs
+++ b/src/docs/content/utilities/display.hbs
@@ -9,8 +9,141 @@ meta-description: Utilities for controlling the display box type of an element.
meta-index: true
---
-
Block & Inline
+
Change the value of the display property with our responsive display utility classes. Classes can be combined for various effects as you need.
-{{#>_docs-example}}
+
Notation
+
Display utility classes that apply to all breakpoints, from xs to xxl, have no breakpoint abbreviation in them. This is because those classes are applied from min-width: 0; and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation.
+
+
As such, the classes are named using the format:
+
+
+
.nsw-display-{value} for xs
+
.nsw-display-{breakpoint}-{value} for sm, md, lg, xl, and xxl.
For faster mobile-friendly development, use responsive display classes for showing and hiding elements by device. Avoid creating entirely different versions of the same site, instead hide elements responsively for each screen size.
+
+
To hide elements simply use the .nsw-display-none class or one of the .nsw-display-{sm,md,lg,xl,xxl}-none classes for any responsive screen variation.
+
+
To show an element only on a given interval of screen sizes you can combine one .nsw-display-*-none class with a .nsw-display-*-* class, for example .nsw-display-none .nsw-display-md-block .nsw-display-xl-none .nsw-display-xxl-none will hide the element for all screen sizes except on medium and large devices.
For faster mobile-friendly development, use responsive display classes for showing and hiding elements by device. Avoid creating entirely different versions of the same site, instead hide elements responsively for each screen size.
+
To hide an element and remove it from the page layout (compare with .nsw-invisible from the visibility documentation) use the .nsw-display-none class or one of the .nsw-display-{sm,md,lg,xl,xxl}-none classes for any responsive screen variation.
-
To hide elements simply use the .nsw-display-none class or one of the .nsw-display-{sm,md,lg,xl,xxl}-none classes for any responsive screen variation.
+
For faster mobile-friendly development, use responsive display classes for showing and hiding elements by device. Avoid creating entirely different versions of the same site, instead hide elements responsively for each screen size.
To show an element only on a given interval of screen sizes you can combine one .nsw-display-*-none class with a .nsw-display-*-* class, for example .nsw-display-none .nsw-display-md-block .nsw-display-xl-none .nsw-display-xxl-none will hide the element for all screen sizes except on medium and large devices.
From 0185272fae49f7747d48dfeb13a52ffabcb7be93 Mon Sep 17 00:00:00 2001
From: Lauren Hitchon
Date: Wed, 24 May 2023 11:25:11 +1000
Subject: [PATCH 06/17] object-fit, float and updated ordering
---
src/docs/content/utilities/float.hbs | 47 ++++++++++++++-----
src/docs/content/utilities/object-fit.hbs | 43 ++++++++++++-----
src/docs/content/utilities/svg.hbs | 23 ++++-----
src/docs/content/utilities/text.hbs | 4 +-
src/docs/content/utilities/vertical-align.hbs | 2 +-
src/docs/content/utilities/vertical-rule.hbs | 2 +-
src/docs/content/utilities/visibility.hbs | 2 +-
src/docs/content/utilities/z-index.hbs | 2 +-
8 files changed, 81 insertions(+), 44 deletions(-)
diff --git a/src/docs/content/utilities/float.hbs b/src/docs/content/utilities/float.hbs
index af280807..3056fff8 100644
--- a/src/docs/content/utilities/float.hbs
+++ b/src/docs/content/utilities/float.hbs
@@ -9,16 +9,41 @@ meta-description: Utilities for controlling the wrapping of content around an el
meta-index: true
---
-
+
These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the CSS float property. !important is included to avoid specificity issues. These use the same viewport breakpoints as our grid system. Please be aware float utilities have no effect on flex items.
+
+{{#>_docs-example open=true separated=true}}
+
Float left on all viewport sizes
+
Float right on all viewport sizes
+
Don't float on all viewport sizes
{{/_docs-example}}
+
+
Breakpoints
+
Responsive variations also exist for each float value.
+
+{{#>_docs-example open=true separated=true}}
+
Float left on viewports sized SM (small) or wider
+
Float left on viewports sized MD (medium) or wider
+
Float left on viewports sized LG (large) or wider
+
Float left on viewports sized XL (extra-large) or wider
+{{/_docs-example}}
+
+
All the supported classes
+
+
.nsw-float-left
+
.nsw-float-right
+
.nsw-float-none
+
.nsw-float-sm-left
+
.nsw-float-sm-right
+
.nsw-float-sm-none
+
.nsw-float-md-left
+
.nsw-float-md-right
+
.nsw-float-md-none
+
.nsw-float-lg-left
+
.nsw-float-lg-right
+
.nsw-float-lg-none
+
.nsw-float-xl-left
+
.nsw-float-xl-right
+
.nsw-float-xl-none
+
\ No newline at end of file
diff --git a/src/docs/content/utilities/object-fit.hbs b/src/docs/content/utilities/object-fit.hbs
index 6da47ef4..1bb4ca61 100644
--- a/src/docs/content/utilities/object-fit.hbs
+++ b/src/docs/content/utilities/object-fit.hbs
@@ -9,16 +9,35 @@ meta-description: Utilities for controlling how a replaced element's content sho
meta-index: true
---
-
-
-{{#>_docs-example}}
- {{#each model.colours as |value property|}}
- {{#each this}}
-
-
-
.{{@key}}
-
-
- {{/each}}
- {{/each}}
+
Overview
+
+
These utility classes control how a replaced element's content should be resized using the CSS object-fit property. !important is included to avoid specificity issues.
+
+
Classes for the value of object-fit are named using the format .nsw-object-fit-{value}. Choose from the following values:
- {{/each}}
-{{/_docs-code}}
\ No newline at end of file
+{{/_docs-example}}
\ No newline at end of file
diff --git a/src/docs/content/utilities/text.hbs b/src/docs/content/utilities/text.hbs
index b02ed4e1..99b4423d 100644
--- a/src/docs/content/utilities/text.hbs
+++ b/src/docs/content/utilities/text.hbs
@@ -3,7 +3,7 @@ title: Text
width: narrow
intro: Documentation and examples for common text utilities to control alignment, wrapping, weight, and more.
no-blank: true
-order: 14
+order: 15
model: json/utilities.json
meta-description: Documentation and examples for common text utilities to control alignment, wrapping, weight, and more.
meta-index: true
@@ -15,9 +15,7 @@ meta-index: true
{{#each model.colours as |value property|}}
{{#each this}}
-
.{{@key}}
-
{{/each}}
{{/each}}
diff --git a/src/docs/content/utilities/vertical-align.hbs b/src/docs/content/utilities/vertical-align.hbs
index ed31e7f5..31451f1a 100644
--- a/src/docs/content/utilities/vertical-align.hbs
+++ b/src/docs/content/utilities/vertical-align.hbs
@@ -3,7 +3,7 @@ title: Vertical align
width: narrow
intro: Easily change the vertical alignment of inline, inline-block, inline-table, and table cell elements.
no-blank: true
-order: 15
+order: 16
model: json/utilities.json
meta-description: Easily change the vertical alignment of inline, inline-block, inline-table, and table cell elements.
meta-index: true
diff --git a/src/docs/content/utilities/vertical-rule.hbs b/src/docs/content/utilities/vertical-rule.hbs
index 1475f097..6f93808d 100644
--- a/src/docs/content/utilities/vertical-rule.hbs
+++ b/src/docs/content/utilities/vertical-rule.hbs
@@ -3,7 +3,7 @@ title: Vertical rule
width: narrow
intro: Use the custom vertical rule helper to create vertical dividers like the element.
no-blank: true
-order: 16
+order: 17
model: json/utilities.json
meta-description: Use the custom vertical rule helper to create vertical dividers like the element.
meta-index: true
diff --git a/src/docs/content/utilities/visibility.hbs b/src/docs/content/utilities/visibility.hbs
index c9deb00f..ce309fb8 100644
--- a/src/docs/content/utilities/visibility.hbs
+++ b/src/docs/content/utilities/visibility.hbs
@@ -3,7 +3,7 @@ title: Visibility
width: narrow
intro: Control the visibility of elements, without modifying their display, with visibility utilities.
no-blank: true
-order: 17
+order: 18
model: json/utilities.json
meta-description: Control the visibility of elements, without modifying their display, with visibility utilities.
meta-index: true
diff --git a/src/docs/content/utilities/z-index.hbs b/src/docs/content/utilities/z-index.hbs
index ab395014..673f75dc 100644
--- a/src/docs/content/utilities/z-index.hbs
+++ b/src/docs/content/utilities/z-index.hbs
@@ -3,7 +3,7 @@ title: Z-index
width: narrow
intro: Utilities for controlling the stack order of an element.
no-blank: true
-order: 18
+order: 19
model: json/utilities.json
meta-description: Utilities for controlling the stack order of an element.
meta-index: true
From e0cd4df0d2f7e819dfd20e6132fe325d83f7822d Mon Sep 17 00:00:00 2001
From: Lauren Hitchon
Date: Wed, 7 Jun 2023 10:53:13 +1000
Subject: [PATCH 07/17] Update _settings.scss
---
src/global/scss/settings/_settings.scss | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/global/scss/settings/_settings.scss b/src/global/scss/settings/_settings.scss
index fce93407..c27e44d0 100644
--- a/src/global/scss/settings/_settings.scss
+++ b/src/global/scss/settings/_settings.scss
@@ -1,6 +1,3 @@
-// Color system
-
-
$prefix: 'nsw-';
$enable-important-utilities: true !default;
From 1bab4c02f504fc3196162d6dcfc433f082051ea6 Mon Sep 17 00:00:00 2001
From: Lauren Hitchon
Date: Fri, 4 Aug 2023 16:17:11 +1000
Subject: [PATCH 08/17] Utility pages added
---
src/docs/content/utilities/box-shadow.hbs | 33 +++++++
src/docs/content/utilities/display.hbs | 2 -
.../content/utilities/json/utilities.json | 5 +-
src/docs/content/utilities/opacity.hbs | 14 +--
src/docs/content/utilities/overflow.hbs | 96 ++++++++++++++++---
src/docs/content/utilities/shadows.hbs | 24 -----
src/docs/content/utilities/svg.hbs | 36 +++++--
src/docs/content/utilities/vertical-align.hbs | 56 ++++++++---
src/docs/content/utilities/vertical-rule.hbs | 37 ++++---
src/docs/content/utilities/visibility.hbs | 50 ++++++++--
src/global/scss/base/_mixins.scss | 29 +++---
src/global/scss/helpers/_all.scss | 1 +
src/global/scss/helpers/_vertical-rule.scss | 8 ++
src/global/scss/helpers/_visibility.scss | 9 +-
14 files changed, 290 insertions(+), 110 deletions(-)
create mode 100644 src/docs/content/utilities/box-shadow.hbs
delete mode 100644 src/docs/content/utilities/shadows.hbs
create mode 100644 src/global/scss/helpers/_vertical-rule.scss
diff --git a/src/docs/content/utilities/box-shadow.hbs b/src/docs/content/utilities/box-shadow.hbs
new file mode 100644
index 00000000..04beb0a0
--- /dev/null
+++ b/src/docs/content/utilities/box-shadow.hbs
@@ -0,0 +1,33 @@
+---
+title: Shadows
+width: narrow
+intro: Utility for adding the NSW box shadow to an element.
+no-blank: true
+order: 11
+model: json/utilities.json
+meta-description: Utility for adding the NSW box shadow to an element.
+meta-index: true
+---
+
+
The opacity property sets the opacity level for an element. The opacity level describes the transparency level, where 100 is not transparent at all, 50 is 50% visible, and 0 is completely transparent.
+ {{#each model.stroke as |value property|}}
+
+ {{/each}}
+
+{{/_docs-example}}
+
+{{#>_docs-code open=true}}
+
+{{/_docs-code}}
\ No newline at end of file
diff --git a/src/docs/content/utilities/vertical-align.hbs b/src/docs/content/utilities/vertical-align.hbs
index 31451f1a..d4e10a3a 100644
--- a/src/docs/content/utilities/vertical-align.hbs
+++ b/src/docs/content/utilities/vertical-align.hbs
@@ -9,16 +9,48 @@ meta-description: Easily change the vertical alignment of inline, inline-block,
meta-index: true
---
-
-
-{{#>_docs-example}}
- {{#each model.colours as |value property|}}
- {{#each this}}
-
-
-
.{{@key}}
-
-
- {{/each}}
- {{/each}}
+
Change the alignment of elements with the vertical-alignment utilities. Please note that vertical-align only affects inline, inline-block, inline-table, and table cell elements.
+
+Classes for the value of nsw-align are named using the format .nsw-align-{value}. Choose from the following values:
+
+
+
baseline
+
top
+
middel
+
bottom
+
text-bottom
+
text-top
+
+
+
To vertically center non-inline content (like <div>s and more), use our flex box utilities.
+{{/_docs-example}}
+
+
diff --git a/src/docs/content/utilities/visibility.hbs b/src/docs/content/utilities/visibility.hbs
index ce309fb8..d7583258 100644
--- a/src/docs/content/utilities/visibility.hbs
+++ b/src/docs/content/utilities/visibility.hbs
@@ -9,17 +9,49 @@ meta-description: Control the visibility of elements, without modifying their di
meta-index: true
---
-
+
Grid classes give you the option to show or hide elements in certain breakpoints. For example, displaying an image on a large screen when it supports the content, but hiding it on a small screen when it hinders the users access to information.
+
The classes are named using the format nsw-{display}-{breakpoint}
+
Where breakpoint is one of xs, sm, md, lg, xl.
+
Where display is one of:
+
+
show - displays the elements
+
hide - hides the elements
+
-{{#>_docs-code open=true}}
-
-
-{{/_docs-code}}
+
Showing
+{{#>_docs-example separated="true"}}
+
+
This text is only visible in large breakpoint and up
+
+{{/_docs-example}}
+
+
Hiding
+{{#>_docs-example separated="true"}}
+
+
This text is only visible from large breakpoint and lower
+
+{{/_docs-example}}
Visually hidden
-
Visually hide an element while still allowing it to be exposed to assistive technologies (such as screen readers) with .visually-hidden. Use .visually-hidden-focusable to visually hide an element by default, but to display it when it’s focused (e.g. by a keyboard-only user). .visually-hidden-focusable can also be applied to a container–thanks to :focus-within, the container will be displayed when any child element of the container receives focus.
-{{#>_docs-code open=true}}
-
-
+
Visually hide an element while still allowing it to be exposed to assistive technologies (such as screen readers) with .sr-only. Use .sr-only-focusable to visually hide an element by default, but to display it when it’s focused (e.g. by a keyboard-only user). .sr-only-focusable can also be applied to a container – thanks to :focus-within, the container will be displayed when any child element of the container receives focus.
Apply display utilities to create a flexbox container and transform direct children elements into flex items. Flex containers and items are able to be modified further with additional flex properties.
Use justify-content utilities on flexbox containers to change the alignment of flex items on the main axis. Choose from start (browser default), end, center, between, around, or evenly.
+
+
Use align-items utilities on flexbox containers to change the alignment of flex items on the cross axis. Choose from start, end, center, baseline, or stretch (browser default).
Use align-self utilities on flexbox items to individually change their alignment on the cross axis. Choose from the same options as align-items: start, end, center, baseline, or stretch (browser default).
In addition, you can also center the elements with the transform utility class .nsw-translate-middle.
+
+
This class applies the transformations translateX(-50%) and translateY(-50%) to the element which, in combination with the edge positioning utilities, allows you to absolute center an element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{{#>_docs-code open=true}}
+
+
+
+
+
+
+
+
+
+
+
+{{/_docs-code}}
+
+
By adding .nsw-translate-middle-x or .nsw-translate-middle-y classes, elements can be positioned only in horizontal or vertical direction.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{{#>_docs-code open=true}}
+
+
+
+
+
+
+
+
+
+
+
+{{/_docs-code}}
+
+
Example
+
+{{#>_docs-example open=true separated=true}}
+
+{{/_docs-example}}
\ No newline at end of file
diff --git a/src/docs/content/utilities/sizing.hbs b/src/docs/content/utilities/sizing.hbs
index 266dd58d..d675a995 100644
--- a/src/docs/content/utilities/sizing.hbs
+++ b/src/docs/content/utilities/sizing.hbs
@@ -9,16 +9,165 @@ meta-description: Utilities for setting the width, minimum width, maximum width,
meta-index: true
---
-
-
-{{#>_docs-example}}
- {{#each model.colours as |value property|}}
- {{#each this}}
-
-
-
.{{@key}}
-
-
- {{/each}}
- {{/each}}
+
Fixed widths
+
+
Use .nsw-width-{number} to set an element to a fixed width.
+
+
+
+
+
+
+
+
Class
+
+
+
Properties
+
+
+ {{#each model.sizing as |value property|}}
+
+
+
nsw-width-{{@key}}
+
+
+
width: {{this}}
+
+
+ {{/each}}
+
+
+
+
+
+
Fixed heights
+
+
Use .nsw-height-{number} to set an element to a fixed height.
+
+
+
+
+
+
+
+
Class
+
+
+
Properties
+
+
+ {{#each model.sizing as |value property|}}
+
+
+
nsw-height-{{@key}}
+
+
+
height: {{this}}
+
+
+ {{/each}}
+
+
+
+
+
+
Relative to the parent
+
+
Width and height utilities include support for 10%, 20%, 25%, 30%, 33%, 40% 50%, 60%, 70%, 75%, 80%, 90%, 100% and auto by default.
You can also use utilities to set the width and height relative to the viewport.
+
+{{#>_docs-code open=true separated=true}}
+
Min-width 100vw
+
Min-height 100vh
+
Width 100vw
+
Height 100vh
+{{/_docs-code}}
\ No newline at end of file
diff --git a/src/docs/content/utilities/text.hbs b/src/docs/content/utilities/text.hbs
index 99b4423d..90f3283b 100644
--- a/src/docs/content/utilities/text.hbs
+++ b/src/docs/content/utilities/text.hbs
@@ -9,14 +9,160 @@ meta-description: Documentation and examples for common text utilities to contro
meta-index: true
---
-
-
-{{#>_docs-example}}
- {{#each model.colours as |value property|}}
- {{#each this}}
-
-
.{{@key}}
-
- {{/each}}
- {{/each}}
+
Text alignment
+
+{{#>_docs-example open=true separated=true}}
+
Start aligned text on all viewport sizes.
+
Center aligned text on all viewport sizes.
+
End aligned text on all viewport sizes.
+{{/_docs-example}}
+
+
Text truncation
+
+
For longer content, you can add a .nsw-text-truncate class to truncate the text with an ellipsis. Requires display: inline-block or display: block.
+ This text is quite long, and will be truncated once displayed.
+
+
+
+
+
+ This text is quite long, and will be truncated once displayed.
+
+
+{{/_docs-example}}
+
+
Text wrapping and overflow
+
+
Wrap text with a .nsw-text-wrap class.
+
+{{#>_docs-example open=true separated=true}}
+This text should wrap.
+{{/_docs-example}}
+
+
Prevent text from wrapping with a .nsw-text-nowrap class.
+
+{{#>_docs-example open=true separated=true}}
+This text should overflow the parent.
+{{/_docs-example}}
+
+
Word break
+
+
Prevent long strings of text from breaking your components’ layout by using .nsw-text-break to set word-wrap: break-word and word-break: break-word. We use word-wrap instead of the more common overflow-wrap for wider browser support, and add the deprecated word-break: break-word to avoid issues with flex containers.
+{{/_docs-code}}
\ No newline at end of file
diff --git a/src/docs/content/utilities/display.hbs b/src/docs/content/utilities/display.hbs
index 1331d123..5b925d42 100644
--- a/src/docs/content/utilities/display.hbs
+++ b/src/docs/content/utilities/display.hbs
@@ -3,7 +3,6 @@ title: Display
width: narrow
intro: Utilities for controlling the display box type of an element.
no-blank: true
-order: 4
model: json/utilities.json
meta-description: Utilities for controlling the display box type of an element.
meta-index: true
diff --git a/src/docs/content/utilities/flex.hbs b/src/docs/content/utilities/flex.hbs
index 07dac94b..8b3fc481 100644
--- a/src/docs/content/utilities/flex.hbs
+++ b/src/docs/content/utilities/flex.hbs
@@ -3,7 +3,6 @@ title: Flex
width: narrow
intro: Utilities to manage the layout, alignment and sizing of flex items and components with a suite of responsive flexbox utilities.
no-blank: true
-order: 5
model: json/utilities.json
meta-description: Utilities to manage the layout, alignment and sizing of flex items and components with a suite of responsive flexbox utilities.
meta-index: true
diff --git a/src/docs/content/utilities/float.hbs b/src/docs/content/utilities/float.hbs
index 3056fff8..00f0f785 100644
--- a/src/docs/content/utilities/float.hbs
+++ b/src/docs/content/utilities/float.hbs
@@ -3,7 +3,6 @@ title: Float
width: narrow
intro: Utilities for controlling the wrapping of content around an element.
no-blank: true
-order: 6
model: json/utilities.json
meta-description: Utilities for controlling the wrapping of content around an element.
meta-index: true
diff --git a/src/docs/content/utilities/object-fit.hbs b/src/docs/content/utilities/object-fit.hbs
index 1bb4ca61..f86e1496 100644
--- a/src/docs/content/utilities/object-fit.hbs
+++ b/src/docs/content/utilities/object-fit.hbs
@@ -3,7 +3,6 @@ title: Object fit
width: narrow
intro: Utilities for controlling how a replaced element's content should be resized.
no-blank: true
-order: 7
model: json/utilities.json
meta-description: Utilities for controlling how a replaced element's content should be resized.
meta-index: true
diff --git a/src/docs/content/utilities/opacity.hbs b/src/docs/content/utilities/opacity.hbs
index b5529e91..61bcecf8 100644
--- a/src/docs/content/utilities/opacity.hbs
+++ b/src/docs/content/utilities/opacity.hbs
@@ -3,7 +3,6 @@ title: Opacity
width: narrow
intro: Utilities for controlling the opacity of an element.
no-blank: true
-order: 8
model: json/utilities.json
meta-description: Utilities for controlling the opacity of an element.
meta-index: true
diff --git a/src/docs/content/utilities/overflow.hbs b/src/docs/content/utilities/overflow.hbs
index 3045941c..07d44b1a 100644
--- a/src/docs/content/utilities/overflow.hbs
+++ b/src/docs/content/utilities/overflow.hbs
@@ -3,7 +3,6 @@ title: Overflow
width: narrow
intro: Utilities for controlling how an element handles content that is too large for the container.
no-blank: true
-order: 9
model: json/utilities.json
meta-description: Utilities for controlling how an element handles content that is too large for the container.
meta-index: true
diff --git a/src/docs/content/utilities/position.hbs b/src/docs/content/utilities/position.hbs
index 6a4fe8f9..26c984cc 100644
--- a/src/docs/content/utilities/position.hbs
+++ b/src/docs/content/utilities/position.hbs
@@ -3,7 +3,6 @@ title: Position
width: narrow
intro: Utilities for controlling how an element is positioned in the DOM.
no-blank: true
-order: 10
model: json/utilities.json
meta-description: Utilities for controlling how an element is positioned in the DOM.
meta-index: true
diff --git a/src/docs/content/utilities/sizing.hbs b/src/docs/content/utilities/sizing.hbs
index d675a995..64cd265d 100644
--- a/src/docs/content/utilities/sizing.hbs
+++ b/src/docs/content/utilities/sizing.hbs
@@ -3,7 +3,6 @@ title: Sizing
width: narrow
intro: Utilities for setting the width, minimum width, maximum width, height, minimum height and maximum height of an element.
no-blank: true
-order: 12
model: json/utilities.json
meta-description: Utilities for setting the width, minimum width, maximum width, height, minimum height and maximum height of an element.
meta-index: true
diff --git a/src/docs/content/utilities/spacing.hbs b/src/docs/content/utilities/spacing.hbs
index 2a5e5ddf..a30bce85 100644
--- a/src/docs/content/utilities/spacing.hbs
+++ b/src/docs/content/utilities/spacing.hbs
@@ -3,7 +3,6 @@ title: Spacing
width: narrow
intro: A defined set of spacing units provides good alignment and consistent spacing relationships in components and layout.
no-blank: true
-order: 13
model: json/utilities.json
meta-description: The NSW Design System defined set of spacing units for alignment and consistent spacing relationships in components and layout.
meta-index: true
diff --git a/src/docs/content/utilities/svg.hbs b/src/docs/content/utilities/svg.hbs
index bd79fc83..a64a04a3 100644
--- a/src/docs/content/utilities/svg.hbs
+++ b/src/docs/content/utilities/svg.hbs
@@ -3,7 +3,6 @@ title: SVG
width: narrow
intro: Utilities for styling the fill, stroke and stroke width of SVG elements.
no-blank: true
-order: 14
model: json/utilities.json
meta-description: Utilities for styling the fill, stroke and stroke width of SVG elements.
meta-index: true
diff --git a/src/docs/content/utilities/text.hbs b/src/docs/content/utilities/text.hbs
index 90f3283b..d8119ebe 100644
--- a/src/docs/content/utilities/text.hbs
+++ b/src/docs/content/utilities/text.hbs
@@ -3,7 +3,6 @@ title: Text
width: narrow
intro: Documentation and examples for common text utilities to control alignment, wrapping, weight, and more.
no-blank: true
-order: 15
model: json/utilities.json
meta-description: Documentation and examples for common text utilities to control alignment, wrapping, weight, and more.
meta-index: true
diff --git a/src/docs/content/utilities/vertical-align.hbs b/src/docs/content/utilities/vertical-align.hbs
index d4e10a3a..3444b751 100644
--- a/src/docs/content/utilities/vertical-align.hbs
+++ b/src/docs/content/utilities/vertical-align.hbs
@@ -3,7 +3,6 @@ title: Vertical align
width: narrow
intro: Easily change the vertical alignment of inline, inline-block, inline-table, and table cell elements.
no-blank: true
-order: 16
model: json/utilities.json
meta-description: Easily change the vertical alignment of inline, inline-block, inline-table, and table cell elements.
meta-index: true
diff --git a/src/docs/content/utilities/vertical-rule.hbs b/src/docs/content/utilities/vertical-rule.hbs
index 474f2002..eb8f3af8 100644
--- a/src/docs/content/utilities/vertical-rule.hbs
+++ b/src/docs/content/utilities/vertical-rule.hbs
@@ -3,7 +3,6 @@ title: Vertical rule
width: narrow
intro: Use the custom vertical rule helper to create vertical dividers like the element.
no-blank: true
-order: 17
model: json/utilities.json
meta-description: Use the custom vertical rule helper to create vertical dividers like the element.
meta-index: true
diff --git a/src/docs/content/utilities/visibility.hbs b/src/docs/content/utilities/visibility.hbs
index d7583258..c319b21f 100644
--- a/src/docs/content/utilities/visibility.hbs
+++ b/src/docs/content/utilities/visibility.hbs
@@ -3,7 +3,6 @@ title: Visibility
width: narrow
intro: Control the visibility of elements, without modifying their display, with visibility utilities.
no-blank: true
-order: 18
model: json/utilities.json
meta-description: Control the visibility of elements, without modifying their display, with visibility utilities.
meta-index: true
diff --git a/src/docs/content/utilities/z-index.hbs b/src/docs/content/utilities/z-index.hbs
index 673f75dc..5227b059 100644
--- a/src/docs/content/utilities/z-index.hbs
+++ b/src/docs/content/utilities/z-index.hbs
@@ -3,7 +3,6 @@ title: Z-index
width: narrow
intro: Utilities for controlling the stack order of an element.
no-blank: true
-order: 19
model: json/utilities.json
meta-description: Utilities for controlling the stack order of an element.
meta-index: true
From b2c17280981275b505a8a52707c111fc9c5263b9 Mon Sep 17 00:00:00 2001
From: Lauren Hitchon
Date: Mon, 14 Aug 2023 09:54:40 +1000
Subject: [PATCH 12/17] Remove object-fit, opacity, sizing and vertical-rule
---
src/core/colour/index.hbs | 2 +-
src/core/graphic-elements/index.hbs | 2 +-
src/core/pictograms/index.hbs | 19 +-
src/docs/content/utilities/object-fit.hbs | 42 -----
src/docs/content/utilities/opacity.hbs | 17 --
src/docs/content/utilities/sizing.hbs | 172 ------------------
src/docs/content/utilities/text.hbs | 36 +---
src/docs/content/utilities/vertical-align.hbs | 2 +-
src/docs/content/utilities/vertical-rule.hbs | 36 ----
src/docs/search.json | 76 +++++++-
10 files changed, 80 insertions(+), 324 deletions(-)
delete mode 100644 src/docs/content/utilities/object-fit.hbs
delete mode 100644 src/docs/content/utilities/opacity.hbs
delete mode 100644 src/docs/content/utilities/sizing.hbs
delete mode 100644 src/docs/content/utilities/vertical-rule.hbs
diff --git a/src/core/colour/index.hbs b/src/core/colour/index.hbs
index 144aebf7..7382bb35 100644
--- a/src/core/colour/index.hbs
+++ b/src/core/colour/index.hbs
@@ -35,7 +35,7 @@ meta-index: true
You don't need to use hex colours in code
Use either CSS variables (below) or, if you're creating a one-off layout, you can use our helper classes for dark, light, and supplementary colours.
-
By using CSS variables, any branding or theming changes will automatically reflect in your product. See CSS variables below, or see the Utility classes docs.
+
By using CSS variables, any branding or theming changes will automatically reflect in your product. See CSS variables below, or see the Utility classes docs.
Used pictograms to visually support and highlight content, making it quickly identifiable on the page.
- info
+ info
Use SVG utility classes
-
Usability classes are available for developers to apply brand colours to SVGs. Use them so that SVGs can be used across pages using different colour schemes. See Utility classes for names.
+
Usability classes are available for developers to apply brand colours to SVGs. Use them so that SVGs can be used across pages using different colour schemes. See Utility classes for names.
diff --git a/src/docs/content/utilities/vertical-align.hbs b/src/docs/content/utilities/vertical-align.hbs
index 3444b751..a7a1a70e 100644
--- a/src/docs/content/utilities/vertical-align.hbs
+++ b/src/docs/content/utilities/vertical-align.hbs
@@ -15,7 +15,7 @@ Classes for the value of nsw-align are named using the format
baseline
top
-
middel
+
middle
bottom
text-bottom
text-top
diff --git a/src/docs/content/utilities/vertical-rule.hbs b/src/docs/content/utilities/vertical-rule.hbs
deleted file mode 100644
index eb8f3af8..00000000
--- a/src/docs/content/utilities/vertical-rule.hbs
+++ /dev/null
@@ -1,36 +0,0 @@
----
-title: Vertical rule
-width: narrow
-intro: Use the custom vertical rule helper to create vertical dividers like the element.
-no-blank: true
-model: json/utilities.json
-meta-description: Use the custom vertical rule helper to create vertical dividers like the element.
-meta-index: true
----
-
-
How it works
-
-
Vertical rules are inspired by the hr element, allowing you to create vertical dividers in common layouts. They’re styled just like hr elements.
In addition, you can also center the elements with the transform utility class .nsw-translate-middle.
-
-
This class applies the transformations translateX(-50%) and translateY(-50%) to the element which, in combination with the edge positioning utilities, allows you to absolute center an element.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{{#>_docs-code open=true}}
-
-
-
-
-
-
-
-
-
-
-
-{{/_docs-code}}
-
-
By adding .nsw-translate-middle-x or .nsw-translate-middle-y classes, elements can be positioned only in horizontal or vertical direction.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{{#>_docs-code open=true}}
-
-
-
-
-
-
-
-
-
-
-
-{{/_docs-code}}
-
-
Example
-
-{{#>_docs-example open=true separated=true}}
-
-{{/_docs-example}}
\ No newline at end of file
+{{/_docs-code}}
\ No newline at end of file
diff --git a/src/docs/content/utilities/svg.hbs b/src/docs/content/utilities/svg.hbs
index a64a04a3..a2692afc 100644
--- a/src/docs/content/utilities/svg.hbs
+++ b/src/docs/content/utilities/svg.hbs
@@ -1,39 +1,59 @@
---
title: SVG
width: narrow
-intro: Utilities for styling the fill, stroke and stroke width of SVG elements.
+intro: Utilities for styling the fill of SVG elements.
no-blank: true
model: json/utilities.json
-meta-description: Utilities for styling the fill, stroke and stroke width of SVG elements.
+meta-description: Utilities for styling the fill of SVG elements.
meta-index: true
---
-
Fill
+
Setting the fill color
+
Use the nsw-fill-{color} utilities to change the fill color of an SVG.