Skip to content

Commit

Permalink
Fix --font-text CSS var usage and add more leaflet font overrides (#4674
Browse files Browse the repository at this point in the history
) (#4689)

* Add missing quotes to --font-text CSS vars



* Fix usage of --font-text CSS var

Remove quotes
Add additional leaflet font family overrides
Move legacy map custom button styles to separate file



---------


(cherry picked from commit 04065fa)

Signed-off-by: Josh Romero <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 26dd7a4 commit 5a58b24
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Font

$kuiFontFamily: "var(--font-text)";
$kuiFontFamily: var(--font-text);
$kuiFontSize: $euiFontSize;
$kuiLineHeight: $euiLineHeight;
$kuiSubTextFontSize: $euiFontSizeS;
Expand Down
8 changes: 8 additions & 0 deletions src/plugins/maps_legacy/public/map/_custom_button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.mapButton {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome, sans-serif;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
5 changes: 5 additions & 0 deletions src/plugins/maps_legacy/public/map/_leaflet_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $visMapLeafletSprite: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/s

.leaflet-container {
background: $euiColorEmptyShade;
font-family: var(--font-text);

// the heatmap layer plugin logs an error to the console when the map is in a 0-sized container
min-width: 1px !important;
Expand Down Expand Up @@ -48,6 +49,10 @@ $visMapLeafletSprite: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/s
}
}

.leaflet-draw-actions a {
font-family: var(--font-text);
}

.leaflet-touch .leaflet-bar a:first-child {
border-top-left-radius: $euiBorderRadius;
border-top-right-radius: $euiBorderRadius;
Expand Down
9 changes: 0 additions & 9 deletions src/plugins/maps_legacy/public/map/_legend.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,3 @@
left: $euiSizeXXL;
white-space: nowrap;
}

.mapButton {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome, sans-serif;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
1 change: 1 addition & 0 deletions src/plugins/maps_legacy/public/map/index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@import "./custom_button";
@import "./leaflet_overrides";
@import "./legend";

0 comments on commit 5a58b24

Please sign in to comment.