diff --git a/less/dropdown.less b/less/dropdown.less index 4f5907f..d726932 100644 --- a/less/dropdown.less +++ b/less/dropdown.less @@ -21,6 +21,21 @@ @dropdown-nav-divider-margin: 5px; +/* Mobile Dropdown*/ +@dropdown-mobile-z-index: @global-z-index; +@dropdown-mobile-background: rgba(0, 0, 0, 0.8); +@dropdown-mobile-container-height: 70vh; +@dropdown-mobile-container-background: @global-inverse-color; +@dropdown-mobile-container-border-radius: 30px 30px 0 0; +@dropdown-mobile-container-border: @global-border; +@dropdown-mobile-container-border-width: @global-border-width; +@dropdown-mobile-container-padding-top: @global-medium-gutter + 10px; +@dropdown-mobile-container-divider-width: 60px; +@dropdown-mobile-container-divider-height: 4px; +@dropdown-mobile-container-divider-background: @dropdown-mobile-container-border; +@dropdown-mobile-container-divider-border-radius: 50px; +@dropdown-mobile-container-close-position: @global-small-gutter; + .hook-dropdown() { box-shadow: @dropdown-box-shadow; border: @dropdown-border-width solid @dropdown-border; @@ -51,4 +66,57 @@ .uk-dropdown-nav > li.uk-active > a { font-weight: @dropdown-nav-item-active-font-weight; } + + .uk-dropdown-mobile { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + height: 100vh; + z-index: @dropdown-mobile-z-index; + overflow-y: auto; + background: @dropdown-mobile-background; + display: none; + + &.uk-open { + display: block; + } + + & > .uk-dropdown-mobile-container { + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: @dropdown-mobile-container-height; + background: @dropdown-mobile-container-background; + border-radius: @dropdown-mobile-container-border-radius; + border: @dropdown-mobile-container-border-width solid @dropdown-mobile-container-border; + padding-top: @dropdown-mobile-container-padding-top; + + &:before { + content: ''; + width: @dropdown-mobile-container-divider-width; + height: @dropdown-mobile-container-divider-height; + background: @dropdown-mobile-container-divider-background; + border-radius: @dropdown-mobile-container-divider-border-radius; + position: absolute; + top: 15px; + left: 50%; + transform: translate(-50%, -50%); + } + + & > .uk-close { + position: absolute; + right: @dropdown-mobile-container-close-position; + top: @dropdown-mobile-container-close-position; + } + + & > .uk-content { + box-sizing: border-box; + max-height: 100%; + overflow-y: auto; + } + } + } } diff --git a/less/height.less b/less/height.less index 11341dd..9f8e5e0 100644 --- a/less/height.less +++ b/less/height.less @@ -11,4 +11,20 @@ .uk-height-max-xsmall { max-height: @height-xsmall-height; } + + .uk-height-min-xsmall { + min-height: @height-xsmall-height; + } + + .uk-height-min-small { + min-height: @height-small-height; + } + + .uk-height-min-medium { + min-height: @height-medium-height; + } + + .uk-height-min-large { + min-height: @height-large-height; + } }