mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2025-12-06 02:30:54 -08:00
Clean: SASS - Dark mixin
This commit is contained in:
parent
7a80769986
commit
abfe9027fa
11 changed files with 82 additions and 9 deletions
42
__tests__/darkmode.test.scss
Normal file
42
__tests__/darkmode.test.scss
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
@use 'true' as *;
|
||||
@use "../src/utils/darkmode";
|
||||
|
||||
@include test-module("Color scheme is dark [mx]") {
|
||||
@include test("simple") {
|
||||
@include assert {
|
||||
@include output {
|
||||
@include darkmode.Dark {
|
||||
body {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@include expect {
|
||||
@media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) {
|
||||
body {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include test("simple reversed") {
|
||||
@include assert {
|
||||
@include output {
|
||||
body {
|
||||
@include darkmode.Dark {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@include expect {
|
||||
@media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) {
|
||||
body {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
23
__tests__/option.test.scss
Normal file
23
__tests__/option.test.scss
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
@use 'true' as *;
|
||||
@use "../src/utils/option";
|
||||
|
||||
@include test-module("If exist pref [mx]") {
|
||||
@include test("simple") {
|
||||
@include assert {
|
||||
@include output {
|
||||
@include option.Option("userChrome.tab.photon") {
|
||||
body {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@include expect {
|
||||
@supports -moz-bool-pref("userChrome.tab.photon") {
|
||||
body {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue