@@ -173,7 +173,7 @@ const discardSavedFeature = () => {
173173@use ' primeflex/core/_variables.scss' as pf ;
174174
175175.map-block-component {
176- --odk-map-spacing : 10 px ;
176+ --odk-map-spacing : 8 px ;
177177}
178178
179179.map-block-component {
@@ -233,70 +233,64 @@ const discardSavedFeature = () => {
233233 }
234234}
235235
236- . control-bar {
236+ @mixin map-floating- control-bar {
237237 position : absolute ;
238+ right : var (--odk-map-spacing );
238239 display : flex ;
239240 flex-direction : column ;
240- top : var (--odk-map-spacing );
241- right : var (--odk-map-spacing );
241+ flex-wrap : nowrap ;
242+ align-items : center ;
243+ box-shadow : none ;
244+ background : none ;
245+ overflow : hidden ;
246+ gap : var (--odk-map-spacing );
242247 z-index : var (--odk-z-index-form-floating );
243- gap : 4 px ;
248+ }
244249
245- button {
246- background : var (--odk-base-background-color );
247- padding : 8px ;
248- border-radius : var (--odk-radius );
249- border : 1px solid var (--odk-border-color );
250- cursor : pointer ;
251- -webkit-tap-highlight-color : transparent ;
252-
253- & :hover {
254- background : var (--odk-muted-background-color );
255- }
250+ @mixin map-control-button {
251+ display : flex ;
252+ align-items : center ;
253+ justify-content : center ;
254+ height : 42px ;
255+ width : 42px ;
256+ border : 1px solid var (--odk-border-color );
257+ border-radius : var (--odk-radius );
258+ background : var (--odk-base-background-color );
259+ font-size : 24px ;
260+ font-weight : 300 ;
261+ color : var (--odk-text-color );
262+ cursor : pointer ;
263+ -webkit-tap-highlight-color : transparent ;
264+
265+ & :hover {
266+ background : var (--odk-muted-background-color );
267+ color : var (--odk-text-color );
268+ }
256269
257- & :disabled {
258- background : var (--odk-muted-background-color );
259- cursor : not-allowed ;
260- }
270+ & :disabled {
271+ background : var (--odk-muted-background-color );
272+ cursor : not-allowed ;
273+ }
274+ }
275+
276+ .control-bar {
277+ @include map-floating-control-bar ;
278+ top : var (--odk-map-spacing );
279+
280+ button {
281+ @include map-control-button ;
261282 }
262283}
263284
264285.map-block-component :deep(.ol-zoom ) {
265- position : absolute ;
266- right : var (--odk-map-spacing );
286+ @include map-floating-control-bar ;
267287 bottom : 35px ;
268- display : flex ;
269- flex-direction : column ;
270- flex-wrap : nowrap ;
271- align-items : center ;
272- box-shadow : none ;
273- background : var (--odk-base-background-color );
274- border-radius : var (--odk-radius );
275- overflow : hidden ;
276- border : 1px solid var (--odk-border-color );
277288
278289 button ,
279290 button :hover ,
280291 button :focus ,
281292 button :active {
282- height : 37px ;
283- width : 36px ;
284- border : none ;
285- background : var (--odk-base-background-color );
286- -webkit-tap-highlight-color : transparent ;
287- font-size : 24px ;
288- font-weight : 300 ;
289- color : var (--odk-text-color );
290- cursor : pointer ;
291-
292- & :first-child {
293- border-bottom : 1px solid var (--odk-border-color );
294- }
295-
296- & :hover {
297- background : var (--odk-muted-background-color );
298- color : var (--odk-text-color );
299- }
293+ @include map-control-button ;
300294 }
301295}
302296
@@ -353,10 +347,6 @@ const discardSavedFeature = () => {
353347}
354348
355349@media screen and (max-width : #{pf .$sm } ) {
356- .map-block-component {
357- --odk-map-spacing : 5px ;
358- }
359-
360350 .map-block-component {
361351 height : fit-content ;
362352 }
@@ -367,7 +357,7 @@ const discardSavedFeature = () => {
367357 height : calc (100vh - var (--map-status-bar-min-height ) - var (--map-label-min-height ));
368358
369359 :deep (.ol-zoom ) {
370- top : 165 px ;
360+ top : 195 px ;
371361 bottom : unset ;
372362 }
373363 }
0 commit comments