XF 2.3 Define light and dark colors without a palette

stromb0li

Well-known member
Is there a way to define a one-off color that accounts for both light and dark mode instead of using the @palette colors?

For example, I'd like to specify a value like:
[hsl(0 0% 20% / 1),hsl(0 0% 10% / 1)]
 
Solution
D
In Less templates ?
Less:
.some-class
{
    // normal rules (default color scheme -- light in the default style)

    .m-colorScheme({{ $xf.style.getAlternateStyleType() }},
    {
        // alternate rules (alternate color scheme -- dark in the default style)
    });
}

(https://xenforo.com/community/posts/1688837/)
Back
Top Bottom