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

Fixes #2741: Update form inputs derived variables #2743

Closed
wants to merge 2 commits into from

Conversation

marcbelletre
Copy link

Use $grey-darker and $grey as default instead of $text-strong and $text-light which may contain the "inherit" value (fixes issue #2741)

This is an improvement / bugfix.

I ran into a compiling error with Bulma 0.8.0 when trying to use inherit value for the $text-strong variable. I found out this is due to breaking changes in commit 0f988ea in which a lot of default colors have been modified. This particular line was throwing the error when using inherit value for $text-strong:

$input-placeholder-color: rgba($text-strong, 0.3) !default

I think we may often use this particular value for the $text-strong and $text-light variables because there are a lot of cases where a <strong> tag in a text should just inherit its parent color.
Also I think it doesn't really make sense to use the strong text color as default in any other derived variable.

Proposed solution

In this PR I just put back the old default values, replacing $text-strong by $grey-darker and $text-light by $grey. By the way this is what the docs actually says.

Tradeoffs

There are still other derived variables which use the $text-strong and $text-light ones as default. All of these changes have been made in commit 0f988ea.
Maybe it could be a better idea to roll back the whole commit but I'm not really sure about that.

Testing Done

I did test this PR in my project. Using $text-strong: inherit does not throw a compiling error anymore.

Changelog updated?

No.

Use `$grey-darker` and `$grey` as default instead of `$text-strong` and `$text-light` which may contain the "inherit" value (jgthms#2741)
@afwn90cj93201nixr2e1re
Copy link

@jgthms

@jgthms
Copy link
Owner

jgthms commented Dec 22, 2019

The idea with using $text-strong is that you only need to update once if you want to make a dark mode for example.

The fix would be to instead handle the rgba() case where inherit is used.

@jgthms jgthms closed this Jan 5, 2020
@tomekr
Copy link

tomekr commented Mar 25, 2020

@jgthms with the use of inherit (https://github.com/jgthms/bulma/blob/0.8.1/sass/form/shared.sass#L1) it looks like in a hero, the input will inherit the text color from a heading/subheading, causing the text to be white.

Screen Shot 2020-03-25 at 2 11 22 PM
Screen Shot 2020-03-25 at 2 11 25 PM

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.

4 participants