From 096f11f304bd84376bf974d15e740fb89cfdef7e Mon Sep 17 00:00:00 2001 From: Julian Nymark Date: Mon, 11 Nov 2024 16:24:22 +0100 Subject: [PATCH] Combobox: :lipstick: group review fixes --- @navikt/core/css/darkside/chips.darkside.css | 6 ++++++ .../css/darkside/form/combobox.darkside.css | 17 ++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/@navikt/core/css/darkside/chips.darkside.css b/@navikt/core/css/darkside/chips.darkside.css index 3c05baedea..e5d5316d8f 100644 --- a/@navikt/core/css/darkside/chips.darkside.css +++ b/@navikt/core/css/darkside/chips.darkside.css @@ -33,6 +33,12 @@ } } +.navds-chips--readonly { + .navds-chips__chip { + background-color: var(--ax-bg-neutral-moderateA); + } +} + .navds-chips--small { .navds-chips__chip { min-height: 1.5rem; diff --git a/@navikt/core/css/darkside/form/combobox.darkside.css b/@navikt/core/css/darkside/form/combobox.darkside.css index 621e033c04..8905984314 100644 --- a/@navikt/core/css/darkside/form/combobox.darkside.css +++ b/@navikt/core/css/darkside/form/combobox.darkside.css @@ -48,6 +48,13 @@ .navds-combobox--readonly { pointer-events: none; + & .navds-combobox__selected-options { + & .navds-chips__chip { + /* TODO: remove !important and add readonly prop to Chips as well? == code changes */ + background-color: var(--ax-bg-neutral-moderateA) !important; + } + } + & .navds-combobox__button-toggle-list { color: var(--ax-bg-neutral-moderate); } @@ -298,7 +305,7 @@ justify-content: space-between; padding-block: var(--__axc-combobox-list-item-padding-block); padding-inline: var(--__axc-combobox-list-item-padding-inline); - border-radius: calc(var(--ax-border-radius-medium) - 2px); + border-radius: var(--ax-border-radius-medium); border: 0; margin-inline: var(--ax-spacing-2); margin-block: var(--ax-spacing-1); @@ -314,9 +321,10 @@ } .navds-combobox__list-item--max-selected { - background-color: var(--ax-bg-accent-moderate); + background-color: var(--ax-bg-neutral-moderateA); margin: 0; border-radius: 0; + border-bottom: 1px solid var(--ax-border-neutral-subtle); } /* ul-list and selectable li-items */ @@ -384,11 +392,6 @@ } } -.navds-combobox__list--with-hover .navds-combobox__list-item--new-option:hover { - border-bottom: 1px solid var(--ax-border-accent-subtleA); - background: var(--ax-bg-accent-moderate-hoverA); -} - .navds-combobox__list-item--new-option--focus { border-radius: calc(var(--ax-border-radius-medium) - 1px);