Files
editor/src/styles/_components.scss
Harel M a22476cab2 Add lint to CI and fix errors (#853)
Adds lint to CI and fixes errors.
I'm not sure I'm fully proud of all the solutions there.
But there's no lint issues and the lint is being checked as part of the
CI.

---------

Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
2023-12-26 23:13:22 +02:00

314 lines
5.0 KiB
SCSS

@use 'sass:color';
// MAP
.maputnik-map__container {
background: white;
display: flex;
position: fixed !important;
top: $toolbar-height + $toolbar-offset;
right: 0;
bottom: 0;
height: calc(100% - #{$toolbar-height + $toolbar-offset});
width: $layout-map-width;
&--error {
align-items: center;
justify-content: center;
}
&__error-message {
margin: 16px;
text-align: center;
}
}
.maputnik-map__map {
width: 100%;
height: 100%;
}
.maputnik-input-block:hover,
.maputnik-filter-editor-compound-select:hover {
.maputnik-doc-button {
opacity: 1;
pointer-events: all;
cursor: pointer;
}
}
// DOC LABEL
.maputnik-doc {
&-wrapper {
display: inline-block;
box-sizing: border-box;
font-size: $font-size-6;
line-height: 2;
user-select: none;
position: relative;
vertical-align: top;
}
&-popup {
display: none;
color: $color-lowgray;
background-color: $color-gray;
padding: $margin-2;
font-size: 10px;
position: absolute;
top: 20px;
left: 0;
width: 120px;
z-index: 10;
pointer-events: none;
}
&-button {
opacity: 0;
pointer-events: none;
background: $color-black;
color: white;
border: none;
padding: 4px;
svg {
pointer-events: none;
}
&--open {
opacity: 1;
pointer-events: all;
}
}
}
.maputnik-doc-inline {
color: $color-lowgray;
background-color: $color-gray;
padding: $margin-2;
font-size: 12px;
margin-top: $margin-3;
line-height: 1.5;
flex: 1 0;
}
.maputnik-doc-target:hover .maputnik-doc-popup {
display: block;
text-align: left;
}
// BUTTON
.maputnik-button {
display: inline-block;
cursor: pointer;
background-color: $color-midgray;
color: $color-lowgray;
font-size: $font-size-6;
padding: $margin-2;
user-select: none;
border-width: 0;
border-radius: 2px;
box-sizing: border-box;
text-decoration: none;
&:hover {
background-color: color.adjust($color-midgray, $lightness: 12%);
color: $color-white;
}
&:disabled {
background-color: color.adjust($color-midgray, $lightness: -5%);
color: $color-midgray;
cursor: not-allowed;
}
}
.maputnik-big-button {
margin-top: $margin-3;
display: inline-block;
padding: $margin-3;
font-size: $font-size-5;
}
.maputnik-wide-button {
padding: $margin-2 $margin-3;
}
.maputnik-green-button {
background-color: $color-green;
color: $color-black;
}
.maputnik-white-button {
background-color: $color-white;
color: $color-black;
}
.maputnik-icon-button {
background-color: transparent;
&:hover:not(:disabled) {
background-color: transparent;
label,
svg {
cursor: pointer;
}
svg {
fill: $color-white;
}
}
}
// INPUT BLOCK
.maputnik-input-block {
margin: $margin-3;
display: flex;
flex-wrap: wrap;
&-label {
color: $color-lowgray;
user-select: none;
width: 32%;
vertical-align: top;
font-size: 12px;
}
&-action {
color: $color-lowgray;
user-select: none;
width: 18%;
vertical-align: top;
font-size: 12px;
text-align: right;
}
&-content {
width: 50%;
}
}
.maputnik-action-block {
.maputnik-input-block-label {
display: inline-block;
width: 32%;
margin-bottom: $margin-3;
}
.maputnik-input-block-action {
vertical-align: top;
display: inline-block;
width: 18%;
}
.maputnik-input-block-action > div {
text-align: right;
}
}
.maputnik-data-spec-block,
.maputnik-zoom-spec-property {
.maputnik-inline-error {
margin-left: 32%;
}
}
// SPACE HELPER
.maputnik-space {
@include vendor-prefix(flex-grow, 1);
}
// MESSAGE PANEL
.maputnik-message-panel {
padding: $margin-2;
&-error {
color: $color-red;
}
&__switch-button {
all: unset;
text-decoration: underline;
cursor: pointer;
}
}
.maputnik-dialog {
&__buttons {
text-align: right;
}
}
.map-state-menu {
display: inline-block;
&__menu {
position: absolute;
z-index: 999999;
background: $color-black;
display: flex;
flex-direction: column;
align-content: stretch;
li {
display: flex;
flex-direction: column;
button {
width: 100%;
text-align: left;
}
}
}
}
.maputnik-inline-error {
color: #a4a4a4;
padding: 0.4em 0.4em;
font-size: 0.9em;
border: solid 1px $color-red;
border-radius: 2px;
margin: $margin-2 0px;
}
.maputnik-expression-editor {
border: solid 1px $color-gray;
}
.maputnik-input-block--wide {
.maputnik-input-block-content {
display: block;
width: auto;
flex: 1;
}
.maputnik-input-block-label {
width: 82%;
}
.maputnik-input-block-action {
text-align: right;
}
}
.maputnik-expr-infobox {
font-size: $font-size-6;
background: $color-midgray;
padding: $margin-2;
border-radius: 2px;
border-top-right-radius: 0px;
border-top-left-radius: 0px;
color: $color-white;
}
.maputnik-expr-infobox__button {
background: none;
border: none;
padding: 0;
text-decoration: underline;
color: currentColor;
cursor: pointer;
}