DEV: relocate `:root` CSS custom properties (#19389)

This commit is contained in:
Kris 2022-12-09 14:33:15 -05:00 committed by GitHub
parent 552f16fc95
commit 07e4b7550d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 11 deletions

View File

@ -1,3 +1,17 @@
// These CSS custom properties are added here instead of in variables.scss
// because variables.scss is injected into every theme CSS file
// which causes problems when overriding custom properties in themes
:root {
--topic-body-width: #{$topic-body-width};
--topic-body-width-padding: #{$topic-body-width-padding};
--topic-avatar-width: #{$topic-avatar-width};
--d-border-radius: initial;
--d-nav-pill-border-radius: var(--d-border-radius);
--d-button-border-radius: var(--d-border-radius);
--d-input-border-radius: var(--d-border-radius);
}
// --------------------------------------------------
// Base styles for HTML elements
// --------------------------------------------------

View File

@ -1,5 +1,6 @@
// --------------------------------------------------
// Variables used throughout the theme
// this file is injected into every theme CSS file
// --------------------------------------------------
// Layout dimensions
@ -14,16 +15,6 @@ $topic-body-width-padding: 11px;
$topic-avatar-width: 45px;
$reply-area-max-width: 1475px !default;
:root {
--topic-body-width: #{$topic-body-width};
--topic-body-width-padding: #{$topic-body-width-padding};
--topic-avatar-width: #{$topic-avatar-width};
--d-border-radius: initial;
--d-nav-pill-border-radius: var(--d-border-radius);
--d-button-border-radius: var(--d-border-radius);
--d-input-border-radius: var(--d-border-radius);
}
$d-sidebar-width: 16em !default;
// Brand color variables

View File

@ -6,7 +6,7 @@ require 'json_schemer'
class Theme < ActiveRecord::Base
include GlobalPath
BASE_COMPILER_VERSION = 68
BASE_COMPILER_VERSION = 69
attr_accessor :child_components