We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add options custom(Light|Dark)Class to add a CSS class instead of defining color styles on the element.
custom(Light|Dark)Class
let contrast = new Contrast({ customLightClass: 'contrast-el-light', customDarkClass: 'contrast-el-dark', // … });
So in your example:
<h1 class="color-block contrast-el">Resize and watch my color change</h1>
On dark backgrounds, the element would become:
<h1 class="color-block contrast-el contrast-el-light">Resize and watch my color change</h1>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add options
custom(Light|Dark)Class
to add a CSS class instead of defining color styles on the element.So in your example:
On dark backgrounds, the element would become:
The text was updated successfully, but these errors were encountered: