From 466081c39992e65893e12b8be002ea183b5f0ea6 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Fri, 19 Jan 2024 23:42:29 +0000 Subject: [PATCH] Scope global styles to do-bulma class --- src/components/_base.scss | 23 +++++++++++++++++- src/globals/_base.scss | 51 --------------------------------------- src/globals/_fonts.scss | 5 +++- src/style.scss | 3 +-- 4 files changed, 27 insertions(+), 55 deletions(-) delete mode 100644 src/globals/_base.scss diff --git a/src/components/_base.scss b/src/components/_base.scss index 5cfe85a..9702028 100644 --- a/src/components/_base.scss +++ b/src/components/_base.scss @@ -1,5 +1,5 @@ /* -Copyright 2019 DigitalOcean +Copyright 2024 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ +* { + box-sizing: inherit; + + &::before, + &::after { + box-sizing: inherit; + } +} + hr { border: 0; border-top: 2px solid $border; @@ -58,6 +67,18 @@ figure { // Body & { + @include font-regular; + + -moz-osx-font-smoothing: grayscale; + background: $background; + box-sizing: border-box; + color: $text; + line-height: $line-height; + margin: 0; + min-height: 100vh; + padding: 0; + text-rendering: optimizeLegibility; + display: flex; flex-direction: column; diff --git a/src/globals/_base.scss b/src/globals/_base.scss deleted file mode 100644 index b592668..0000000 --- a/src/globals/_base.scss +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2022 DigitalOcean - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// stylelint-disable-next-line import-notation -@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css"); - -// Generic base stuff -html, -body { - @include font-regular; - - -moz-osx-font-smoothing: grayscale; - background: $background; - box-sizing: border-box; - color: $text; - line-height: $line-height; - margin: 0; - min-height: 100vh; - padding: 0; - text-rendering: optimizeLegibility; -} - -* { - box-sizing: inherit; - - &::before, - &::after { - box-sizing: inherit; - } -} - -// This just fixes issues with the DigitalOcean Community page design that we don't like -body { - .wrapper.layout-wrapper { - padding: 0; - width: auto; - } -} diff --git a/src/globals/_fonts.scss b/src/globals/_fonts.scss index cb779f2..0ab97f3 100644 --- a/src/globals/_fonts.scss +++ b/src/globals/_fonts.scss @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2024 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ +// stylelint-disable-next-line import-notation +@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css"); + @font-face { font-display: swap; font-family: $light-font-family-name; diff --git a/src/style.scss b/src/style.scss index 11d0b82..628b563 100644 --- a/src/style.scss +++ b/src/style.scss @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2024 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ limitations under the License. @import "globals/variables"; @import "globals/fonts"; -@import "globals/base"; .do-bulma { @import "~bulma/bulma";