Skip to content

Commit

Permalink
chore(styles, components): remove strikethrough on disabled elements (#…
Browse files Browse the repository at this point in the history
…4095)

Co-authored-by: Philipp Gfeller <[email protected]>
  • Loading branch information
leagrdv and gfellerph authored Dec 2, 2024
1 parent c9bc8c0 commit 3361282
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .changeset/lovely-seas-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-components': patch
'@swisspost/design-system-styles': patch
---

Removed strikethrough style on disabled elements.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/

:host {

// remove as soon as all browser support :host-context()
// https://caniuse.com/?search=%3Ahost-context()
--post-card-control-bg-context: #{post.$backgrounds};
Expand Down Expand Up @@ -170,7 +169,6 @@
--post-card-control-input-bg: transparent;

border-style: dashed;
text-decoration: line-through;
cursor: default;

.card-control--input {
Expand Down
4 changes: 1 addition & 3 deletions packages/styles/src/components/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
text-decoration: none !important; // For <a> tags, !important for hover
white-space: nowrap; // Long content should never break in buttons

@include utilities.disabled-style() {
text-decoration: line-through !important;
}
@include utilities.disabled-style();

@include utilities.not-disabled-hover() {
color: var(--post-contrast-color-inverted); // Override <a> color
Expand Down
1 change: 0 additions & 1 deletion packages/styles/src/components/card-control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ fieldset {
--post-card-control-input-bg: transparent;

border-style: dashed;
text-decoration: line-through;
cursor: default;

input.form-check-input[type] {
Expand Down
1 change: 0 additions & 1 deletion packages/styles/src/components/form-check.scss
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@

&[disabled],
&[disabled] ~ .form-check-label {
text-decoration: line-through;
color: color.$black-alpha-60;

@include color-mx.on-dark-background() {
Expand Down
1 change: 0 additions & 1 deletion packages/styles/src/mixins/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@
border-color: var(--post-gray-40);
border-style: dashed;
background-clip: padding-box;
text-decoration: line-through;
// In case rules need to be slightly adjusted
@content;

Expand Down

0 comments on commit 3361282

Please sign in to comment.