Skip to content

Commit e55e160

Browse files
Fix: Replace incompatible rgb() CSS syntax to support older gulp-sass versions (#5499) (#6161)
* docs(raster): clarify tileSize usage with 256px tiles and improve examples * docs(raster): Fix tileSize note, update spec link, and fix TSDoc escape warning * fix: replace modern rgb() notation with rgba() for sass compatibility * fix: replace modern rgb() notation with rgba() for sass compatibility * fix: replace modern rgb() notation with rgba() for sass compatibility
1 parent 7ccf8ed commit e55e160

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

.stylelintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"property-no-vendor-prefix": true,
1313
"function-no-unknown": [true, {
1414
"ignoreFunctions": ["svg-load", "svg-inline"]
15-
}]
15+
}],
16+
"function-disallowed-list": ["/^rgb\\((?!\\d+,\\s*\\d+,\\s*\\d+\\))/"]
1617
},
1718
"ignoreFiles": [
1819
"dist/**/*.css"

src/css/maplibre-gl.css

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif;
33
overflow: hidden;
44
position: relative;
5-
-webkit-tap-highlight-color: rgb(0 0 0 / 0%);
5+
-webkit-tap-highlight-color: rgb(0, 0, 0, 0);
66
}
77

88
.maplibregl-canvas {
@@ -118,7 +118,7 @@
118118
}
119119

120120
.maplibregl-ctrl-group:not(:empty) {
121-
box-shadow: 0 0 0 2px rgb(0 0 0 / 10%);
121+
box-shadow: 0 0 0 2px rgb(0, 0, 0, 0.1);
122122
}
123123

124124
@media (forced-colors: active) {
@@ -169,7 +169,7 @@
169169

170170
.maplibregl-ctrl-attrib-button:focus,
171171
.maplibregl-ctrl-group button:focus {
172-
box-shadow: 0 0 2px 2px rgb(0 150 255 / 100%);
172+
box-shadow: 0 0 2px 2px rgb(0, 150, 255, 1);
173173
}
174174

175175
.maplibregl-ctrl button:disabled {
@@ -182,16 +182,16 @@
182182

183183
@media (hover: hover) {
184184
.maplibregl-ctrl button:not(:disabled):hover {
185-
background-color: rgb(0 0 0/5%);
185+
background-color: rgb(0, 0, 0, 0.05);
186186
}
187187
}
188188

189189
.maplibregl-ctrl button:not(:disabled):active {
190-
background-color: rgb(0 0 0/5%);
190+
background-color: rgb(0, 0, 0, 0.05);
191191
}
192192

193193
.maplibregl-ctrl-group button:focus:focus-visible {
194-
box-shadow: 0 0 2px 2px rgb(0 150 255 / 100%);
194+
box-shadow: 0 0 2px 2px rgb(0, 150, 255, 1);
195195
}
196196

197197
.maplibregl-ctrl-group button:focus:not(:focus-visible) {
@@ -482,7 +482,7 @@ a.maplibregl-ctrl-logo.maplibregl-compact {
482482

483483
.maplibregl-ctrl.maplibregl-ctrl-attrib {
484484
padding: 0 5px;
485-
background-color: rgb(255 255 255 / 50%);
485+
background-color: rgb(255, 255, 255, 0.5);
486486
margin: 0;
487487
}
488488

@@ -518,7 +518,7 @@ a.maplibregl-ctrl-logo.maplibregl-compact {
518518
cursor: pointer;
519519
position: absolute;
520520
background-image: svg-load("svg/maplibregl-ctrl-attrib.svg");
521-
background-color: rgb(255 255 255 / 50%);
521+
background-color: rgb(255, 255, 255, 0.5);
522522
width: 24px;
523523
height: 24px;
524524
box-sizing: border-box;
@@ -549,7 +549,7 @@ a.maplibregl-ctrl-logo.maplibregl-compact {
549549
}
550550

551551
.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button {
552-
background-color: rgb(0 0 0 / 5%);
552+
background-color: rgb(0, 0, 0, 0.05);
553553
}
554554

555555
.maplibregl-ctrl-bottom-right > .maplibregl-ctrl-attrib.maplibregl-compact::after {
@@ -586,7 +586,7 @@ a.maplibregl-ctrl-logo.maplibregl-compact {
586586
}
587587

588588
.maplibregl-ctrl-attrib a {
589-
color: rgb(0 0 0 / 75%);
589+
color: rgb(0, 0, 0, 0.75);
590590
text-decoration: none;
591591
}
592592

@@ -600,7 +600,7 @@ a.maplibregl-ctrl-logo.maplibregl-compact {
600600
}
601601

602602
.maplibregl-ctrl-scale {
603-
background-color: rgb(255 255 255 / 75%);
603+
background-color: rgb(255, 255, 255, 0.75);
604604
font-size: 10px;
605605
border-width: medium 2px 2px;
606606
border-style: none solid solid;
@@ -709,14 +709,14 @@ a.maplibregl-ctrl-logo.maplibregl-compact {
709709
}
710710

711711
.maplibregl-popup-close-button:hover {
712-
background-color: rgb(0 0 0 / 5%);
712+
background-color: rgb(0, 0, 0, 0.05);
713713
}
714714

715715
.maplibregl-popup-content {
716716
position: relative;
717717
background: #fff;
718718
border-radius: 3px;
719-
box-shadow: 0 1px 2px rgb(0 0 0 / 10%);
719+
box-shadow: 0 1px 2px rgb(0, 0, 0, 0.1);
720720
padding: 15px 10px;
721721
pointer-events: auto;
722722
}
@@ -789,7 +789,7 @@ a.maplibregl-ctrl-logo.maplibregl-compact {
789789
top: -2px;
790790
width: 19px;
791791
box-sizing: border-box;
792-
box-shadow: 0 0 3px rgb(0 0 0 / 35%);
792+
box-shadow: 0 0 3px rgb(0, 0, 0, 0.35);
793793
}
794794

795795
@keyframes maplibregl-user-location-dot-pulse {
@@ -831,7 +831,7 @@ a.maplibregl-ctrl-logo.maplibregl-compact {
831831
}
832832

833833
.maplibregl-cooperative-gesture-screen {
834-
background: rgba(0 0 0 / 40%);
834+
background: rgb(0, 0, 0, 0.4);
835835
position: absolute;
836836
inset: 0;
837837
display: flex;

0 commit comments

Comments
 (0)