mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Refactor plugin SCSS compilation (#12359)
This commit is contained in:
2
spec/fixtures/plugins/scss_plugin/assets/stylesheets/colors.scss
vendored
Normal file
2
spec/fixtures/plugins/scss_plugin/assets/stylesheets/colors.scss
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
$color1: red;
|
||||
$color2: green;
|
||||
1
spec/fixtures/plugins/scss_plugin/assets/stylesheets/common/_variables.scss
vendored
Normal file
1
spec/fixtures/plugins/scss_plugin/assets/stylesheets/common/_variables.scss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
$lineheight: 1.2em;
|
||||
13
spec/fixtures/plugins/scss_plugin/assets/stylesheets/common/common.scss
vendored
Normal file
13
spec/fixtures/plugins/scss_plugin/assets/stylesheets/common/common.scss
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
@import "_variables";
|
||||
@import "../colors";
|
||||
@import "subfolder/other";
|
||||
|
||||
body {
|
||||
border-color: $color1;
|
||||
fill: $color2;
|
||||
line-height: $lineheight;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-color: $footer1;
|
||||
}
|
||||
6
spec/fixtures/plugins/scss_plugin/assets/stylesheets/common/subfolder/other.scss
vendored
Normal file
6
spec/fixtures/plugins/scss_plugin/assets/stylesheets/common/subfolder/other.scss
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
$footer1: #cc0000;
|
||||
|
||||
code {
|
||||
// ensures core variables are available
|
||||
font-size: $font-down-2;
|
||||
}
|
||||
7
spec/fixtures/plugins/scss_plugin/plugin.rb
vendored
Normal file
7
spec/fixtures/plugins/scss_plugin/plugin.rb
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# name: scss_plugin
|
||||
# about: Fixture plugin for SCSS tests
|
||||
# version: 1.0
|
||||
|
||||
register_asset "stylesheets/common/common.scss"
|
||||
Reference in New Issue
Block a user