Firefox-UI-Fix/__tests__/theme.test.scss

98 lines
3 KiB
SCSS

@use 'true' as *;
@use "example" as *;
@use "sass:selector";
@use "../src/utils/theme";
@include test-module("Built-In Light Theme Selector [fn]") {
@include test("simple") {
@include assert {
@include output {
#{theme.built-in-light-theme()} {
@include example_property;
}
}
@include expect {
:root[lwtheme-mozlightdark]:not([lwthemetextcolor=bright]), :root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"] {
@include example_property;
}
}
}
}
@include test("append selector") {
@include assert {
@include output {
#{selector.append(theme.built-in-light-theme(), "[inFullscreen=true]")} {
@include example_property;
}
}
@include expect {
:root[lwtheme-mozlightdark]:not([lwthemetextcolor=bright])[inFullscreen=true], :root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"][inFullscreen=true] {
@include example_property;
}
}
}
}
@include test("nested selector") {
@include assert {
@include output {
#{selector.nest(theme.built-in-light-theme(), "#navigator-toolbox")} {
@include example_property;
}
}
@include expect {
:root[lwtheme-mozlightdark]:not([lwthemetextcolor=bright]) #navigator-toolbox, :root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"] #navigator-toolbox {
@include example_property;
}
}
}
}
}
@include test-module("Built-In Dark Theme Selector [fn]") {
@include test("simple") {
@include assert {
@include output {
#{theme.built-in-dark-theme()} {
@include example_property;
}
}
@include expect {
:root[lwtheme-mozlightdark][lwthemetextcolor=bright], :root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] {
@include example_property;
}
}
}
}
@include test("append selector") {
@include assert {
@include output {
#{selector.append(theme.built-in-dark-theme(), "[inFullscreen=true]")} {
@include example_property;
}
}
@include expect {
:root[lwtheme-mozlightdark][lwthemetextcolor=bright][inFullscreen=true], :root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"][inFullscreen=true] {
@include example_property;
}
}
}
}
@include test("nested selector") {
@include assert {
@include output {
#{selector.nest(theme.built-in-dark-theme(), "#navigator-toolbox")} {
@include example_property;
}
}
@include expect {
:root[lwtheme-mozlightdark][lwthemetextcolor=bright] #navigator-toolbox, :root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] #navigator-toolbox {
@include example_property;
}
}
}
}
}