Skip to content

Fixing highContrastTextColor sass function#1275

Merged
cchaos merged 3 commits into
elastic:masterfrom
cchaos:fix-color-function
Oct 31, 2018
Merged

Fixing highContrastTextColor sass function#1275
cchaos merged 3 commits into
elastic:masterfrom
cchaos:fix-color-function

Conversation

@cchaos
Copy link
Copy Markdown
Contributor

@cchaos cchaos commented Oct 31, 2018

The foreground is now adjusted based on the backgrounds brightness not the theme. It also includes fail safes to stop the @while from running if it reaches a certain lightness level (can’t lighten/darken any further).

To test

Try changing any tintOrShade to just tint or shade.

The foreground is now adjusted based on the backgrounds brightness not the theme. It also includes fail safes to stop the `@while` from running if it reaches a certain lightness level (can’t lighten/darken any further).
@cchaos cchaos requested review from ryankeairns and snide October 31, 2018 18:00
Copy link
Copy Markdown
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. This is a great change.

We should add a CL for this, even though it's just the Sass layer.

@cchaos
Copy link
Copy Markdown
Contributor Author

cchaos commented Oct 31, 2018

Yep, whoops, forgot. I guess it's been a while....

Copy link
Copy Markdown
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without having poked around at the code, I had made the assumption it already worked in this manner. Expectations now meet reality which is a great place to be, nice enhancement :)

@cchaos cchaos merged commit 937c8e1 into elastic:master Oct 31, 2018
@cchaos cchaos deleted the fix-color-function branch October 31, 2018 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants