-
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.
chore(documentation): update version switcher to match v7 format/styles
- Loading branch information
1 parent
23b05e9
commit 19923a2
Showing
2 changed files
with
104 additions
and
103 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
68 changes: 38 additions & 30 deletions
68
packages/documentation/.storybook/addons/version-switcher/version-switcher.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,56 +1,64 @@ | ||
@use '../../../node_modules/@swisspost/design-system-styles/variables/type'; | ||
@use '../../../node_modules/@swisspost/design-system-styles/variables/spacing'; | ||
@use '@swisspost/design-system-styles/core' as post; | ||
|
||
.version-switcher-loading { | ||
.version-switcher__loading { | ||
display: flex; | ||
align-items: center; | ||
font-size: type.$font-size-14; | ||
font-size: post.$font-size-14; | ||
} | ||
|
||
.version-switcher-dropdown { | ||
.version_switcher__sizing_placeholder { | ||
visibility: hidden !important; | ||
} | ||
|
||
.version-switcher__dropdown { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
gap: post.$size-line; | ||
position: absolute; | ||
top: -5px; | ||
right: 0; | ||
padding: post.$size-mini; | ||
background-color: var(--post-light); | ||
font-size: type.$font-size-14; | ||
border: post.$border-width solid post.$border-color; | ||
border-radius: post.$border-radius; | ||
font-size: post.$font-size-sm; | ||
|
||
.version-switcher-dropdown-item { | ||
padding: spacing.$size-mini spacing.$size-small-regular; | ||
.dropdown__item { | ||
display: block; | ||
padding: post.$size-mini post.$size-small-regular; | ||
border-radius: post.$border-radius-sm; | ||
text-decoration: none; | ||
color: inherit; | ||
|
||
& + .version-switcher-dropdown-item { | ||
border-top: 1px solid var(--post-black); | ||
} | ||
|
||
&:hover { | ||
background-color: var(--post-gray-10); | ||
background-color: post.$gray-10; | ||
} | ||
|
||
&.active { | ||
background-color: rgba(var(--post-yellow-rgb), 0.4); | ||
background-color: post.$yellow; | ||
} | ||
} | ||
} | ||
|
||
.version-switcher-dependencies { | ||
margin-top: spacing.$size-micro; | ||
font-size: type.$font-size-12; | ||
border-spacing: 0; | ||
.item__title { | ||
display: block; | ||
} | ||
|
||
td { | ||
width: 12ch; | ||
& + td { | ||
padding: spacing.$size-micro; | ||
} | ||
.item__deps { | ||
display: flex; | ||
gap: post.$size-small-regular; | ||
} | ||
|
||
span { | ||
.deps_dep { | ||
display: flex; | ||
align-items: center; | ||
gap: spacing.$size-micro; | ||
gap: post.$size-line; | ||
font-size: 85%; | ||
} | ||
|
||
img { | ||
max-width: 1.5em; | ||
} | ||
.dep__icon { | ||
display: block; | ||
height: 1.1em; | ||
} | ||
|
||
.dep__version { | ||
} | ||
} |