From 68971702c54d28d3c8df850f31c68f4ed3027b1c Mon Sep 17 00:00:00 2001 From: Peter Hunnisett <29824554+phBalance@users.noreply.github.com> Date: Sat, 14 Dec 2024 09:58:48 -0700 Subject: [PATCH 1/2] refactor(scss): start to make explicit what is hero override vs unique --- scss/components/_dice.scss | 27 ------------------ scss/components/foundry-overrides/_dice.scss | 30 ++++++++++++++++++++ scss/herosystem6e.scss | 8 ++---- 3 files changed, 33 insertions(+), 32 deletions(-) delete mode 100644 scss/components/_dice.scss create mode 100644 scss/components/foundry-overrides/_dice.scss diff --git a/scss/components/_dice.scss b/scss/components/_dice.scss deleted file mode 100644 index 79b82c67..00000000 --- a/scss/components/_dice.scss +++ /dev/null @@ -1,27 +0,0 @@ -.dice-total { - &.success { - color: inherit; - background: #c7d0c0; - border: 1px solid #006c00; - } - - &.failure { - color: inherit; - background: #fdd; - border: 1px solid #6e0000; - } - - &.critical { - color: green; - } - - &.fumble { - color: red; - } -} - -.dice-rolls .roll { - &.calculated { - background-image: url("../icons/circle.svg"); - } -} diff --git a/scss/components/foundry-overrides/_dice.scss b/scss/components/foundry-overrides/_dice.scss new file mode 100644 index 00000000..54645d5a --- /dev/null +++ b/scss/components/foundry-overrides/_dice.scss @@ -0,0 +1,30 @@ +// These all override FoundryVTT basic styling +.dice-roll { + .dice-total { + &.success { + color: inherit; + background: #c7d0c0; + border: 1px solid #006c00; + } + + &.failure { + color: inherit; + background: #fdd; + border: 1px solid #6e0000; + } + + &.critical { + color: green; + } + + &.fumble { + color: red; + } + } + + .dice-rolls .roll { + &.calculated { + background-image: url("../icons/circle.svg"); + } + } +} diff --git a/scss/herosystem6e.scss b/scss/herosystem6e.scss index a96a4914..c9f38a5d 100644 --- a/scss/herosystem6e.scss +++ b/scss/herosystem6e.scss @@ -11,6 +11,9 @@ @use "global/grid"; @use "global/flex"; +/* Styles for dice which are direct overrides of FoundryVTT styling */ +@include meta.load-css("components/dice"); + /* Styles limited to hero sheets */ .hero { @include meta.load-css("components/forms"); @@ -26,11 +29,6 @@ @include meta.load-css("components/chat"); -/* Styles for dice */ -.dice-roll { - @include meta.load-css("components/dice"); -} - /* Styles for time tracking */ @include meta.load-css("components/time"); From b2c4edfae53dbdc1da6ff6f87fec37870aa9119d Mon Sep 17 00:00:00 2001 From: Peter Hunnisett <29824554+phBalance@users.noreply.github.com> Date: Sat, 14 Dec 2024 10:01:11 -0700 Subject: [PATCH 2/2] fix(foundry-overrides): put scss in new location --- scss/herosystem6e.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/herosystem6e.scss b/scss/herosystem6e.scss index c9f38a5d..e61b64f3 100644 --- a/scss/herosystem6e.scss +++ b/scss/herosystem6e.scss @@ -12,7 +12,7 @@ @use "global/flex"; /* Styles for dice which are direct overrides of FoundryVTT styling */ -@include meta.load-css("components/dice"); +@include meta.load-css("components/foundry-overrides/dice"); /* Styles limited to hero sheets */ .hero {