gitlab-org--gitlab-foss/app/assets/stylesheets/framework/dropdowns.scss

574 lines
9.3 KiB
SCSS
Raw Normal View History

.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: $caret-width-base dashed;
border-right: $caret-width-base solid transparent;
border-left: $caret-width-base solid transparent;
}
.btn-group {
.caret {
margin-left: 0;
}
}
.dropdown {
position: relative;
}
.open {
.dropdown-menu,
.dropdown-menu-nav {
display: block;
@media (max-width: $screen-xs-max) {
width: 100%;
}
}
2016-03-07 06:50:39 -05:00
.dropdown-menu-toggle {
border-color: $dropdown-toggle-hover-border-color;
.fa {
color: $dropdown-toggle-hover-icon-color;
}
}
}
.dropdown-menu-toggle {
position: relative;
width: 160px;
2016-03-08 06:59:52 -05:00
padding: 6px 20px 6px 10px;
2016-03-07 06:50:39 -05:00
background-color: $dropdown-toggle-bg;
color: $dropdown-toggle-color;
font-size: 15px;
text-align: left;
border: 1px solid $dropdown-toggle-border-color;
2016-04-21 12:21:03 -04:00
border-radius: $border-radius-base;
2016-03-07 06:50:39 -05:00
outline: 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
.fa {
position: absolute;
top: 50%;
right: 6px;
margin-top: -4px;
color: $dropdown-toggle-icon-color;
font-size: 10px;
}
&:hover, {
border-color: $dropdown-toggle-hover-border-color;
.fa {
color: $dropdown-toggle-hover-icon-color;
}
}
&.large {
width: 200px;
}
&.wide {
width: 100%;
+ .dropdown-select {
width: 100%;
}
}
}
.dropdown-menu,
.dropdown-menu-nav {
display: none;
position: absolute;
top: 100%;
left: 0;
z-index: 9;
width: 240px;
margin-top: 2px;
margin-bottom: 0;
font-size: 15px;
font-weight: normal;
2016-06-29 05:38:32 -04:00
padding: 8px 0;
background-color: $dropdown-bg;
border: 1px solid $dropdown-border-color;
2016-04-21 12:21:03 -04:00
border-radius: $border-radius-base;
box-shadow: 0 2px 4px $dropdown-shadow-color;
&.is-loading {
.dropdown-content {
display: none;
}
.dropdown-loading {
display: block;
}
}
ul {
margin: 0;
padding: 0;
}
li {
text-align: left;
list-style: none;
2016-06-29 05:38:32 -04:00
padding: 0 8px;
}
.divider {
height: 1px;
2016-06-29 05:38:32 -04:00
margin: 8px;
padding: 0;
background-color: $dropdown-divider-color;
}
.separator {
width: 100%;
height: 1px;
margin-top: 8px;
margin-bottom: 8px;
background-color: $dropdown-divider-color;
}
a {
display: block;
position: relative;
2016-06-29 05:38:32 -04:00
padding: 5px 8px;
color: $dropdown-link-color;
line-height: initial;
text-overflow: ellipsis;
border-radius: 2px;
white-space: nowrap;
overflow: hidden;
2016-03-07 10:37:35 -05:00
&:hover,
&:focus,
&.is-focused {
background-color: $dropdown-link-hover-bg;
text-decoration: none;
2016-03-07 10:37:35 -05:00
outline: 0;
}
&.dropdown-menu-empty-link {
&.is-focused {
background-color: $dropdown-empty-row-bg;
}
}
2016-03-28 18:52:20 -04:00
&.dropdown-menu-user-link {
line-height: 16px;
}
}
.dropdown-header {
color: $dropdown-header-color;
font-size: 13px;
line-height: 22px;
padding: 0 10px;
}
.separator + .dropdown-header {
padding-top: 2px;
}
}
.dropdown-menu-large {
width: 340px;
}
.dropdown-menu-no-wrap {
a {
white-space: normal;
}
}
2016-05-18 09:11:06 -04:00
.dropdown-menu-full-width {
width: 100%;
}
.dropdown-menu-paging {
.dropdown-page-two,
.dropdown-menu-back {
display: none;
}
&.is-page-two {
.dropdown-page-one {
display: none;
}
.dropdown-page-two,
.dropdown-menu-back {
display: block;
}
.dropdown-content {
padding: 0 10px;
}
}
}
.dropdown-menu-user {
.avatar {
float: left;
width: 30px;
height: 30px;
margin: 0 10px 0 0;
}
}
.dropdown-menu-user-link {
2016-03-28 15:49:21 -04:00
padding-top: 10px;
padding-bottom: 7px;
}
.dropdown-menu-user-full-name {
display: block;
2016-03-28 15:49:21 -04:00
font-weight: 500;
line-height: 16px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.dropdown-menu-user-username {
display: block;
line-height: 16px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.dropdown-select {
width: $dropdown-width;
}
.dropdown-menu-align-right {
left: auto;
right: 0;
}
.dropdown-menu-selectable {
a {
padding-left: 25px;
2016-04-27 12:09:29 -04:00
&.is-indeterminate, &.is-active {
&::before {
position: absolute;
left: 5px;
top: 8px;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
2016-04-26 14:05:21 -04:00
&.is-indeterminate::before {
2016-04-26 14:05:21 -04:00
content: "\f068";
}
&.is-active::before {
content: "\f00c";
}
}
}
.dropdown-title {
position: relative;
2016-04-11 05:49:48 -04:00
padding: 0 25px 10px;
margin: 0 10px 10px;
font-weight: 600;
line-height: 1;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
border-bottom: 1px solid $dropdown-divider-color;
overflow: hidden;
}
.dropdown-title-button {
position: absolute;
top: 0;
padding: 0;
2016-03-07 06:26:35 -05:00
color: $dropdown-title-btn-color;
font-size: 14px;
border: 0;
background: none;
2016-03-08 06:23:54 -05:00
outline: 0;
&:hover {
2016-03-07 06:26:35 -05:00
color: darken($dropdown-title-btn-color, 15%);
}
}
.dropdown-menu-close {
2016-04-11 04:52:12 -04:00
right: 5px;
width: 20px;
height: 20px;
2016-04-11 05:49:48 -04:00
top: -3px;
}
.dropdown-menu-back {
left: 7px;
top: 2px;
}
.dropdown-input {
position: relative;
margin-bottom: 10px;
padding: 0 10px;
.fa {
position: absolute;
top: 10px;
right: 20px;
color: #c7c7c7;
font-size: 12px;
pointer-events: none;
}
2016-03-18 12:53:15 -04:00
.dropdown-input-clear {
display: none;
cursor: pointer;
pointer-events: all;
right: 22px;
top: 9px;
font-size: 14px;
2016-03-18 12:53:15 -04:00
}
&.has-value {
.dropdown-input-clear {
display: block;
}
.dropdown-input-search {
display: none;
}
}
}
.dropdown-input-field, .default-dropdown-input {
width: 100%;
min-height: 30px;
padding: 0 7px;
2016-03-07 06:26:35 -05:00
color: $dropdown-input-color;
line-height: 30px;
border: 1px solid $dropdown-divider-color;
border-radius: 2px;
outline: 0;
&:focus {
color: $dropdown-link-color;
2016-03-07 06:26:35 -05:00
border-color: $dropdown-input-focus-border;
box-shadow: 0 0 4px $dropdown-input-focus-shadow;
2016-03-18 12:53:15 -04:00
~ .fa {
color: $dropdown-link-color;
}
}
&:hover {
2016-03-18 12:53:15 -04:00
~ .fa {
color: $dropdown-link-color;
}
}
}
.dropdown-content {
2016-03-11 11:30:58 -05:00
max-height: 215px;
overflow-y: scroll;
}
.dropdown-footer {
padding-top: 10px;
margin-top: 10px;
font-size: 13px;
border-top: 1px solid $dropdown-divider-color;
}
2016-04-08 08:04:20 -04:00
.dropdown-due-date-footer {
padding-top: 0;
margin-left: 10px;
margin-right: 10px;
border-top: 0;
}
.dropdown-footer-list {
font-size: 14px;
a {
padding-left: 10px;
}
}
.dropdown-loading {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: none;
z-index: 9;
2016-03-07 06:26:35 -05:00
background-color: $dropdown-loading-bg;
font-size: 28px;
.fa {
position: absolute;
top: 50%;
left: 50%;
margin-top: -14px;
margin-left: -14px;
}
}
2016-03-07 12:17:11 -05:00
2016-03-18 13:11:51 -04:00
.dropdown-label-box {
position: relative;
top: 3px;
margin-right: 5px;
2016-03-18 13:11:51 -04:00
display: inline-block;
width: 15px;
height: 15px;
border-radius: $border-radius-base;
2016-03-07 12:17:11 -05:00
}
2016-04-08 08:04:20 -04:00
.dropdown-menu-due-date {
.dropdown-content {
max-height: 230px;
}
2016-04-08 08:04:20 -04:00
.ui-widget {
table {
margin: 0;
}
&.ui-datepicker-inline {
padding: 0 10px;
border: 0;
width: 100%;
}
.ui-datepicker-header {
2016-04-11 05:49:48 -04:00
padding: 0 8px 10px;
2016-04-08 08:04:20 -04:00
border: 0;
2016-04-11 05:49:48 -04:00
.ui-icon {
background: none;
font-size: 20px;
text-indent: 0;
&:before {
display: block;
position: relative;
top: -2px;
2016-04-15 03:32:01 -04:00
color: $dropdown-title-btn-color;
2016-04-11 05:49:48 -04:00
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
2016-04-08 08:04:20 -04:00
}
2016-06-20 04:47:43 -04:00
.ui-datepicker-calendar {
.ui-state-hover,
.ui-state-active {
color: #fff;
border: 0;
}
2016-04-08 08:04:20 -04:00
}
.ui-datepicker-prev,
.ui-datepicker-next {
2016-04-11 05:49:48 -04:00
top: 0;
height: 15px;
cursor: pointer;
2016-04-08 08:04:20 -04:00
&:hover {
background-color: transparent;
border: 0;
2016-04-11 05:49:48 -04:00
.ui-icon:before {
color: $md-link-color;
}
2016-04-08 08:04:20 -04:00
}
}
.ui-datepicker-prev {
2016-04-11 05:49:48 -04:00
left: 0;
.ui-icon:before {
content: '\f104';
text-align: left;
}
2016-04-08 08:04:20 -04:00
}
.ui-datepicker-next {
2016-04-11 05:49:48 -04:00
right: 0;
.ui-icon:before {
content: '\f105';
text-align: right;
}
2016-04-08 08:04:20 -04:00
}
td {
padding: 0;
2016-04-15 03:32:01 -04:00
border: 1px solid $calendar-border-color;
2016-04-08 08:04:20 -04:00
&:first-child {
border-left: 0;
}
&:last-child {
border-right: 0;
}
a {
line-height: 17px;
border: 0;
border-radius: 0;
}
}
.ui-datepicker-title {
2016-04-15 03:32:01 -04:00
color: $gl-gray;
2016-04-08 08:04:20 -04:00
font-size: 15px;
line-height: 1;
font-weight: normal;
}
}
th {
2016-04-11 05:49:48 -04:00
padding: 2px 0;
2016-04-15 03:32:01 -04:00
color: $calendar-header-color;
2016-04-08 08:04:20 -04:00
font-weight: normal;
text-transform: lowercase;
2016-04-15 03:32:01 -04:00
border-top: 1px solid $calendar-border-color;
2016-04-08 08:04:20 -04:00
}
.ui-datepicker-unselectable {
2016-04-15 03:32:01 -04:00
background-color: $calendar-unselectable-bg;
2016-04-08 08:04:20 -04:00
}
}
.dropdown-menu-inner-title {
display: block;
2016-06-06 03:39:05 -04:00
color: $gl-title-color;
font-weight: 600;
}
.dropdown-menu-inner-content {
display: block;
2016-06-06 03:39:05 -04:00
color: $gl-placeholder-color;
}