phpvms/resources/sass/admin/paper/_dropdown.scss

116 lines
2.9 KiB
SCSS
Raw Normal View History

2017-08-18 03:54:14 +08:00
.dropdown-menu{
2017-08-18 07:26:48 +08:00
background-color: $pale-bg;
border: 0 none;
2017-08-18 03:54:14 +08:00
border-radius: $border-radius-extreme;
display: block;
2017-08-18 07:26:48 +08:00
margin-top: 10px;
padding: 0px;
2017-08-18 03:54:14 +08:00
position: absolute;
2017-08-18 07:26:48 +08:00
visibility: hidden;
z-index: 9000;
2017-08-18 03:54:14 +08:00
@include opacity(0);
@include box-shadow($dropdown-shadow);
2017-08-18 07:26:48 +08:00
// the style for opening dropdowns on mobile devices; for the desktop version check the _responsive.scss file
2017-08-18 03:54:14 +08:00
.open &{
@include opacity(1);
visibility: visible;
}
2017-08-18 07:26:48 +08:00
.divider{
background-color: $medium-pale-bg;
margin: 0px;
}
.dropdown-header{
color: $dark-gray;
font-size: $font-size-small;
padding: $padding-dropdown-vertical $padding-dropdown-horizontal;
}
// the style for the dropdown menu that appears under select, it is different from the default one
2017-08-18 03:54:14 +08:00
.select &{
border-radius: $border-radius-bottom;
@include box-shadow(none);
@include transform-origin($select-coordinates);
@include transform-scale(1);
@include transition($fast-transition-time, $transition-linear);
margin-top: -20px;
}
.select.open &{
margin-top: -1px;
}
> li > a {
2017-08-18 07:26:48 +08:00
color: $font-color;
font-size: $font-size-base;
padding: $padding-dropdown-vertical $padding-dropdown-horizontal;
@include transition-none();
2017-08-18 03:54:14 +08:00
img{
margin-top: -3px;
}
}
> li > a:focus{
outline: 0 !important;
}
.btn-group.select &{
min-width: 100%;
}
> li:first-child > a{
border-top-left-radius: $border-radius-extreme;
border-top-right-radius: $border-radius-extreme;
}
> li:last-child > a{
border-bottom-left-radius: $border-radius-extreme;
border-bottom-right-radius: $border-radius-extreme;
}
.select & > li:first-child > a{
border-radius: 0;
border-bottom: 0 none;
}
> li > a:hover,
> li > a:focus {
2017-08-18 07:26:48 +08:00
background-color: $default-color;
color: $fill-font-color;
2017-08-18 03:54:14 +08:00
opacity: 1;
text-decoration: none;
}
2017-08-18 07:26:48 +08:00
&.dropdown-primary > li > a:hover,
&.dropdown-primary > li > a:focus{
background-color: $primary-color;
2017-08-18 03:54:14 +08:00
}
2017-08-18 07:26:48 +08:00
&.dropdown-info > li > a:hover,
&.dropdown-info > li > a:focus{
background-color: $info-color;
2017-08-18 03:54:14 +08:00
}
2017-08-18 07:26:48 +08:00
&.dropdown-success > li > a:hover,
&.dropdown-success > li > a:focus{
background-color: $success-color;
2017-08-18 03:54:14 +08:00
}
2017-08-18 07:26:48 +08:00
&.dropdown-warning > li > a:hover,
&.dropdown-warning > li > a:focus{
background-color: $warning-color;
2017-08-18 03:54:14 +08:00
}
2017-08-18 07:26:48 +08:00
&.dropdown-danger > li > a:hover,
&.dropdown-danger > li > a:focus{
background-color: $danger-color;
2017-08-18 03:54:14 +08:00
}
}
//fix bug for the select items in btn-group
.btn-group.select{
overflow: hidden;
}
.btn-group.select.open{
overflow: visible;
}