Skip to content

Commit

Permalink
fix #143
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Aug 27, 2021
1 parent 4497637 commit cb6bf75
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 54 deletions.
57 changes: 30 additions & 27 deletions src/css/object/component/_drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,52 +126,55 @@ Drawer component
opacity: 0 !important;
}

&__menu {
&__menu,
&__submenu {
@include _list-unstyled();

> *:not(:first-child) {
@include _margin-top(.5, false);
}
}

&__item,
&__subitem {
position: relative;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
overflow: hidden;

&--has-submenu {
display: flex;
flex-wrap: wrap;
justify-content: space-between;

> * {
flex: 1 1 auto;
}

> a {
padding-right: 1rem;
@include _padding-right(.5);
max-width: calc(100% - 42px);
}
}

> a {
flex: 1 1 auto;
}

> .#{$_prefix}c-drawer__toggle {
flex: 0 0 auto;
max-width: 42px;
width: 100%;
overflow: hidden;
}
> .#{$_prefix}c-drawer__toggle {
flex: 0 0 auto;
max-width: 42px;
width: 100%;
overflow: hidden;
}

> .#{$_prefix}c-drawer__submenu {
flex: 1 1 100%;
> .#{$_prefix}c-drawer__submenu {
flex: 1 1 100%;
}
}
}

&__item {
@include _margin(.5, 0, 0, 1);
}

&__submenu {
@include _list-unstyled();
margin-left: 1em;
}
@include _margin-top(.5, false);
@include _margin-left(.5, false);

&__subitem {
@include _margin(.5, 0, 0);
&[aria-hidden="true"] {
display: none;
visibility: hidden;
}
}

&__toggle {
Expand Down
57 changes: 30 additions & 27 deletions src/css/object/component/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,52 +61,55 @@ Dropdown component
transition-timing-function: ease-out;
}

&__menu {
&__menu,
&__submenu {
@include _list-unstyled();

> *:not(:first-child) {
@include _margin-top(.5, false);
}
}

&__item,
&__subitem {
position: relative;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
overflow: hidden;

&--has-submenu {
display: flex;
flex-wrap: wrap;
justify-content: space-between;

> * {
flex: 1 1 auto;
}

> a {
padding-right: 1rem;
@include _padding-right(.5);
max-width: calc(100% - 42px);
}
}

> a {
flex: 1 1 auto;
}

> .#{$_prefix}c-dropdown__toggle {
flex: 0 0 auto;
max-width: 42px;
width: 100%;
overflow: hidden;
}
> .#{$_prefix}c-dropdown__toggle {
flex: 0 0 auto;
max-width: 42px;
width: 100%;
overflow: hidden;
}

> .#{$_prefix}c-dropdown__submenu {
flex: 1 1 100%;
> .#{$_prefix}c-dropdown__submenu {
flex: 1 1 100%;
}
}
}

&__item {
@include _margin(.5, 0, 0, 1);
}

&__submenu {
@include _list-unstyled();
margin-left: 1em;
}
@include _margin-top(.5, false);
@include _margin-left(.5, false);

&__subitem {
@include _margin(.5, 0, 0);
&[aria-hidden="true"] {
display: none;
visibility: hidden;
}
}

&__toggle {
Expand Down

0 comments on commit cb6bf75

Please sign in to comment.