You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
273 lines
7.4 KiB
273 lines
7.4 KiB
/*
|
|
* # Semantic Dropdown
|
|
* http://github.com/quirkyinc/semantic
|
|
*
|
|
*
|
|
* Copyright 2013 Contributors
|
|
* Released under the MIT license
|
|
* http://opensource.org/licenses/MIT
|
|
*
|
|
* Released: April 17 2013
|
|
*/
|
|
/*******************************
|
|
Dropdown
|
|
*******************************/
|
|
.ui.dropdown {
|
|
position: relative;
|
|
display: inline-block;
|
|
line-height: 1;
|
|
-webkit-transition: border-radius 0.1s ease, width 0.2s ease;
|
|
-moz-transition: border-radius 0.1s ease, width 0.2s ease;
|
|
-o-transition: border-radius 0.1s ease, width 0.2s ease;
|
|
-ms-transition: border-radius 0.1s ease, width 0.2s ease;
|
|
transition: border-radius 0.1s ease, width 0.2s ease;
|
|
}
|
|
.ui.dropdown .menu {
|
|
position: absolute;
|
|
display: none;
|
|
top: 100%;
|
|
background-color: #FFFFFF;
|
|
min-width: 100%;
|
|
white-space: nowrap;
|
|
-webkit-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1), 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset;
|
|
-moz-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1), 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset;
|
|
box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1), 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset;
|
|
-moz-border-radius: 0px 0px 0.325em 0.325em;
|
|
-webkit-border-radius: 0px 0px 0.325em 0.325em;
|
|
border-radius: 0px 0px 0.325em 0.325em;
|
|
-webkit-transition: opacity 0.2s ease;
|
|
-moz-transition: opacity 0.2s ease;
|
|
-o-transition: opacity 0.2s ease;
|
|
-ms-transition: opacity 0.2s ease;
|
|
transition: opacity 0.2s ease;
|
|
z-index: 11;
|
|
}
|
|
.ui.dropdown > .dropdown.icon {
|
|
width: auto;
|
|
}
|
|
.ui.dropdown > .text {
|
|
display: inline-block;
|
|
}
|
|
/* Flyout Direction */
|
|
.ui.dropdown .menu {
|
|
left: 0px;
|
|
}
|
|
.ui.menu .dropdown:last-child .menu,
|
|
.ui > .ui.dropdown:last-child .menu {
|
|
left: auto;
|
|
right: 0px;
|
|
}
|
|
.ui.dropdown .menu .item {
|
|
cursor: pointer;
|
|
border: none;
|
|
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
font-size: 0.9em;
|
|
display: block;
|
|
color: rgba(0, 0, 0, 0.75);
|
|
padding: 0.85em 1em !important;
|
|
font-size: 0.9rem;
|
|
text-transform: none;
|
|
font-weight: normal;
|
|
text-align: left;
|
|
-webkit-touch-callout: none;
|
|
}
|
|
.ui.dropdown .menu .item:before {
|
|
display: none;
|
|
}
|
|
.ui.dropdown .menu .item .icon {
|
|
margin-right: 0.75em;
|
|
}
|
|
.ui.dropdown .menu .item:first-child {
|
|
border-top: none;
|
|
}
|
|
/*******************************
|
|
States
|
|
*******************************/
|
|
.ui.dropdown.visible {
|
|
border-bottom-left-radius: 0em !important;
|
|
border-bottom-right-radius: 0em !important;
|
|
}
|
|
.ui.dropdown .menu .item:hover {
|
|
background-color: rgba(0, 0, 0, 0.02);
|
|
}
|
|
.ui.dropdown .menu .active.item {
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-left: none;
|
|
}
|
|
/* Default Text */
|
|
.ui.dropdown > .default.text,
|
|
.ui.default.dropdown > .text {
|
|
color: rgba(0, 0, 0, 0.2);
|
|
}
|
|
.ui.dropdown:hover > .default.text,
|
|
.ui.default.dropdown:hover > .text {
|
|
color: rgba(0, 0, 0, 0.4);
|
|
}
|
|
/*******************************
|
|
Variations
|
|
*******************************/
|
|
/*--------------
|
|
Simple
|
|
---------------*/
|
|
/* Displays without javascript */
|
|
.ui.simple.dropdown .menu:before,
|
|
.ui.simple.dropdown .menu:after {
|
|
display: none;
|
|
}
|
|
.ui.simple.dropdown .menu {
|
|
display: block;
|
|
overflow: hidden;
|
|
top: 100%;
|
|
height: 0px;
|
|
width: 0px;
|
|
position: absolute;
|
|
opacity: 0;
|
|
-webkit-transition: opacity 0.2s ease-out;
|
|
-moz-transition: opacity 0.2s ease-out;
|
|
-o-transition: opacity 0.2s ease-out;
|
|
-ms-transition: opacity 0.2s ease-out;
|
|
transition: opacity 0.2s ease-out;
|
|
}
|
|
.ui.simple.dropdown.visible .menu,
|
|
.ui.simple.dropdown:hover .menu {
|
|
overflow: visible;
|
|
width: auto;
|
|
height: auto;
|
|
opacity: 1;
|
|
}
|
|
.ui.simple.disabled.dropdown:hover .menu {
|
|
height: 0px;
|
|
width: 0px;
|
|
overflow: hidden;
|
|
}
|
|
/*--------------
|
|
Selection
|
|
---------------*/
|
|
/* Displays like a select box */
|
|
.ui.selection.dropdown {
|
|
cursor: pointer;
|
|
display: inline-block;
|
|
background-color: #FFFFFF;
|
|
padding: 0.5em 1em;
|
|
line-height: 1.33;
|
|
color: rgba(0, 0, 0, 0.8);
|
|
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
|
|
-moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
|
|
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
|
|
-webkit-border-radius: 0.3125em !important;
|
|
-moz-border-radius: 0.3125em !important;
|
|
border-radius: 0.3125em !important;
|
|
}
|
|
.ui.selection.dropdown > .dropdown.icon {
|
|
float: right;
|
|
margin: 0.2em 0em 0.2em 0.5em;
|
|
}
|
|
.ui.selection.dropdown,
|
|
.ui.selection.dropdown .menu {
|
|
top: 100%;
|
|
-webkit-transition: box-shadow 0.2s ease-out;
|
|
-moz-transition: box-shadow 0.2s ease-out;
|
|
-o-transition: box-shadow 0.2s ease-out;
|
|
-ms-transition: box-shadow 0.2s ease-out;
|
|
transition: box-shadow 0.2s ease-out;
|
|
}
|
|
.ui.selection.dropdown .menu {
|
|
-webkit-box-shadow: 0px 1px 0px 1px #EEEEEE;
|
|
-moz-box-shadow: 0px 1px 0px 1px #EEEEEE;
|
|
box-shadow: 0px 1px 0px 1px #EEEEEE;
|
|
-moz-border-radius: 0px 0px 0.325em 0.325em;
|
|
-webkit-border-radius: 0px 0px 0.325em 0.325em;
|
|
border-radius: 0px 0px 0.325em 0.325em;
|
|
}
|
|
.ui.selection.dropdown.visible,
|
|
.ui.selection.dropdown:hover,
|
|
.ui.selection.dropdown.hover {
|
|
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
|
|
-moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
|
|
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
|
|
-webkit-border-radius: 0.3125em 0.3125em 0em 0em !important;
|
|
-moz-border-radius: 0.3125em 0.3125em 0em 0em !important;
|
|
border-radius: 0.3125em 0.3125em 0em 0em !important;
|
|
}
|
|
.ui.selection.dropdown.visible .menu,
|
|
.ui.selection.dropdown.hover .menu,
|
|
.ui.selection.dropdown:hover .menu {
|
|
-webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
|
|
-moz-box-shadow: 0px 1px 0px 1px #D3D3D3;
|
|
box-shadow: 0px 1px 0px 1px #D3D3D3;
|
|
}
|
|
/*--------------
|
|
Fluid
|
|
---------------*/
|
|
.ui.fluid.dropdown {
|
|
display: block;
|
|
}
|
|
/*--------------
|
|
Pointing
|
|
---------------*/
|
|
.ui.pointing.dropdown .menu {
|
|
top: 100%;
|
|
margin-top: 0.75em;
|
|
-moz-border-radius: 0.325em;
|
|
-webkit-border-radius: 0.325em;
|
|
border-radius: 0.325em;
|
|
}
|
|
.ui.pointing.dropdown .menu:after {
|
|
position: absolute;
|
|
pointer-events: none;
|
|
content: " ";
|
|
width: 0.5em;
|
|
height: 0.5em;
|
|
-moz-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
|
|
-webkit-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
|
|
box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
|
|
background-image: none;
|
|
background-color: #FFFFFF;
|
|
-webkit-transform: rotate(45deg);
|
|
-moz-transform: rotate(45deg);
|
|
transform: rotate(45deg);
|
|
z-index: 2;
|
|
}
|
|
.ui.pointing.dropdown .menu .item.active:first-child {
|
|
background: transparent -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
|
|
background: transparent -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
|
|
background: transparent -o-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
|
|
background: transparent -ms-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
|
|
background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.03));
|
|
}
|
|
/* Directions */
|
|
.ui.pointing.dropdown .menu:after {
|
|
top: -0.25em;
|
|
left: 50%;
|
|
margin: 0em 0em 0em -0.25em;
|
|
}
|
|
.ui.top.left.pointing.dropdown .menu:after {
|
|
top: -0.25em;
|
|
left: 1em;
|
|
right: auto;
|
|
margin: 0em;
|
|
}
|
|
.ui.top.right.pointing.dropdown .menu:after {
|
|
top: -0.25em;
|
|
left: auto;
|
|
right: 1em;
|
|
margin: 0em;
|
|
}
|
|
.ui.left.pointing.dropdown .menu:after {
|
|
top: 1em;
|
|
left: -0.25em;
|
|
margin-top: -0.25em 0em 0em 0em;
|
|
}
|
|
.ui.right.pointing.dropdown .menu:after {
|
|
top: 1em;
|
|
left: auto;
|
|
right: -0.25em;
|
|
margin-top: -0.25em 0em 0em 0em;
|
|
}
|
|
/* States */
|
|
.ui.pointing.dropdown.visible,
|
|
.ui.pointing.dropdown.visible .menu {
|
|
-moz-border-radius: 0.325em !important;
|
|
-webkit-border-radius: 0.325em !important;
|
|
border-radius: 0.325em !important;
|
|
}
|