From 60142db547eac65d9d1c10f0f0b22d0b7cf0e909 Mon Sep 17 00:00:00 2001 From: Sean Elliott <> Date: Fri, 28 Feb 2020 09:51:44 +1100 Subject: [PATCH 1/6] fix: changes made when auditing design system - removed blockquote from components folder as its part of typoography - changed values in `settings.scss`, mapping for breakpoints was wrong breakpoints were breaking later then it should have - moved all media queries up one breakpoint to match what was designed but better match the screen size, including settings related to grid and typography breakpoints - added check for `xl` sized in `breakpoint` mixin - updated footer font sizes - removed theme from `card-new.json` and `card-media.json` - consolidated `card.scss` and removed variants for `.nsw-card__media` and `.nsw-card__news` - added if around copy in card component hbs - added new callout json file, fixed up css issue with margins when there is no icon, removed if around heading in callout as we determined this is always required --- src/components/blockquote/_blockquote.hbs | 7 --- src/components/blockquote/_blockquote.scss | 0 src/components/blockquote/blockquote.js | 0 src/components/blockquote/blockquote.json | 0 src/components/blockquote/index.hbs | 4 -- src/components/breadcrumbs/_breadcrumbs.scss | 4 +- src/components/callout/_callout.hbs | 2 +- src/components/callout/_callout.scss | 15 +++-- src/components/callout/callout-all.json | 9 +++ src/components/callout/callout.json | 7 +-- src/components/callout/index.hbs | 10 +++- src/components/card/_card.hbs | 2 +- src/components/card/_card.scss | 58 ++++++------------- src/components/card/card-media.json | 1 - src/components/card/card-news.json | 1 - src/components/hero-banner/_hero-banner.scss | 12 ++-- .../main-navigation/_main-navigation.scss | 32 +++++----- .../notification/_notification.scss | 4 +- .../site-wide-message/_site-wide-message.scss | 2 +- src/global/scss/settings/_settings.scss | 20 ++++--- src/global/scss/tools/_breakpoint.scss | 2 +- src/patterns/footer/_footer.scss | 14 +++-- src/patterns/header/_header.scss | 22 +++---- src/styles/forms/_forms.scss | 2 +- src/styles/tables/_tables.scss | 2 +- src/styles/typography/_typography.scss | 2 +- 26 files changed, 111 insertions(+), 123 deletions(-) delete mode 100644 src/components/blockquote/_blockquote.hbs delete mode 100644 src/components/blockquote/_blockquote.scss delete mode 100644 src/components/blockquote/blockquote.js delete mode 100644 src/components/blockquote/blockquote.json delete mode 100644 src/components/blockquote/index.hbs create mode 100644 src/components/callout/callout-all.json diff --git a/src/components/blockquote/_blockquote.hbs b/src/components/blockquote/_blockquote.hbs deleted file mode 100644 index 642333f0..00000000 --- a/src/components/blockquote/_blockquote.hbs +++ /dev/null @@ -1,7 +0,0 @@ -
- “These new requirements will promote responsible cat and dog breeding and selling by allowing relevant agencies to identify and deal with problem breeders,” - Mr Marshall --
{{copy}}
+ {{#if copy}}{{copy}}
{{/if}} diff --git a/src/components/card/_card.scss b/src/components/card/_card.scss index f9772598..7cadf6d9 100644 --- a/src/components/card/_card.scss +++ b/src/components/card/_card.scss @@ -34,9 +34,12 @@ @include font-size('sm'); @include nsw-spacing(padding, md md xxxl md); border-top: solid 6px $nsw-primary-highlight; + display: flex; + flex-direction: column; + order: 2; - @include breakpoint('md') { + @include breakpoint('lg') { @include nsw-spacing(padding, md xl xxxl xl); } @@ -47,6 +50,11 @@ &__tag { @include font-stack('heading'); + order: 1; + } + + &__date { + order: 2; } &__tag, @@ -54,17 +62,18 @@ @include font-size('xs'); } + &__title, + &__copy, + &__icon { + order: 3; + } + &__icon { @include nsw-spacing(margin, md none none none); @include nsw-spacing(bottom, md); position: absolute; - width: rem(16px); - height: rem(16px); - - @include breakpoint('sm') { - width: rem(20px); - height: rem(20px); - } + width: rem(20px); + height: rem(20px); } &__link { @@ -81,48 +90,19 @@ text-decoration: underline; } } -} -.nsw-card--media { - .nsw-card__image-area { + &__image-area { order: 1; height: rem(200px); } - .nsw-card__content { - order: 2; - } - - .nsw-card__image { + &__image { width: 100%; height: 100%; object-fit: cover; } - } -.nsw-card--news { - .nsw-card__content { - display: flex; - flex-direction: column; - } - - .nsw-card__tag { - order: 1; - } - - .nsw-card__date { - order: 2; - } - - .nsw-card__title, - .nsw-card__copy, - .nsw-card__icon { - order: 3; - } -} - - .nsw-card--headline { .nsw-card__title { @include font-size('xl'); diff --git a/src/components/card/card-media.json b/src/components/card/card-media.json index e82d1132..3fd10433 100644 --- a/src/components/card/card-media.json +++ b/src/components/card/card-media.json @@ -1,5 +1,4 @@ { - "theme": "media", "heading": "Ut placet inquam tum dicere exorsus est laborum et inter", "copy": "Sunt autem quibusdam et voluptatem ut ita ruant itaque earum motus et expe", "img": "https://picsum.photos/id/421/400/200" diff --git a/src/components/card/card-news.json b/src/components/card/card-news.json index 206bdf12..21dd5d92 100644 --- a/src/components/card/card-news.json +++ b/src/components/card/card-news.json @@ -1,5 +1,4 @@ { - "theme": "news", "heading": "Ut placet inquam tum dicere exorsus est laborum et inter", "copy": "Sunt autem quibusdam et voluptatem ut ita ruant itaque earum motus et expe", "tag": "Service NSW", diff --git a/src/components/hero-banner/_hero-banner.scss b/src/components/hero-banner/_hero-banner.scss index 29141de0..9a8a3ac2 100644 --- a/src/components/hero-banner/_hero-banner.scss +++ b/src/components/hero-banner/_hero-banner.scss @@ -2,14 +2,14 @@ $parent: &; position: relative; - @include breakpoint('sm') { + @include breakpoint('md') { height: rem(380px); overflow: hidden; } &__image-area { - @include breakpoint('sm') { + @include breakpoint('md') { position: absolute; top: 0; left: 0; @@ -23,7 +23,7 @@ height: auto; display: block; - @include breakpoint('sm') { + @include breakpoint('md') { position: absolute; top: 50%; transform: translateY(-50%); @@ -34,7 +34,7 @@ &__content-area { @include break-out; - @include breakpoint('sm') { + @include breakpoint('md') { @include break-out-reset; height: rem(380px); background-color: transparent; @@ -49,7 +49,7 @@ background-color: $light20; border-top: solid 6px $nsw-primary-highlight; - @include breakpoint('sm') { + @include breakpoint('md') { @include nsw-spacing(padding, md lg); position: relative; top: 50%; @@ -106,7 +106,7 @@ color: $white; background-color: $dark80; - @include breakpoint('sm') { + @include breakpoint('md') { background-color: map-get($overlays, dark);; } } diff --git a/src/components/main-navigation/_main-navigation.scss b/src/components/main-navigation/_main-navigation.scss index 1aaf9c8a..a0982e3e 100644 --- a/src/components/main-navigation/_main-navigation.scss +++ b/src/components/main-navigation/_main-navigation.scss @@ -21,7 +21,7 @@ transform: translateX(-100%); } - @include breakpoint('sm') { + @include breakpoint('md') { @include font-stack('heading'); position: relative; transform: none; @@ -55,7 +55,7 @@ width: rem(20px); } - @include breakpoint('sm') { + @include breakpoint('md') { display: none; } } @@ -86,7 +86,7 @@ height: rem(16px); } - @include breakpoint('sm') { + @include breakpoint('md') { display: none; } } @@ -100,7 +100,7 @@ margin-top: 0; margin-bottom: 0; - @include breakpoint('sm') { + @include breakpoint('md') { @include container(0); display: flex; flex-direction: row; @@ -111,7 +111,7 @@ } .nsw-subnavigation__list { - @include breakpoint('sm') { + @include breakpoint('md') { @include nsw-spacing(margin-top, xl); display: flex; justify-content: space-between; @@ -126,14 +126,14 @@ align-items: stretch; flex-wrap: nowrap; - @include breakpoint('sm') { + @include breakpoint('md') { border-bottom: 0; } } .nsw-subnavigation__list-item { - @include breakpoint('sm') { + @include breakpoint('md') { width: 32%; border-top: solid 1px $light40; @@ -154,7 +154,7 @@ align-items: stretch; flex-wrap: nowrap; - @include breakpoint('sm') { + @include breakpoint('md') { position: relative; z-index: 2; } @@ -181,7 +181,7 @@ margin-left: rem(10px); display: none; - @include breakpoint('sm') { + @include breakpoint('md') { display: block; } @@ -207,7 +207,7 @@ visibility: visible; } - @include breakpoint('sm') { + @include breakpoint('md') { @include container; @include nsw-spacing(padding-top, lg); @include nsw-spacing(padding-bottom, lg); @@ -223,7 +223,7 @@ } } - @include breakpoint('md') { + @include breakpoint('lg') { @include nsw-spacing(padding-top, xxl); @include nsw-spacing(padding-bottom, xxl); } @@ -250,7 +250,7 @@ } .nsw-navigation__header { - @include breakpoint('sm') { + @include breakpoint('md') { display: none; } } @@ -258,7 +258,7 @@ .nsw-subnavigation__header { justify-content: space-between; - @include breakpoint('sm') { + @include breakpoint('md') { @include font-stack; @include font-size('sm'); border-bottom: 0; @@ -289,7 +289,7 @@ margin-right: rem(6px); } - @include breakpoint('sm') { + @include breakpoint('md') { display: none; } } @@ -299,7 +299,7 @@ @include font-size('lg'); display: none; - @include breakpoint('sm') { + @include breakpoint('md') { display: inline-block; } } @@ -333,7 +333,7 @@ @include nsw-spacing(margin-top, sm); display: none; - @include breakpoint('sm') { + @include breakpoint('md') { display: block; } } diff --git a/src/components/notification/_notification.scss b/src/components/notification/_notification.scss index 9aaa7609..0c590fa7 100644 --- a/src/components/notification/_notification.scss +++ b/src/components/notification/_notification.scss @@ -7,7 +7,7 @@ flex-direction: row; flex-wrap: nowrap; - @include breakpoint('sm') { + @include breakpoint('md') { @include nsw-spacing(padding, lg lg lg md); } @@ -17,7 +17,7 @@ width: rem(24px); height: rem(24px); - @include breakpoint('sm') { + @include breakpoint('md') { width: rem(30px); height: rem(30px); } diff --git a/src/components/site-wide-message/_site-wide-message.scss b/src/components/site-wide-message/_site-wide-message.scss index 97898bda..c3d8256f 100644 --- a/src/components/site-wide-message/_site-wide-message.scss +++ b/src/components/site-wide-message/_site-wide-message.scss @@ -71,7 +71,7 @@ @include nsw-focus($color: $white); } - @include breakpoint('sm') { + @include breakpoint('md') { display: inline-block; } } diff --git a/src/global/scss/settings/_settings.scss b/src/global/scss/settings/_settings.scss index 3323b109..e5662d00 100644 --- a/src/global/scss/settings/_settings.scss +++ b/src/global/scss/settings/_settings.scss @@ -21,7 +21,7 @@ $font-sizes: ( xxxl: (36px, 48px) ) !default; -$font-size-reponsive-breakpoint: 'md'; +$font-size-reponsive-breakpoint: 'lg'; // Lineheight mapping $line-height: ( @@ -69,7 +69,7 @@ $light10: #f4f4f7 !default; $white: #ffffff !default; // Notifications -$info-blue: $nsw-secondary-blue !default; +$info-blue: #2e5299 !default; $info-blue-light10: #eaedf4 !default; $success-green: #00a908 !default; $success-green-light10: #e5f6e6 !default; @@ -101,10 +101,11 @@ $link-visited: #551a8b; // Breakpoints $breakpoints: ( - xs: 576px, - sm: 768px, - md: 992px, - lg: 1200px, + xs: 0, + sm: 576px, + md: 768px, + lg: 992px, + xl: 1200px, ) !default; // z-index @@ -130,19 +131,20 @@ $grid-margins: ( sm: 8px, md: 8px, lg: 32px, + xl: 32px, ); $grid-margin-top: 16px; $grid-col-sizes: ( - xs: ( + sm: ( half: 50%, ), - sm: ( + md: ( third: 33.3%, two-thirds: 66.6%, quarter: 50%, three-quarters: 50% ), - md: ( + lg: ( quarter: 25%, three-quarters: 75% ) diff --git a/src/global/scss/tools/_breakpoint.scss b/src/global/scss/tools/_breakpoint.scss index 294791db..0e1d6382 100644 --- a/src/global/scss/tools/_breakpoint.scss +++ b/src/global/scss/tools/_breakpoint.scss @@ -3,7 +3,7 @@ @error 'NSW-DS Breakpoint mixin accepts only strings'; } - @if $size != 'xs' and $size != 'sm' and $size != 'md' and $size != 'lg' { + @if $size != 'xs' and $size != 'sm' and $size != 'md' and $size != 'lg' and $size != 'xl' { @error 'NSW-DS Breakpoint mixin allows the following breakpoint sizes xs, sm, md, lg'; } @else { $px-size: map-get($breakpoints, $size); diff --git a/src/patterns/footer/_footer.scss b/src/patterns/footer/_footer.scss index 46a46d04..80c4753c 100644 --- a/src/patterns/footer/_footer.scss +++ b/src/patterns/footer/_footer.scss @@ -32,7 +32,7 @@ &__info { - @include breakpoint('sm') { + @include breakpoint('md') { display: flex; flex-wrap: nowrap; } @@ -50,7 +50,7 @@ text-decoration: none; } - @include breakpoint('sm') { + @include breakpoint('md') { text-align: right; } } @@ -70,7 +70,7 @@ flex: 1 0 50%; max-width: 50%; - @include breakpoint('sm') { + @include breakpoint('md') { @include nsw-spacing(margin-right, lg); flex: 0 0 auto; max-width: none; @@ -95,7 +95,7 @@ flex-direction: row; flex-wrap: wrap; - @include breakpoint('sm') { + @include breakpoint('md') { display: flex; flex-direction: row; flex-wrap: wrap; @@ -125,12 +125,12 @@ min-width: rem(256px); max-width: 50%; - @include breakpoint('sm') { + @include breakpoint('md') { flex-basis: 50%; min-width: auto; } - @include breakpoint('md') { + @include breakpoint('lg') { flex-basis: 25%; } } @@ -138,11 +138,13 @@ &__heading { @include nsw-spacing(margin, none); @include font-stack('heading'); + @include font-size('sm'); } &__list { @include nsw-spacing(margin, none); @include nsw-spacing(padding, none); + @include font-size('xs'); list-style: none; margin-top: rem(4px); } diff --git a/src/patterns/header/_header.scss b/src/patterns/header/_header.scss index 39e49c5d..bf3bcd8b 100644 --- a/src/patterns/header/_header.scss +++ b/src/patterns/header/_header.scss @@ -29,7 +29,7 @@ } } - @include breakpoint('sm') { + @include breakpoint('md') { text-align: left; } } @@ -65,7 +65,7 @@ align-items: center; height: rem(72px); - @include breakpoint('sm') { + @include breakpoint('md') { justify-content: unset; height: rem(94px); } @@ -74,7 +74,7 @@ &__center { order: 2; - @include breakpoint('sm') { + @include breakpoint('md') { order: 0; } } @@ -88,7 +88,7 @@ order: 3; margin-right: rem(-4px); - @include breakpoint('sm') { + @include breakpoint('md') { margin-left: auto; margin-right: 0; } @@ -107,7 +107,7 @@ width: rem(141px); height: rem(46px); - @include breakpoint('sm') { + @include breakpoint('md') { width: rem(168px); height: rem(55px); } @@ -144,13 +144,13 @@ } .nsw-header-btn--menu { - @include breakpoint('sm') { + @include breakpoint('md') { display: none; } } .nsw-header-btn--search { - @include breakpoint('sm') { + @include breakpoint('md') { .nsw-header-btn__sub { @include sr-only; } @@ -168,7 +168,7 @@ background: $light10; top: 0; - @include breakpoint('sm') { + @include breakpoint('md') { @include break-out-reset; position: absolute; width: rem(394px); @@ -193,7 +193,7 @@ @include nsw-focus($offset: false); } - @include breakpoint('sm') { + @include breakpoint('md') { @include nsw-spacing(padding, none md); height: rem(50px); padding: 0 rem(16px); @@ -210,7 +210,7 @@ height: rem(24px); display: none; - @include breakpoint('sm') { + @include breakpoint('md') { display: inline-block; } } @@ -235,7 +235,7 @@ @include nsw-focus; } - @include breakpoint('sm') { + @include breakpoint('md') { display: none; } } diff --git a/src/styles/forms/_forms.scss b/src/styles/forms/_forms.scss index 1ae72270..a015df5c 100644 --- a/src/styles/forms/_forms.scss +++ b/src/styles/forms/_forms.scss @@ -240,7 +240,7 @@ } } - @include breakpoint('sm') { + @include breakpoint('md') { &[aria-invalid='true'], &.has-error { @include nsw-spacing(padding, md); diff --git a/src/styles/tables/_tables.scss b/src/styles/tables/_tables.scss index f63ab33f..cfe21b06 100644 --- a/src/styles/tables/_tables.scss +++ b/src/styles/tables/_tables.scss @@ -70,7 +70,7 @@ display: none; } - @include breakpoint('sm', max-width) { + @include breakpoint('lg', max-width) { border-top: solid 2px $dark80; thead { diff --git a/src/styles/typography/_typography.scss b/src/styles/typography/_typography.scss index 61286784..c52d9d27 100644 --- a/src/styles/typography/_typography.scss +++ b/src/styles/typography/_typography.scss @@ -51,7 +51,7 @@ border-left: solid 6px $nsw-primary-highlight; padding: rem(20px) rem(24px); - @include breakpoint('sm') { + @include breakpoint('md') { margin-left: auto; margin-right: auto; max-width: 75%; From 0299f4fdf83f21661ac5c5c3805051a2f711f41a Mon Sep 17 00:00:00 2001 From: Sean Elliott <> Date: Tue, 3 Mar 2020 12:14:38 +1100 Subject: [PATCH 2/6] - updated checkbox styles to have correct margin between checkbox and label and correct border radius - minor adjustments to header search icon, added `.nsw-masthead` as an additional class for `.nsw-infobar` this will be deprecated eventually - updated colors of tab navigation styles - updated border colors for main-navigation mega menu to match sketch - removed headings from list-list and direction-links index.hbs file, cleaned up indenting - updated in-page navigation border color to use highlight color --- src/components/direction-links/_direction-links.hbs | 2 -- .../in-page-navigation/_in-page-navigation.scss | 2 +- src/components/link-list/_link-list.hbs | 4 ++-- src/components/link-list/index.hbs | 1 - src/components/main-navigation/_main-navigation.scss | 4 ++-- src/components/tab-navigation/_tab-navigation.scss | 5 +++-- src/patterns/header/_header.hbs | 2 +- src/patterns/header/_header.scss | 11 +++++++---- src/styles/forms/_forms.scss | 8 ++------ 9 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/components/direction-links/_direction-links.hbs b/src/components/direction-links/_direction-links.hbs index 81289057..6b29bb1c 100644 --- a/src/components/direction-links/_direction-links.hbs +++ b/src/components/direction-links/_direction-links.hbs @@ -1,6 +1,4 @@