-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 4326-update-megadropdown-styles
- Loading branch information
Showing
77 changed files
with
654 additions
and
672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': major | ||
'@swisspost/design-system-components': major | ||
--- | ||
|
||
Renamed the "dropdown" variant to "menu" for the `post-language-switch` and `post-language-option` components. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
'@swisspost/design-system-components': patch | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Removed all usage of deprecated utility sizing classes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-components': patch | ||
--- | ||
|
||
Updated style and keyboard navigation of `post-language-switch`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-styles': major | ||
--- | ||
|
||
Removed deprecated utility sizing and line-height classes as well as `responsive-size`, `generate-utility-class` and all `bezel-*` mixins. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 65 additions & 46 deletions
111
packages/components/src/components/post-language-option/post-language-option.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,83 @@ | ||
@use '@swisspost/design-system-styles/core' as post; | ||
@use '@swisspost/design-system-styles/mixins/utilities' as utilities-mx; | ||
|
||
:host { | ||
post-language-option { | ||
display: inline-block; | ||
width: fit-content; | ||
} | ||
|
||
button { | ||
@include post.reset-button; | ||
} | ||
button { | ||
@include post.reset-button; | ||
} | ||
|
||
a { | ||
color: inherit; | ||
text-decoration: none; | ||
} | ||
a { | ||
color: inherit; | ||
text-decoration: none; | ||
} | ||
|
||
:is(a, button) { | ||
cursor: pointer; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100%; | ||
width: 100%; | ||
padding: var(--post-language-option-padding); | ||
:is(a, button) { | ||
cursor: pointer; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100%; | ||
width: 100%; | ||
padding: var(--post-language-option-padding); | ||
border-radius: 2px; | ||
@include utilities-mx.focus-style; | ||
} | ||
} | ||
|
||
.post-language-option-list { | ||
@include post.focus-style; | ||
border-radius: 2px; | ||
width: 40px; | ||
height: 40px; | ||
post-language-option:where([variant='list']) { | ||
:is(a, button) { | ||
width: 40px; | ||
height: 40px; | ||
|
||
&[aria-current='true'], | ||
&[aria-current='page'] { | ||
background-color: #050400; | ||
color: #fff; | ||
&:hover { | ||
color: #504f4b; | ||
} | ||
|
||
&[aria-current='true'], | ||
&[aria-current='page'] { | ||
background-color: #050400; | ||
color: #fff; | ||
|
||
&:hover { | ||
background-color: #504f4b; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.post-language-option-dropdown { | ||
padding-block: 13px; | ||
padding-inline: 24px; | ||
box-sizing: border-box; | ||
position: relative; | ||
post-language-option:where([variant='menu']) { | ||
width: 100%; | ||
|
||
:is(a, button) { | ||
padding-block: 13px; | ||
padding-inline: 24px; | ||
box-sizing: border-box; | ||
position: relative; | ||
left: -1px; | ||
width: calc(100% + 2px); | ||
|
||
&[aria-current='true'], | ||
&[aria-current='page'] { | ||
&::after { | ||
content: ''; | ||
left: 0; | ||
height: 3px; | ||
background-color: #050400; | ||
width: 100%; | ||
display: block; | ||
position: absolute; | ||
bottom: 3px; | ||
} | ||
|
||
&[aria-current='true'], | ||
&[aria-current='page'] { | ||
&::after { | ||
content: ''; | ||
left: -2px; | ||
height: 3px; | ||
background-color: #504f4b; | ||
width: calc(100% + 4px); | ||
display: block; | ||
position: absolute; | ||
bottom: 3px; | ||
&:hover::after { | ||
background-color: #504f4b; | ||
} | ||
} | ||
|
||
&:focus::after { | ||
width: calc(100% - 5px); | ||
left: 2px; | ||
&:hover { | ||
color: #504f4b; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.