Skip to content
New issue

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 support for contrast detection #3224

Closed
Synchro opened this issue Apr 25, 2012 · 1 comment
Closed

Add support for contrast detection #3224

Synchro opened this issue Apr 25, 2012 · 1 comment
Labels

Comments

@Synchro
Copy link
Contributor

Synchro commented Apr 25, 2012

I'd like Bootstrap to be able to accept radical colour palette changes without becoming unusable, for example to be able to switch to a white-on-black scheme simply by doing this:

@bodyBackground:       @grayDark;
@textColor:            @white;

At present there are lots of things that fail with this change because they are set to explicit colour values that don't provide sufficient contrast, and in some places even this is compromised (for example bootstrap occasionally uses white on yellow, and tries to work around it by using a particularly dark yellow). While I'm mainly thinking of this for aesthetic reasons, it would probably be very helpful for sites that need to conform to ARIA/WCAG standards that stipulate particular levels of contrast.

In order for this to be possible, there needs to be a way of dynamically selecting colours according to their contrast, but at present LESS lacks such a function. Fortunately I've written one, though it's been sitting in a pull request for some time, but when it's in, I'd like this to be considered for bootstrap.

@mdo
Copy link
Member

mdo commented May 14, 2012

Not something we'll add to the core for now. Thanks though.

@mdo mdo closed this as completed May 14, 2012
@cvrebert cvrebert added the css label Oct 31, 2015
@twbs twbs locked and limited conversation to collaborators Oct 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants