Skip to content

Commit

Permalink
fix(styles): add back chevron on valid and invalid select (#3075)
Browse files Browse the repository at this point in the history
  • Loading branch information
alizedebray authored May 13, 2024
1 parent b5a7941 commit a48c83d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-tools-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': patch
---

Fixed missing chevron in valid and invalid select entries.
2 changes: 0 additions & 2 deletions packages/styles/src/components/form-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
&:not(:disabled) {
&:hover,
&:focus {
border-color: var(--post-contrast-color);

@include utilities.high-contrast-mode {
border-color: FieldText;
}
Expand Down
50 changes: 26 additions & 24 deletions packages/styles/src/components/form-validation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,6 @@
&:focus {
border-color: form-validation.$form-feedback-invalid-color;
}

&:not(&[type='file']) {
background-image: b.escape-svg(form-validation.$form-feedback-icon-invalid);

@include utilities-mx.high-contrast-mode() {
background-image: b.escape-svg(form-validation.$form-feedback-icon-invalid-hcm-dark);

@media (prefers-color-scheme: light) {
background-image: b.escape-svg(form-validation.$form-feedback-icon-invalid-hcm-light);
}
}
}
}

&.is-valid {
Expand All @@ -124,18 +112,6 @@
&:focus {
border-color: form-validation.$form-feedback-valid-color;
}

&:not(&[type='file']) {
background-image: b.escape-svg(form-validation.$form-feedback-icon-valid);

@include utilities-mx.high-contrast-mode() {
background-image: b.escape-svg(form-validation.$form-feedback-icon-valid-hcm-dark);

@media (prefers-color-scheme: light) {
background-image: b.escape-svg(form-validation.$form-feedback-icon-valid-hcm-light);
}
}
}
}

&.is-invalid,
Expand All @@ -159,6 +135,32 @@
}
}

.form-control:not([type='file']) {
&.is-invalid {
background-image: b.escape-svg(form-validation.$form-feedback-icon-invalid);

@include utilities-mx.high-contrast-mode() {
background-image: b.escape-svg(form-validation.$form-feedback-icon-invalid-hcm-dark);

@media (prefers-color-scheme: light) {
background-image: b.escape-svg(form-validation.$form-feedback-icon-invalid-hcm-light);
}
}
}

&.is-valid {
background-image: b.escape-svg(form-validation.$form-feedback-icon-valid);

@include utilities-mx.high-contrast-mode() {
background-image: b.escape-svg(form-validation.$form-feedback-icon-valid-hcm-dark);

@media (prefers-color-scheme: light) {
background-image: b.escape-svg(form-validation.$form-feedback-icon-valid-hcm-light);
}
}
}
}

.form-check-input {
@include form-validation-mx.form-validation-state-selector(invalid) {
border-color: form-validation.$form-feedback-invalid-color;
Expand Down

0 comments on commit a48c83d

Please sign in to comment.