Skip to content

Commit

Permalink
💄 Error borders uses danger-strong consistently (#3512)
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh authored Jan 22, 2025
1 parent 715a34a commit 6678742
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
6 changes: 3 additions & 3 deletions @navikt/core/css/darkside/form/combobox.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@

.navds-combobox--error {
& .navds-combobox__wrapper-inner {
border-color: var(--ax-border-danger);
box-shadow: 0 0 0 1px var(--ax-border-danger);
border-color: var(--ax-border-danger-strong);
box-shadow: 0 0 0 1px var(--ax-border-danger-strong);

&:has(.navds-combobox__input:focus-visible) {
border-color: var(--ax-border-danger);
border-color: var(--ax-border-danger-strong);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions @navikt/core/css/darkside/form/file-upload.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

.navds-dropzone--error > .navds-dropzone__area {
border-color: transparent;
outline: 2px solid var(--ax-border-danger);
outline: 2px solid var(--ax-border-danger-strong);
outline-offset: -1px;
}

Expand Down Expand Up @@ -165,7 +165,7 @@ li.navds-file-item {
}

.navds-file-item--error > .navds-file-item__inner {
outline: 2px solid var(--ax-border-danger);
outline: 2px solid var(--ax-border-danger-strong);
}

.navds-file-item__icon {
Expand Down
3 changes: 1 addition & 2 deletions @navikt/core/css/darkside/form/radio-checkbox.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,12 @@

.navds-checkbox--error > .navds-checkbox__input:not(:disabled, :checked, :indeterminate) + .navds-checkbox__label::before,
.navds-radio--error > .navds-radio__input:not(:disabled, :checked) + .navds-radio__label::before {
border-color: var(--ax-border-danger);
border-color: var(--ax-border-danger-strong);
}

.navds-checkbox--error > .navds-checkbox__input:not(:disabled, :checked, :indeterminate):hover + .navds-checkbox__label::before,
.navds-radio--error > .navds-radio__input:not(:disabled, :checked):hover + .navds-radio__label::before {
background-color: var(--ax-bg-danger-moderate-hoverA);
border-color: var(--ax-border-danger-strong);
}

.navds-checkbox--error > .navds-checkbox__input:is(:checked, :indeterminate):not(:disabled) + .navds-checkbox__label::before {
Expand Down
8 changes: 4 additions & 4 deletions @navikt/core/css/darkside/form/search.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@

/* --------------------------- Search Error-state --------------------------- */
.navds-search--error .navds-search__input:not(:disabled) {
border-color: var(--ax-border-danger);
border-color: var(--ax-border-danger-strong);
box-shadow:
inset -2px 0 0 0 var(--ax-border-danger),
inset 0 0 0 1px var(--ax-border-danger);
inset -2px 0 0 0 var(--ax-border-danger-strong),
inset 0 0 0 1px var(--ax-border-danger-strong);

&.navds-search__input--simple {
box-shadow: inset 0 0 0 1px var(--ax-border-danger);
box-shadow: inset 0 0 0 1px var(--ax-border-danger-strong);
}
}

Expand Down
4 changes: 2 additions & 2 deletions @navikt/core/css/darkside/form/select.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
/* --------------------------- Select Error-state --------------------------- */
.navds-select--error {
> * select {
box-shadow: 0 0 0 1px var(--ax-border-danger);
border-color: var(--ax-border-danger);
box-shadow: 0 0 0 1px var(--ax-border-danger-strong);
border-color: var(--ax-border-danger-strong);
}

> * select:hover,
Expand Down
4 changes: 2 additions & 2 deletions @navikt/core/css/darkside/form/text-field.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
}

.navds-text-field--error .navds-text-field__input:not(:disabled) {
border-color: var(--ax-border-danger);
box-shadow: 0 0 0 1px var(--ax-border-danger);
border-color: var(--ax-border-danger-strong);
box-shadow: 0 0 0 1px var(--ax-border-danger-strong);
}

.navds-text-field--readonly .navds-text-field__input {
Expand Down
4 changes: 2 additions & 2 deletions @navikt/core/css/darkside/form/textarea.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
}

.navds-textarea--error .navds-textarea__input:not(:disabled) {
box-shadow: 0 0 0 1px var(--ax-border-danger);
border-color: var(--ax-border-danger);
box-shadow: 0 0 0 1px var(--ax-border-danger-strong);
border-color: var(--ax-border-danger-strong);
}

@media (forced-colors: active) {
Expand Down

0 comments on commit 6678742

Please sign in to comment.