Skip to content

Instantly share code, notes, and snippets.

@mixin text-contrast($n) {
$color-brightness: round((red($n)*299)+(green($n)*587)+(blue($n)*114)/1000);
$light-color: round((red(#ffffff)*299)+(green(#ffffff)*587)+(blue(#ffffff)*114)/1000);
@if abs($color-brightness) < ($light-color/2){
color: white;
} @else {
color: black;
}
}
a, a:link, a:visited {
@while(contrast-checker($link-colour, #ffffff) == "false") {
$link-colour: darken($link-colour, 1%);
@if(contrast-checker($link-colour, #ffffff) == "true") {
color: $link-colour;
}
}
}
:boom: *SC RELEASE*:
Following things need to be sentence case in the markup:
- The module titles in the #managerPanel
- The h2 at the top of the .managerSubMenu: https://i.imgur.com/hhn1hkl.png
- The 'MODERATION' and 'NEW POST/COMMENTS PENDING' labels here on the home dashboard: https://i.imgur.com/LgyE4OD.png
CSS to add to existing manager.css to avoid and knock on:
.moduleButton,
.managerSubMenu h2,