mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-03 23:21:45 +01:00
c7cf051502
Added prefers-reduced-motion support
175 lines
2.7 KiB
SCSS
175 lines
2.7 KiB
SCSS
//INPUT
|
|
.maputnik-input {
|
|
height: 24px;
|
|
width: 100%;
|
|
display: block;
|
|
box-sizing: border-box;
|
|
font-size: $font-size-6;
|
|
line-height: 2;
|
|
padding-left: $margin-2;
|
|
padding-right: $margin-2;
|
|
border: none;
|
|
background-color: $color-gray;
|
|
color: lighten($color-lowgray, 12);
|
|
}
|
|
|
|
.maputnik-string {
|
|
@extend .maputnik-input;
|
|
|
|
&--multi {
|
|
resize: vertical;
|
|
height: 78px;
|
|
}
|
|
}
|
|
|
|
.maputnik-number {
|
|
@extend .maputnik-input;
|
|
}
|
|
|
|
//COLOR PICKER
|
|
.maputnik-color {
|
|
@extend .maputnik-input;
|
|
|
|
height: 26px;
|
|
}
|
|
|
|
.maputnik-color-wrapper {
|
|
position: relative;
|
|
|
|
@include flex-row;
|
|
}
|
|
|
|
.maputnik-color-swatch {
|
|
height: 26px;
|
|
width: 14px;
|
|
flex-shrink: 0;
|
|
flex-grow: 0;
|
|
}
|
|
|
|
// ARRAY
|
|
|
|
.maputnik-array {
|
|
> * {
|
|
margin-bottom: $margin-3;
|
|
}
|
|
|
|
.maputnik-array-block {
|
|
.maputnik-array-block-action {
|
|
vertical-align: top;
|
|
display: inline-block;
|
|
width: 14%;
|
|
}
|
|
|
|
.maputnik-array-block-content {
|
|
vertical-align: top;
|
|
display: inline-block;
|
|
width: 86%;
|
|
}
|
|
}
|
|
|
|
.maputnik-array-add-value {
|
|
display: inline-block;
|
|
float: right;
|
|
}
|
|
}
|
|
|
|
// SELECT
|
|
.maputnik-select {
|
|
@extend .maputnik-input;
|
|
|
|
height: 24px;
|
|
}
|
|
|
|
// MULTIBUTTON
|
|
.maputnik-multibutton {
|
|
padding: 0;
|
|
|
|
.maputnik-button {
|
|
margin-right: $margin-1;
|
|
}
|
|
}
|
|
|
|
.maputnik-button-selected {
|
|
background-color: lighten($color-midgray, 12);
|
|
color: white;
|
|
}
|
|
|
|
// CHECKBOX
|
|
.maputnik-checkbox {
|
|
position: absolute;
|
|
z-index: -1;
|
|
opacity: 0;
|
|
width: 50%;
|
|
|
|
&-wrapper {
|
|
@extend .maputnik-input;
|
|
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
position: relative;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
cursor: pointer;
|
|
max-width: 24px;
|
|
}
|
|
|
|
&-box {
|
|
display: inline-block;
|
|
text-align: center;
|
|
height: 24px;
|
|
width: 24px;
|
|
margin-right: $margin-2;
|
|
background-color: $color-gray;
|
|
border-radius: 2px;
|
|
border-style: solid;
|
|
border-width: 2px;
|
|
border-color: $color-gray;
|
|
transition: background-color 0.1s ease-out;
|
|
|
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
transition-duration: 0ms;
|
|
}
|
|
}
|
|
|
|
&-icon {
|
|
width: 50%;
|
|
height: 50%;
|
|
margin-top: 1px;
|
|
fill: $color-lowgray;
|
|
}
|
|
}
|
|
|
|
// AUTOCOMPLETE
|
|
.maputnik-autocomplete {
|
|
&-menu {
|
|
border: none;
|
|
padding: 2px 0;
|
|
margin-right: 10px;
|
|
position: absolute;
|
|
overflow: auto;
|
|
max-height: 50%;
|
|
background: $color-gray;
|
|
z-index: 3;
|
|
}
|
|
|
|
&-menu-item {
|
|
user-select: none;
|
|
color: $color-lowgray;
|
|
cursor: default;
|
|
padding: $margin-1;
|
|
font-size: $font-size-6;
|
|
z-index: 3;
|
|
background: $color-gray;
|
|
}
|
|
|
|
&-menu-item-selected {
|
|
background: $color-midgray;
|
|
}
|
|
}
|
|
|
|
// FONT
|
|
.maputnik-font {
|
|
.maputnik-autocomplete:not(:last-child) {
|
|
margin-bottom: $margin-3;
|
|
}
|
|
}
|