From b2f796d681f1c1d76d26d1fd743268c8c618a854 Mon Sep 17 00:00:00 2001 From: Ken <26967723+KenAJoh@users.noreply.github.com> Date: Wed, 7 Jun 2023 15:22:02 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Text-subtle,=20icon-subtle=20til?= =?UTF-8?q?=20700=20niv=C3=A5,=20form-description=20farger(#2036)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/wild-chefs-rescue.md | 8 ++++++++ @navikt/core/css/form/fieldset.css | 4 ++++ @navikt/core/css/form/form.css | 1 + @navikt/core/css/tokens.json | 4 ++++ @navikt/core/tokens/docs.json | 4 ++-- @navikt/core/tokens/src/semantic-colors.json | 4 ++-- 6 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 .changeset/wild-chefs-rescue.md diff --git a/.changeset/wild-chefs-rescue.md b/.changeset/wild-chefs-rescue.md new file mode 100644 index 0000000000..39d22b4a28 --- /dev/null +++ b/.changeset/wild-chefs-rescue.md @@ -0,0 +1,8 @@ +--- +"@navikt/ds-css": minor +"@navikt/ds-tokens": minor +--- + +- Oppdatert text-subtle og icon-subtle tokens til 700-skala (tidligere 600). +- Icon-subtle bruker nå grayalpha. +- Alle description-felter på fieldsets har nå text-subtle som farge. diff --git a/@navikt/core/css/form/fieldset.css b/@navikt/core/css/form/fieldset.css index dcfa3c05b3..d5d4edb77e 100644 --- a/@navikt/core/css/form/fieldset.css +++ b/@navikt/core/css/form/fieldset.css @@ -9,6 +9,10 @@ margin-top: var(--a-spacing-2); } +.navds-fieldset__description { + color: var(--ac-form-description, var(--a-text-subtle)); +} + .navds-fieldset > .navds-fieldset__description:not(:empty) { margin-top: 0.125rem; } diff --git a/@navikt/core/css/form/form.css b/@navikt/core/css/form/form.css index 285897202d..e2c3f8fe4f 100644 --- a/@navikt/core/css/form/form.css +++ b/@navikt/core/css/form/form.css @@ -6,6 +6,7 @@ .navds-form-field__description { margin-top: -6px; + color: var(--ac-form-description, var(--a-text-subtle)); } .navds-form-field .navds-error-message, diff --git a/@navikt/core/css/tokens.json b/@navikt/core/css/tokens.json index 68ec9825c4..9cb0c91f58 100644 --- a/@navikt/core/css/tokens.json +++ b/@navikt/core/css/tokens.json @@ -349,6 +349,10 @@ "--ac-radio-checkbox-error-border": "--a-border-danger", "--ac-radio-checkbox-error-hover-bg": "--a-surface-danger-subtle" }, + "forms": { + "--ac-form-description": "--a-text-subtle", + "--ac-form-subdescription": "--a-text-subtle" + }, "search": { "--ac-search-button-border": "--a-border-default", "--ac-search-button-border-hover": "--a-border-action", diff --git a/@navikt/core/tokens/docs.json b/@navikt/core/tokens/docs.json index b5c171894d..1874bc77dc 100644 --- a/@navikt/core/tokens/docs.json +++ b/@navikt/core/tokens/docs.json @@ -221,7 +221,7 @@ ], "semantic-text": [ { "name": "--a-text-default", "value": "rgba(38, 38, 38, 1)" }, - { "name": "--a-text-subtle", "value": "rgba(0, 0, 0, 0.56)" }, + { "name": "--a-text-subtle", "value": "rgba(0, 0, 0, 0.65)" }, { "name": "--a-text-visited", "value": "rgba(99, 70, 137, 1)" }, { "name": "--a-text-danger", "value": "rgba(195, 0, 0, 1)" }, { "name": "--a-text-action", "value": "rgba(0, 103, 197, 1)" }, @@ -339,7 +339,7 @@ ], "semantic-icon": [ { "name": "--a-icon-default", "value": "rgba(38, 38, 38, 1)" }, - { "name": "--a-icon-subtle", "value": "rgba(112, 112, 112, 1)" }, + { "name": "--a-icon-subtle", "value": "rgba(0, 0, 0, 0.65)" }, { "name": "--a-icon-on-neutral", "value": "rgba(255, 255, 255, 1)" }, { "name": "--a-icon-on-inverted", "value": "rgba(255, 255, 255, 1)" }, { "name": "--a-icon-action", "value": "rgba(0, 103, 197, 1)" }, diff --git a/@navikt/core/tokens/src/semantic-colors.json b/@navikt/core/tokens/src/semantic-colors.json index 849bc61c32..5c1e49314f 100644 --- a/@navikt/core/tokens/src/semantic-colors.json +++ b/@navikt/core/tokens/src/semantic-colors.json @@ -5,7 +5,7 @@ "value": "{a.gray.900.value}" }, "subtle": { - "value": "{a.grayalpha.600.value}" + "value": "{a.grayalpha.700.value}" }, "visited": { "value": "{a.purple.500.value}" @@ -284,7 +284,7 @@ "value": "{a.gray.900.value}" }, "subtle": { - "value": "{a.gray.600.value}" + "value": "{a.grayalpha.700.value}" }, "action": { "selected": { "value": "{a.deepblue.500.value}" },