From 34810b1c15bea3a32c2beac962e070ea73ec01e4 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Mon, 20 Nov 2023 14:35:32 +0000 Subject: [PATCH] Fix and tweak chips and chip lists --- CHANGELOG.md | 12 ++++ .../components/card/card.scss | 43 ++++----------- .../components/card/template.njk | 14 +++-- src/nationalarchives/tools/_colour.scss | 10 ++-- .../utilities/_typography.scss | 55 ++++++++++++++++++- src/nationalarchives/variables/_colour.scss | 2 +- 6 files changed, 90 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5618a2b8..0cee14ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/nationalarchives/tna-frontend/compare/v0.1.25-prerelease...HEAD) ### Added + +- High contrast support for chip lists with icons + ### Changed + +- Card meta information changed to chip list + ### Deprecated ### Removed + +- Removed generic `accent` CSS variable + ### Fixed + +- Multiple line spacing for chip lists fixed + ### Security ## [0.1.25-prerelease](https://github.com/nationalarchives/tna-frontend/compare/v0.1.24-prerelease...v0.1.25-prerelease) - 2023-11-16 diff --git a/src/nationalarchives/components/card/card.scss b/src/nationalarchives/components/card/card.scss index 9db39262..c5ad1a3f 100644 --- a/src/nationalarchives/components/card/card.scss +++ b/src/nationalarchives/components/card/card.scss @@ -61,8 +61,8 @@ } &__meta { - margin: 0; - padding: 0; + // margin: 0; + // padding: 0; display: flex; flex-wrap: wrap; @@ -72,19 +72,19 @@ list-style: none; - &-item { - display: flex; - align-items: center; + // &-item { + // display: flex; + // align-items: center; - @include colour.colour-font("font-dark"); - @include typography.detail-font-small; + // @include colour.colour-font("font-dark"); + // @include typography.detail-font-small; - .fa-solid { - margin-right: 0.75rem; + // .fa-solid { + // margin-right: 0.75rem; - @include colour.colour-font("icon-light"); - } - } + // @include colour.colour-font("icon-light"); + // } + // } + p { margin-top: 1rem; @@ -200,24 +200,5 @@ @include colour.on-high-contrast { @include colour.colour-border("keyline-dark", 1px); - - &__meta { - &-item { - padding-right: 0.5rem; - - @include colour.colour-border("keyline-dark", 1px, solid); - - .fa-solid { - margin-right: 0.5rem; - padding: 0.5rem; - - @include colour.colour-font("contrast-font-base"); - - @include colour.colour-background("contrast-background"); - - @include colour.colour-border("keyline-dark", 1px, solid, right); - } - } - } } } diff --git a/src/nationalarchives/components/card/template.njk b/src/nationalarchives/components/card/template.njk index 2284b24e..c5a20a08 100644 --- a/src/nationalarchives/components/card/template.njk +++ b/src/nationalarchives/components/card/template.njk @@ -59,13 +59,15 @@ {%- endif %}
{%- if params.meta %} -