From a3be6e9a7fdaf12f4eeb8dc20578f5cf00bb32eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sat, 3 Aug 2019 15:19:28 +0100 Subject: [PATCH] fix(ui): cleanup scss variable imports All scss imports needs to use App.scss, otherwise some overrides won't be present, like font swap Lato -> Open Sans --- ui/src/App.scss | 2 +- ui/src/Components/Labels/BaseLabel/index.scss | 2 +- ui/src/Components/Labels/FilterInputLabel/index.scss | 2 +- ui/src/Components/Labels/LabelWithPercent/index.scss | 2 +- ui/src/Components/MainModal/Configuration/InputRange.scss | 2 +- ui/src/Components/NavBar/index.scss | 4 +--- ui/src/Components/OverviewModal/index.scss | 4 +--- ui/src/Components/SilenceModal/DateTimeSelect/index.scss | 2 +- ui/src/Fonts.scss | 4 ++-- ui/src/empty.css | 1 - 10 files changed, 10 insertions(+), 15 deletions(-) delete mode 100644 ui/src/empty.css diff --git a/ui/src/App.scss b/ui/src/App.scss index 3700c58d5..7d0ac387d 100644 --- a/ui/src/App.scss +++ b/ui/src/App.scss @@ -1,5 +1,5 @@ // bundled font assets, so we don't need to talk to Google Fonts API -@import "./Fonts.scss"; +@import "src/Fonts.scss"; // custom "dark" color, little less dark than flatly $blue: #455a64; diff --git a/ui/src/Components/Labels/BaseLabel/index.scss b/ui/src/Components/Labels/BaseLabel/index.scss index 6b8bc30ba..f6ea22a18 100644 --- a/ui/src/Components/Labels/BaseLabel/index.scss +++ b/ui/src/Components/Labels/BaseLabel/index.scss @@ -1,4 +1,4 @@ -@import "~bootswatch/dist/flatly/variables"; +@import "src/App.scss"; .components-label-with-hover:hover { filter: brightness(0.85); diff --git a/ui/src/Components/Labels/FilterInputLabel/index.scss b/ui/src/Components/Labels/FilterInputLabel/index.scss index 07220dbfb..4c6080d30 100644 --- a/ui/src/Components/Labels/FilterInputLabel/index.scss +++ b/ui/src/Components/Labels/FilterInputLabel/index.scss @@ -1,4 +1,4 @@ -@import "~bootswatch/dist/flatly/variables"; +@import "src/App.scss"; .components-filteredinputlabel-text { font-size: 1rem; diff --git a/ui/src/Components/Labels/LabelWithPercent/index.scss b/ui/src/Components/Labels/LabelWithPercent/index.scss index 45ea4f2f2..f22744c94 100644 --- a/ui/src/Components/Labels/LabelWithPercent/index.scss +++ b/ui/src/Components/Labels/LabelWithPercent/index.scss @@ -1,4 +1,4 @@ -@import "~bootswatch/dist/flatly/variables"; +@import "src/App.scss"; .components-labelWithPercent-percent { padding-top: 0.25rem; diff --git a/ui/src/Components/MainModal/Configuration/InputRange.scss b/ui/src/Components/MainModal/Configuration/InputRange.scss index 615a47bd6..d1a474d2b 100644 --- a/ui/src/Components/MainModal/Configuration/InputRange.scss +++ b/ui/src/Components/MainModal/Configuration/InputRange.scss @@ -1,5 +1,5 @@ // customize colors and fonts using bootstrap variables -@import "~bootswatch/dist/flatly/variables"; +@import "src/App.scss"; $input-range-font-family: $font-family-sans-serif; $input-range-primary-color: $primary; diff --git a/ui/src/Components/NavBar/index.scss b/ui/src/Components/NavBar/index.scss index 94e19965f..4bdbdd4ad 100644 --- a/ui/src/Components/NavBar/index.scss +++ b/ui/src/Components/NavBar/index.scss @@ -1,6 +1,4 @@ -@import "~bootswatch/dist/flatly/variables"; -@import "~bootstrap/scss/bootstrap"; -@import "~bootswatch/dist/flatly/bootswatch"; +@import "src/App.scss"; .navbar-brand { min-width: 2.5rem; diff --git a/ui/src/Components/OverviewModal/index.scss b/ui/src/Components/OverviewModal/index.scss index 4816362e4..38c11d571 100644 --- a/ui/src/Components/OverviewModal/index.scss +++ b/ui/src/Components/OverviewModal/index.scss @@ -1,6 +1,4 @@ -@import "~bootswatch/dist/flatly/variables"; -@import "~bootstrap/scss/bootstrap"; -@import "~bootswatch/dist/flatly/bootswatch"; +@import "src/App.scss"; .navbar-brand { &:hover, diff --git a/ui/src/Components/SilenceModal/DateTimeSelect/index.scss b/ui/src/Components/SilenceModal/DateTimeSelect/index.scss index 02c41ab80..9b1d91ad1 100644 --- a/ui/src/Components/SilenceModal/DateTimeSelect/index.scss +++ b/ui/src/Components/SilenceModal/DateTimeSelect/index.scss @@ -1,4 +1,4 @@ -@import "~bootswatch/dist/flatly/variables"; +@import "src/App.scss"; $datepicker__background-color: $white; $datepicker__border-color: $gray-300; diff --git a/ui/src/Fonts.scss b/ui/src/Fonts.scss index d4a4bd889..9e39beb35 100644 --- a/ui/src/Fonts.scss +++ b/ui/src/Fonts.scss @@ -1,7 +1,7 @@ // this is used by bootswatch to import the font, we bundle all fonts so there -// is nothing to import, so let's point it at an empty file +// is nothing to import // https://github.com/thomaspark/bootswatch/issues/55 -$web-font-path: "./empty.css"; +$web-font-path: "data:text/css;base64,"; // Default for Bootstrap is 700 and it's a bit too thick for Open Sans $font-weight-bold: 600; diff --git a/ui/src/empty.css b/ui/src/empty.css deleted file mode 100644 index 88e46d2be..000000000 --- a/ui/src/empty.css +++ /dev/null @@ -1 +0,0 @@ -/* Empty css file to be included by bootswatch, see Fonts.scss */