discourse/app/assets/stylesheets/common/select-kit/select-kit.scss

279 lines
5.7 KiB
SCSS
Raw Normal View History

.mobile-view .select-kit.is-expanded {
z-index: z("dropdown");
}
.select-box-kit, .select-kit {
border: none;
2017-10-19 15:51:08 -04:00
min-width: 220px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
2017-08-25 13:56:57 -04:00
display: inline-block;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
position: relative;
2017-10-19 15:51:08 -04:00
vertical-align: middle;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
&.is-hidden {
display: none;
}
2017-10-19 15:51:08 -04:00
&.is-disabled {
pointer-events: none;
}
&.is-expanded {
z-index: z("dropdown");
.select-kit-body {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
left: 0;
position: absolute;
top: 0;
}
.select-kit-collection {
border-radius: inherit;
}
}
&.is-above {
.select-kit-body {
bottom: 0;
top: auto;
}
.select-kit-filter {
border-top: 0;
}
.select-kit-wrapper {
bottom: 0;
top: auto;
}
}
.d-icon {
2017-08-25 13:56:57 -04:00
opacity: 0.7;
}
.select-box-kit-header, .select-kit-header {
2017-11-09 13:57:53 -05:00
box-sizing: border-box;
overflow: hidden;
2017-10-19 15:51:08 -04:00
-webkit-transition: all .25s;
-o-transition: all .25s;
transition: all .25s;
cursor: pointer;
outline: none;
2017-10-19 15:51:08 -04:00
display: -webkit-box;
display: -ms-flexbox;
2017-08-25 13:56:57 -04:00
display: flex;
2017-08-29 08:31:03 -04:00
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
2017-08-25 13:56:57 -04:00
justify-content: space-between;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
2017-10-19 15:51:08 -04:00
.selected-name {
text-align: left;
-webkit-box-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
2017-10-19 15:51:08 -04:00
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: inherit;
}
2017-10-19 15:51:08 -04:00
.btn-clear {
padding: 0 10px;
2017-10-19 15:51:08 -04:00
border: 0;
background: none;
}
.icon {
margin-right: 5px;
}
.caret-icon {
margin-left: 5px;
pointer-events: none;
}
.d-button-label {
2017-10-19 15:51:08 -04:00
display: -webkit-box;
display: -ms-flexbox;
display: flex;
2017-10-19 15:51:08 -04:00
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
white-space: nowrap;
overflow: hidden;
2018-01-12 17:27:38 -05:00
line-height: $line-height-medium;
.d-icon {
margin-left: 5px;
margin-right: 0;
}
}
}
.select-box-kit-body, .select-kit-body {
display: none;
background: $secondary;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.select-box-kit-row, .select-kit-row {
cursor: pointer;
2018-01-12 17:27:38 -05:00
line-height: $line-height-medium;
outline: none;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
flex: 1 0 auto;
2017-11-09 13:57:53 -05:00
-webkit-box-sizing: border-box;
box-sizing: border-box;
2017-10-19 15:51:08 -04:00
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
&.no-content {
white-space: nowrap;
}
2017-10-19 15:51:08 -04:00
.name {
margin: 0;
2017-10-19 15:51:08 -04:00
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
flex: 10;
}
.d-icon {
margin-right: 5px;
}
&.is-highlighted {
background: $tertiary-low;
}
&.is-selected {
background: $highlight-medium;
}
&.is-selected.is-highlighted {
background: $tertiary-low;
}
}
.select-box-kit-collection, .select-kit-collection {
background: $secondary;
overflow-x: hidden;
overflow-y: auto;
border-radius: inherit;
-webkit-overflow-scrolling: touch;
2017-10-19 15:51:08 -04:00
margin: 0;
.select-kit-collection {
padding: 0;
margin: 0;
&:hover .select-kit-row.is-highlighted:hover {
background: $tertiary-low;
}
}
&::-webkit-scrollbar {
-webkit-appearance: none;
width: 10px;
}
&::-webkit-scrollbar-thumb {
cursor: pointer;
border-radius: 5px;
2017-10-10 16:07:46 -04:00
background: dark-light-choose($primary-medium, $secondary-medium);
}
&::-webkit-scrollbar-track {
background: transparent;
border-radius: 0;
}
}
.select-box-kit-filter, .select-kit-filter {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
box-sizing: border-box;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
.filter-input, .filter-input:focus, .filter-input:active {
background: none;
margin: 0;
2017-10-19 15:51:08 -04:00
padding: 0;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
outline: none;
border: 0;
2017-10-19 15:51:08 -04:00
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
width: 100%;
2017-10-19 15:51:08 -04:00
}
&.is-hidden {
width: 1px;
height: 1px;
border: 0;
margin: -1px;
2017-10-19 15:51:08 -04:00
padding: 0;
overflow: hidden;
position: fixed;
outline: 0;
left: 0;
top: 0;
}
}
.select-box-kit-wrapper, .select-kit-wrapper {
position: absolute;
top: 0;
left: 0;
background: none;
display: none;
-webkit-box-sizing: border-box;
box-sizing: border-box;
pointer-events: none;
}
}