mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:55:25 +08:00
DEV: Move color definition functions to mixins (#12511)
This commit is contained in:
@ -77,7 +77,7 @@ describe Stylesheet::Importer do
|
||||
|
||||
context "#import_color_definitions" do
|
||||
let(:scss) { ":root{--custom-color: green}" }
|
||||
let(:scss_child) { ":root{--custom-color: red}" }
|
||||
let(:scss_child) { "$navy: #000080; :root{--custom-color: red; --custom-color-rgb: \#{hexToRGB($navy)}}" }
|
||||
|
||||
let(:theme) do
|
||||
Fabricate(:theme).tap do |t|
|
||||
@ -101,8 +101,10 @@ describe Stylesheet::Importer do
|
||||
theme.save!
|
||||
|
||||
styles = Stylesheet::Importer.new({ theme_id: theme.id }).import_color_definitions
|
||||
expect(styles).to include(scss_child)
|
||||
expect(styles).to include("Color definitions from Child Theme")
|
||||
expect(styles).to include("--custom-color: red")
|
||||
expect(styles).to include("--custom-color-rgb: 0,0,128")
|
||||
|
||||
end
|
||||
|
||||
it "should include default theme color definitions" do
|
||||
|
Reference in New Issue
Block a user