diff --git a/src/nationalarchives/components/card/card.scss b/src/nationalarchives/components/card/card.scss index bbdb6801..5d885435 100644 --- a/src/nationalarchives/components/card/card.scss +++ b/src/nationalarchives/components/card/card.scss @@ -27,7 +27,6 @@ &__image-container { height: 0; margin-bottom: 1rem; - // padding-bottom: #{math.div(9, 16) * 100%}; padding-bottom: #{math.div(2, 3) * 100%}; position: relative; diff --git a/src/nationalarchives/components/hero/hero.scss b/src/nationalarchives/components/hero/hero.scss index 3b52f49d..a29c9b26 100644 --- a/src/nationalarchives/components/hero/hero.scss +++ b/src/nationalarchives/components/hero/hero.scss @@ -162,9 +162,6 @@ } &--tint .tna-hero__figure { - // @include colour.colour-border("keyline-dark", 1px, solid, top); - // @include colour.colour-border("keyline-dark", 1px, solid, bottom); - &::before, &::after { position: absolute; @@ -193,14 +190,6 @@ .tna-hero__image { filter: grayscale(1) contrast(1.75) brightness(1.2); } - - .tna-hero__content-inner { - // @include colour.colour-border("keyline-dark", 1px); - - @include media.on-mobile { - // border: none; - } - } } @include media.on-mobile { diff --git a/src/nationalarchives/utilities/_forms.scss b/src/nationalarchives/utilities/_forms.scss index c321b1ab..ea7587be 100644 --- a/src/nationalarchives/utilities/_forms.scss +++ b/src/nationalarchives/utilities/_forms.scss @@ -71,7 +71,6 @@ &--xs { font-size: 1em; @include typography.main-font; - // @include typography.main-font-weight-bold; } } diff --git a/src/nationalarchives/utilities/_lists.scss b/src/nationalarchives/utilities/_lists.scss index efff54c6..20cc9121 100644 --- a/src/nationalarchives/utilities/_lists.scss +++ b/src/nationalarchives/utilities/_lists.scss @@ -94,15 +94,12 @@ &--plain { dt { padding-top: 0; - // padding-bottom: 0; padding-left: 0; } dd { - // margin-bottom: 0.5rem; padding-top: 0; padding-right: 0; - // padding-bottom: 0; } } diff --git a/src/nationalarchives/variables/_colour.scss b/src/nationalarchives/variables/_colour.scss index e9a90817..80be6415 100644 --- a/src/nationalarchives/variables/_colour.scss +++ b/src/nationalarchives/variables/_colour.scss @@ -123,7 +123,6 @@ $colour-palette-dark: map.merge( "contrast-background": #111, "contrast-link-visited": map.get($colour-palette-default, "contrast-link-visited"), - // "accent-background-light": brand-colour("light-grey"), ) ) !default; diff --git a/tasks/test-package.js b/tasks/test-package.js index f893f182..2eaae3fe 100644 --- a/tasks/test-package.js +++ b/tasks/test-package.js @@ -247,4 +247,23 @@ Object.keys(componentsWithJavaScript).forEach((component) => { console.log("\n"); -// TODO: Test CSS for contents +console.log(`Testing compiled CSS files`); +const cssAllPackage = fs + .readFileSync("package/nationalarchives/all.css") + .toString(); +const checkForClasses = ["tna-template", "tna-template__body"]; +checkForClasses.forEach((cssClass) => { + const escapedClass = cssClass.replace("-", "\\-"); + const regExp = cssAllPackage.match(new RegExp(`.${escapedClass}\{`, "g")); + if (regExp) { + pass( + `${cssClass.replace(/`{$/, "")} selector occurs ${regExp.length} time${ + regExp.length === 1 ? "" : "s" + } in compiled CSS`, + ); + } else { + fail(`${cssClass.replace(/`{$/, "")} selector missing from compiled CSS`); + process.exitCode = 1; + throw new Error("CSS test failed"); + } +});