From 95385939db41a0d05e21589eb4b9609e6955af81 Mon Sep 17 00:00:00 2001 From: Ghazal Salehi Date: Tue, 6 Jun 2023 10:11:58 +1000 Subject: [PATCH 1/7] QOLDEV-430 Removing visited links style from _bridge-bootstrap3 --- .../_blocks/scss-general/bootstrap/_bridge_bootstrap3.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/assets/_project/_blocks/scss-general/bootstrap/_bridge_bootstrap3.scss b/src/assets/_project/_blocks/scss-general/bootstrap/_bridge_bootstrap3.scss index 2d62b268e..3dbf4e0b0 100644 --- a/src/assets/_project/_blocks/scss-general/bootstrap/_bridge_bootstrap3.scss +++ b/src/assets/_project/_blocks/scss-general/bootstrap/_bridge_bootstrap3.scss @@ -477,7 +477,3 @@ label { font-weight: 700; } -// preserve visited link colour -a:visited:not(.btn, .button, .qg-btn):not(.qg-private-content a):not([class^="dfv"]):not([class*=' dfv']) { - color: #80b; -} From 52e69da7073edac96568894be7b8aa3fb6fe8819 Mon Sep 17 00:00:00 2001 From: Ghazal Salehi Date: Tue, 6 Jun 2023 10:58:29 +1000 Subject: [PATCH 2/7] Increasing the version in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 779b6de17..76b03234e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Queensland-Government-Web-Template", - "version": "4.2.1", + "version": "4.2.2", "description": "This template is designed to provide a template for all Franchise websites, and the underpinning technology for new Agency websites.", "main": "gulpfile.babel.js", "repository": { From ddfb32e256f769795a51f124d3e8733d92565fa7 Mon Sep 17 00:00:00 2001 From: Steve Pegg <126438309+stvp-qld@users.noreply.github.com> Date: Tue, 6 Jun 2023 13:09:39 +1000 Subject: [PATCH 3/7] QOLDEV-67 and QOLSVC-2024 hotfix for carousel links --- .../_project/_blocks/components/carousel/_qg-carousel.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/assets/_project/_blocks/components/carousel/_qg-carousel.scss b/src/assets/_project/_blocks/components/carousel/_qg-carousel.scss index 95dda8d9e..230aaa34d 100644 --- a/src/assets/_project/_blocks/components/carousel/_qg-carousel.scss +++ b/src/assets/_project/_blocks/components/carousel/_qg-carousel.scss @@ -123,8 +123,9 @@ position: initial; left: inherit; top: 0; - width: inherit; right: 0; + width: inherit; + margin: 0 !important; background-image: none; color: #000; text-shadow: none; From e0d77df8a543d5379b9761cf030a6c9a9bd04dc8 Mon Sep 17 00:00:00 2001 From: Ghazal Salehi Date: Tue, 6 Jun 2023 13:36:55 +1000 Subject: [PATCH 4/7] QOLDEV-431 Displaying only the direct parent page in the breadcrumb for small devices --- .../_blocks/layout/breadcrumbs/_breadcrumbs.scss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/assets/_project/_blocks/layout/breadcrumbs/_breadcrumbs.scss b/src/assets/_project/_blocks/layout/breadcrumbs/_breadcrumbs.scss index c2ceacdd3..47d16c914 100644 --- a/src/assets/_project/_blocks/layout/breadcrumbs/_breadcrumbs.scss +++ b/src/assets/_project/_blocks/layout/breadcrumbs/_breadcrumbs.scss @@ -31,16 +31,16 @@ } &.shortened { - height: 0; + height: 0; overflow: hidden; max-width: 0; transition: max-width 0s; } .qg-breadcrumb-list-item__link { - color: #292929; - @include qg-link-styles__theme-black-always; - } + color: #292929; + @include qg-link-styles__theme-black-always; + } &:last-child { &:after { @@ -59,7 +59,7 @@ } @include media-breakpoint-down(sm) { - .qg-breadcrumb-list-item { + #qg-breadcrumb .qg-breadcrumb-list-item { display: none; &:nth-last-child(2) { From 3518f5debcca5cf6689530aaade06803add814c4 Mon Sep 17 00:00:00 2001 From: Steve Pegg <126438309+stvp-qld@users.noreply.github.com> Date: Tue, 6 Jun 2023 15:59:47 +1000 Subject: [PATCH 5/7] QOLDEV-428 accordion button hover state hotfix --- .../components/accordion/_qg-accordion.scss | 130 +++++++++++++----- 1 file changed, 99 insertions(+), 31 deletions(-) diff --git a/src/assets/_project/_blocks/components/accordion/_qg-accordion.scss b/src/assets/_project/_blocks/components/accordion/_qg-accordion.scss index f7cb7aaeb..87f056a36 100644 --- a/src/assets/_project/_blocks/components/accordion/_qg-accordion.scss +++ b/src/assets/_project/_blocks/components/accordion/_qg-accordion.scss @@ -1,31 +1,48 @@ .qg-accordion { - &.qg-accordion-v2{ - article{ + &.qg-accordion-v2 { + article { border: 1px solid gray; + &:last-child { border-bottom: 1px solid gray !important; } - & + article{ - border-top:none; + + &+article { + border-top: none; } + .collapsing-section { border-top: 1px solid gray; padding: 1rem; + & *:first-child { margin-top: 0; } + & *:last-child { margin-bottom: 0; } } - .acc-heading{ + + .acc-heading { + padding: 1rem; + + &:hover > a, + &:focus > a, + &:focus-visible > a + { + text-decoration-thickness: 2px !important; + } + + .title { color: $qg-blue-dark; text-decoration-line: underline; font-weight: bold; padding-right: 1.8rem; } + .qg-accordion--ga:after { content: ' '; position: absolute; @@ -40,21 +57,26 @@ z-index: 101; transition: transform 0.25s ease-in; } + .accordion-label { display: inline-block; } - img + .accordion-label{ + + img+.accordion-label { margin-left: 2.5rem; margin-bottom: 0; } } - .qg-accordion--open .qg-accordion--ga:after{ + + .qg-accordion--open .qg-accordion--ga:after { transform: rotate(0deg); } - .qg-accordion--closed .qg-accordion--ga:after{ + + .qg-accordion--closed .qg-accordion--ga:after { transform: rotate(-180deg); } - .qg-accordion--open + .collapsing-section { + + .qg-accordion--open+.collapsing-section { display: block; visibility: inherit; opacity: inherit; @@ -62,71 +84,92 @@ } } } + button { @include qg-button-outline-decoration ($margin: 0px) { z-index: 100; } } + &.qg-dark-accordion article { background-color: #f5f5f5; } - .qg-acc-controls{ + + .qg-acc-controls { text-align: right; margin-bottom: 0.4em; - button{ + + button { border: none; background: none; color: $qg-blue-dark !important; font-weight: 700; } - a{ + + a { text-decoration-line: none !important; padding: 0.4rem 0.7rem; @include qg-link-unvisited-color($qg-blue-dark !important); font-weight: bold; display: inline-block; } + .collapse:not(.show) { display: inline; } } + //label selector is to provide backward compatibility in case projects are using old markup - label[for="expand"], label[for="collapse"] { + label[for="expand"], + label[for="collapse"] { text-decoration-line: none !important; padding: 0 0.7rem; color: $qg-blue-dark !important; font-weight: bold; display: inline-block; } - .expand, .collapse, label[for="expand"], label[for="collapse"] { - &:hover, &.hover { + + .expand, + .collapse, + label[for="expand"], + label[for="collapse"] { + + &:hover, + &.hover { text-decoration-line: underline !important; } } - .ht{ + + .ht { text-decoration-line: underline; } + article { position: relative; width: 100%; color: $black; border-bottom: 1px solid #dedede; + &:last-child { border-bottom: none; } + .acc-heading { position: relative; padding: 0.6rem 0.7rem; width: 100%; background: transparent; - border:none; - text-align:left; - .title{ + border: none; + text-align: left; + + .title { display: block; + &:hover { text-decoration-line: underline; } } + label { position: relative; display: block; @@ -138,30 +181,36 @@ padding-right: 2rem; margin-bottom: 0; } - img, .fa { + + img, + .fa { position: absolute; top: 50%; transform: translateY(-50%); right: 0; left: 1rem; - + label{ + + +label { padding-left: 2.7rem; } } + img { width: 1.8em; height: auto; } + .subtitle { @include rem(font-size, 16px); font-weight: 400; display: block; margin-top: 0.3rem; color: #000; - margin-right:1rem; + margin-right: 1rem; } } } + .collapsing-section { background: white; max-height: 0; @@ -172,29 +221,36 @@ border: 0; padding: 1rem 2.5rem; display: none; + p { margin-top: 0 !important; } } - input[name=tabs],input[name=control] { + + input[name=tabs], + input[name=control] { position: absolute; opacity: 0; z-index: -1; - &:checked ~ .collapsing-section { + + &:checked~.collapsing-section { max-height: inherit; visibility: visible; opacity: 1; transition: visibility 0s linear 0s, opacity 900ms; display: block; } - &[type=checkbox]:checked + .acc-heading label i { + + &[type=checkbox]:checked+.acc-heading label i { transform: rotate(-135deg); -webkit-transform: rotate(-135deg); } - &[type=checkbox]:checked + .acc-heading .title{ + + &[type=checkbox]:checked+.acc-heading .title { text-decoration-line: underline; } - &.expand:checked ~ article { + + &.expand:checked~article { .collapsing-section { max-height: inherit; visibility: visible; @@ -203,11 +259,13 @@ } } } + .arrow { position: absolute; top: 34%; line-height: 0; right: 8px; + i { border: solid #007EB1; border-width: 0 3px 3px 0; @@ -218,6 +276,7 @@ } } } + @media screen and (max-width: 640px) { .qg-accordion .acc-heading { font-size: 1em; @@ -226,12 +285,21 @@ // IOS safari specific styles @media not all and (min-resolution:.001dpcm) { - .qg-accordion .acc-heading:focus, .qg-accordion .acc-heading.focus { + + .qg-accordion .acc-heading:focus, + .qg-accordion .acc-heading.focus { outline: 2px solid $qg-blue; } - .qg-accordion .expand:focus, .qg-accordion .expand:active, .qg-accordion .collapse:focus, .qg-accordion .collapse:active, - .qg-accordion .expand.focus, .qg-accordion .expand.active, .qg-accordion .collapse.focus, .qg-accordion .collapse.active { + + .qg-accordion .expand:focus, + .qg-accordion .expand:active, + .qg-accordion .collapse:focus, + .qg-accordion .collapse:active, + .qg-accordion .expand.focus, + .qg-accordion .expand.active, + .qg-accordion .collapse.focus, + .qg-accordion .collapse.active { outline: 2px solid $qg-blue !important; outline-offset: -2px; } -} +} \ No newline at end of file From 6fcf300b7baee119355a3ef64c280c8ed7e92be3 Mon Sep 17 00:00:00 2001 From: Ghazal Salehi Date: Wed, 7 Jun 2023 08:48:52 +1000 Subject: [PATCH 6/7] QOLDEV-427 hover style for links within alert boxes --- src/assets/_project/_blocks/components/alerts/_qg-alert.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/assets/_project/_blocks/components/alerts/_qg-alert.scss b/src/assets/_project/_blocks/components/alerts/_qg-alert.scss index d5f60fc0d..745fab708 100644 --- a/src/assets/_project/_blocks/components/alerts/_qg-alert.scss +++ b/src/assets/_project/_blocks/components/alerts/_qg-alert.scss @@ -24,6 +24,10 @@ @include qg-global-link-styles { @include qg-link-decoration; } + &:hover { + text-decoration-thickness: 2px !important; + color: $qg-blue-dark; + } } & + p{ margin-top: 1em; From c907831a6908397d7f85b1d50a98d813c42454c5 Mon Sep 17 00:00:00 2001 From: Steve Pegg <126438309+stvp-qld@users.noreply.github.com> Date: Wed, 7 Jun 2023 11:53:52 +1000 Subject: [PATCH 7/7] QOLDEV-434 refactor setHeight function --- src/assets/_project/_blocks/utils/qg-misc.js | 50 ++++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/src/assets/_project/_blocks/utils/qg-misc.js b/src/assets/_project/_blocks/utils/qg-misc.js index 285aee52a..334e7e5b9 100644 --- a/src/assets/_project/_blocks/utils/qg-misc.js +++ b/src/assets/_project/_blocks/utils/qg-misc.js @@ -25,21 +25,20 @@ }); // this function equals the height of the cards in a group, if it finds a class '.cards__equal-height'. function setHeight() { - if ($('.cards__equal-height').length > 0) { - $('.qg-cards.cards__equal-height').each(function () { - // Cache the highest - var highestBox = 0; - // Select and loop the elements you want to equalise - $(this) - .find('.details') - .each(function () { - // If this box is higher than the cached highest then store it - if ($(this).height() > highestBox) { - highestBox = $(this).height(); - } - }); - // Set the height of all those children to whichever was highest - $(this).find('.details').height(highestBox); + const equalHeightCards = document.querySelectorAll('.qg-cards__equal-height'); + + if (equalHeightCards.length > 0) { + equalHeightCards.forEach((cardBlock) => { + let maxHeight = 0; + const cards = cardBlock.querySelectorAll('.qg-card .details'); + + cards.forEach((card) => { + maxHeight = Math.max(maxHeight, card.offsetHeight); + }); + + cards.forEach((card) => { + card.style.height = `${maxHeight}px`; + }); }); } } @@ -55,7 +54,7 @@ // check if a view is loaded in an iframe , this is to detect Squiz Matrix preview mode // and insert a class so that additional styles can be applied let frameAttr = window.frameElement && window.frameElement.getAttribute('Name'); - if (frameAttr && frameAttr === 'ees_modePreviewFrame'){ + if (frameAttr && frameAttr === 'ees_modePreviewFrame') { $('.container-fluid').addClass('qg-edit-plus-styles'); } @@ -71,14 +70,13 @@ }, ]; // setTimeout is just a temporary solution for display the warning message in SPA as elements are created on the fly - setTimeout( - () => { - deprecationWarnings.forEach(({selector, label}) => { - if ($(selector).length) { - console.warn(`Please change the font awesome element in ${label} from i to span, we'll be removing the css in this element before 22nd june 2022. Please refer to the https://github.com/qld-gov-au/qg-web-template/pull/391 for more details.`); - } - }); - }, - 5000, - ); + setTimeout(() => { + deprecationWarnings.forEach(({ selector, label }) => { + if ($(selector).length) { + console.warn( + `Please change the font awesome element in ${label} from i to span, we'll be removing the css in this element before 22nd june 2022. Please refer to the https://github.com/qld-gov-au/qg-web-template/pull/391 for more details.`, + ); + } + }); + }, 5000); })(jQuery, qg.swe);