Skip to content

Commit

Permalink
💄 - style: fix styling issues with Dropdown component
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvandescheur committed Oct 18, 2024
1 parent 4917066 commit 18249aa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
52 changes: 27 additions & 25 deletions src/components/dropdown/dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,39 @@
outline: 1px solid var(--page-color-primary);
}

.mykn-a,
.mykn-button,
.mykn-dropdown {
width: 100%;
}
@at-root {
&__dropdown {
width: fit-content;
border: 1px solid var(--page-color-primary);
border-radius: var(--border-radius-l);
box-sizing: border-box;
padding: 2px;
z-index: 1000;

&__dropdown {
width: fit-content;
border: 1px solid var(--page-color-primary);
border-radius: var(--border-radius-l);
box-sizing: border-box;
padding: 2px;
z-index: 1000;
}
.mykn-a,
.mykn-button,
.mykn-dropdown {
width: 100%;
}
}

@media screen and (max-width: constants.$breakpoint-desktop - 1px) {
&__dropdown {
width: 100%; // Fallback.
width: min(100%, max(calc(100vw - 2 * var(--spacing-h)), 100cqw));
@media screen and (max-width: constants.$breakpoint-desktop - 1px) {
&__dropdown {
width: 100%; // Fallback.
width: min(100%, max(calc(100vw - 2 * var(--spacing-h)), 100cqw));
}
}
}

@media screen and (min-width: constants.$breakpoint-desktop) {
&__dropdown .mykn-toolbar--direction-horizontal {
width: min-content;
@media screen and (min-width: constants.$breakpoint-desktop) {
&__dropdown .mykn-toolbar--direction-horizontal {
width: min-content;
}
}
}

@media screen and (min-width: constants.$breakpoint-desktop) {
&__dropdown .mykn-toolbar--direction-vertical {
width: max-content;
@media screen and (min-width: constants.$breakpoint-desktop) {
&__dropdown .mykn-toolbar--direction-vertical {
width: max-content;
}
}
}
}
2 changes: 2 additions & 0 deletions src/components/layout/page/page.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@use "../../../settings/constants";

.mykn-page {
align-items: start;
justify-content: start;
background-color: var(--page-color-background);
container-name: page;
display: flex;
Expand Down

0 comments on commit 18249aa

Please sign in to comment.