bulma/sass/components/dropdown.sass

82 lines
2.1 KiB
Sass
Raw Normal View History

2019-05-17 12:50:39 +00:00
$dropdown-menu-min-width: 12rem !default
2017-07-28 20:05:15 +00:00
$dropdown-content-background-color: $white !default
2017-07-20 19:01:55 +00:00
$dropdown-content-arrow: $link !default
$dropdown-content-offset: 4px !default
2019-05-17 12:50:39 +00:00
$dropdown-content-padding-bottom: 0.5rem !default
$dropdown-content-padding-top: 0.5rem !default
2017-07-20 19:01:55 +00:00
$dropdown-content-radius: $radius !default
2019-09-19 17:08:42 +00:00
$dropdown-content-shadow: 0 0.5em 1em -0.125em rgba($black, 0.1), 0 0px 0 1px rgba($black, 0.02) !default
2017-07-20 19:01:55 +00:00
$dropdown-content-z: 20 !default
2017-07-28 20:05:15 +00:00
$dropdown-item-color: $grey-dark !default
$dropdown-item-hover-color: $black !default
$dropdown-item-hover-background-color: $background !default
2017-10-07 16:31:05 +00:00
$dropdown-item-active-color: $link-invert !default
$dropdown-item-active-background-color: $link !default
2017-07-20 19:01:55 +00:00
2017-07-28 20:05:15 +00:00
$dropdown-divider-background-color: $border !default
2017-07-20 19:01:55 +00:00
.dropdown
display: inline-flex
position: relative
vertical-align: top
&.is-active,
&.is-hoverable:hover
2017-07-21 09:44:49 +00:00
.dropdown-menu
2017-07-20 19:01:55 +00:00
display: block
2017-07-24 10:54:00 +00:00
&.is-right
.dropdown-menu
left: auto
right: 0
&.is-up
.dropdown-menu
bottom: 100%
padding-bottom: $dropdown-content-offset
2018-02-02 15:23:34 +00:00
padding-top: initial
2017-10-07 16:04:38 +00:00
top: auto
2017-07-20 19:01:55 +00:00
2017-07-21 09:44:49 +00:00
.dropdown-menu
2017-07-20 19:01:55 +00:00
display: none
left: 0
2019-05-17 12:50:39 +00:00
min-width: $dropdown-menu-min-width
2017-07-20 19:01:55 +00:00
padding-top: $dropdown-content-offset
position: absolute
top: 100%
z-index: $dropdown-content-z
.dropdown-content
2017-07-28 20:05:15 +00:00
background-color: $dropdown-content-background-color
2017-07-20 19:01:55 +00:00
border-radius: $dropdown-content-radius
box-shadow: $dropdown-content-shadow
2019-05-17 12:50:39 +00:00
padding-bottom: $dropdown-content-padding-bottom
padding-top: $dropdown-content-padding-top
2017-07-20 19:01:55 +00:00
.dropdown-item
2017-07-28 20:05:15 +00:00
color: $dropdown-item-color
2017-07-20 19:01:55 +00:00
display: block
font-size: 0.875rem
line-height: 1.5
padding: 0.375rem 1rem
position: relative
2018-08-29 09:41:37 +00:00
a.dropdown-item,
button.dropdown-item
2017-07-20 19:01:55 +00:00
padding-right: 3rem
2018-10-07 16:40:27 +00:00
text-align: left
2017-07-20 19:01:55 +00:00
white-space: nowrap
2018-08-29 09:41:37 +00:00
width: 100%
2017-07-24 10:34:43 +00:00
&:hover
2017-07-28 20:05:15 +00:00
background-color: $dropdown-item-hover-background-color
color: $dropdown-item-hover-color
2017-07-24 10:34:43 +00:00
&.is-active
2017-07-28 20:05:15 +00:00
background-color: $dropdown-item-active-background-color
color: $dropdown-item-active-color
2017-07-20 19:01:55 +00:00
.dropdown-divider
2017-07-28 20:05:15 +00:00
background-color: $dropdown-divider-background-color
2017-07-20 19:01:55 +00:00
border: none
display: block
height: 1px
margin: 0.5rem 0