Skip to content

Commit

Permalink
Fix usage of --font-text CSS var
Browse files Browse the repository at this point in the history
Remove quotes
Add additional leaflet font family overrides
Move legacy map custom button styles to separate file

Signed-off-by: Josh Romero <[email protected]>
  • Loading branch information
joshuarrrr committed Aug 4, 2023
1 parent 1e78e8f commit d83e5a8
Showing 5 changed files with 17 additions and 12 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;
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;
}
7 changes: 6 additions & 1 deletion src/plugins/maps_legacy/public/map/_leaflet_overrides.scss
Original file line number Diff line number Diff line change
@@ -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;
@@ -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;
@@ -68,7 +73,7 @@ $visMapLeafletSprite: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/s

@include fontSize(11px);

font-family: "var(--font-text)";
font-family: var(--font-text);
font-weight: $euiFontWeightMedium;
line-height: $euiLineHeight;

11 changes: 1 addition & 10 deletions src/plugins/maps_legacy/public/map/_legend.scss
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
@include fontSize(11px);
@include euiBottomShadowMedium($color: $euiShadowColorLarge, $opacity: 0.1);

font-family: "var(--font-text)";
font-family: var(--font-text);
font-weight: $euiFontWeightMedium;
line-height: $euiLineHeight;
color: $euiColorDarkShade;
@@ -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 d83e5a8

Please sign in to comment.