Skip to content

Commit

Permalink
Combobox: 💄 group review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianNymark committed Nov 11, 2024
1 parent 702bf27 commit 096f11f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
6 changes: 6 additions & 0 deletions @navikt/core/css/darkside/chips.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
17 changes: 10 additions & 7 deletions @navikt/core/css/darkside/form/combobox.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand All @@ -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 */
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 096f11f

Please sign in to comment.