diff --git a/src/components/breadcrumbs/_breadcrumbs.hbs b/src/components/breadcrumbs/_breadcrumbs.hbs index 1fc2966a7..889ebfbf0 100644 --- a/src/components/breadcrumbs/_breadcrumbs.hbs +++ b/src/components/breadcrumbs/_breadcrumbs.hbs @@ -1,9 +1,19 @@ diff --git a/src/components/breadcrumbs/_breadcrumbs.scss b/src/components/breadcrumbs/_breadcrumbs.scss index dd9ba565e..9fbff654a 100644 --- a/src/components/breadcrumbs/_breadcrumbs.scss +++ b/src/components/breadcrumbs/_breadcrumbs.scss @@ -9,49 +9,67 @@ } li { - display: none; + display: inline; - &::before { - @include material-icons; - content: 'keyboard_arrow_right'; - content: 'keyboard_arrow_right' / ''; - font-size: rem(map-get($nsw-icon-sizes, 20)); - line-height: rem(8px); - display: inline-block; - position: relative; - top: rem(6px); - } - - @include breakpoint('md') { - display: inline; - } - - &:nth-last-child(2), - &:last-child { - display: inline; + &:first-child { + &::before { + display: none; + } } - &:nth-last-child(2) { + &:nth-child(2) { &::before { - display: none; + display: inline-block; @include breakpoint('md') { - display: inline-block; + display: none; } } } - &:first-child { - &::before { + .nsw-breadcrumbs__toggle { + display: none; + } + + .nsw-breadcrumbs__ellipsis { + cursor: pointer; + display: inline-block; + + @include breakpoint('md') { display: none; + } + } - @include breakpoint('md') { - display: none; - } + .nsw-breadcrumbs__toggle:checked + .nsw-breadcrumbs__ellipsis { + display: none; + } + + &*:not(:first-child):not(:last-child):not(:nth-last-child(2)):not(.nsw-breadcrumbs__show-more) { + display: none; + + @include breakpoint('md') { + display: inline-block; } } } + .nsw-breadcrumbs__toggle:checked ~ li { + display: inline-block; + background: var(--nsw-text-dark); + } + + li { + &::before { + @include material-icons; + content: 'keyboard_arrow_right'; + font-size: rem(map-get($nsw-icon-sizes, 20)); + line-height: rem(8px); + display: inline-block; + position: relative; + top: rem(6px); + } + } + a { font-weight: var(--nsw-font-normal); @@ -60,7 +78,7 @@ pointer-events: none; color: var(--nsw-text-dark); - .nsw-section--invert & { + .nsw-section--invert & { color: var(--nsw-text-light); } } @@ -68,7 +86,7 @@ } @supports (content: 'x' / 'y') { - .nsw-breadcrumbs { + .nsw-breadcrumbs { li { &::before { content: 'keyboard_arrow_right' / ''; @@ -78,7 +96,7 @@ } @media speech { - .nsw-breadcrumbs { + .nsw-breadcrumbs { li { &::before { display: none; diff --git a/src/components/breadcrumbs/blank.hbs b/src/components/breadcrumbs/blank.hbs index aa91b61bb..6de5225cc 100644 --- a/src/components/breadcrumbs/blank.hbs +++ b/src/components/breadcrumbs/blank.hbs @@ -1,7 +1,7 @@ --- title: Breadcrumbs width: narrow -model: json/breadcrumbs.json +model: json/breadcrumbs-2.json page: true --- diff --git a/src/components/breadcrumbs/json/breadcrumbs-2.json b/src/components/breadcrumbs/json/breadcrumbs-2.json new file mode 100644 index 000000000..e22ba7c71 --- /dev/null +++ b/src/components/breadcrumbs/json/breadcrumbs-2.json @@ -0,0 +1,29 @@ +{ + "label": "Breadcrumbs", + "items": [ + { + "text": "Home", + "url": "#" + }, + { + "text": "About DPC", + "url": "#" + }, + { + "text": "Assurance", + "url": "#" + }, + { + "text": "Strategy", + "url": "#" + }, + { + "text": "NSW Digital Design System", + "url": "#" + }, + { + "text": "Content design", + "url": "#" + } + ] +}