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

Safari's input[disabled] text is too faded #2355

Closed
dsernst opened this issue Feb 8, 2019 · 6 comments
Closed

Safari's input[disabled] text is too faded #2355

dsernst opened this issue Feb 8, 2019 · 6 comments
Labels

Comments

@dsernst
Copy link

dsernst commented Feb 8, 2019

This is about Bulma.

Overview of the problem

This is about the Bulma CSS framework.
I'm using Bulma version 0.7.2.
My browser is: Desktop Safari 11.1.2, iOS Safari 10.3.3.
I am sure this issue is not a duplicate.

Description

Safari is rendering disabled input fields with faded text.

Instead of the Bulma default #7a7a7a (48% luminosity), the input text renders at #cecece (81% luminosity).

Steps to Reproduce

<input disabled value="Some text" />

Expected behavior

Text color would match across browsers.

Actual behavior

image


Here's a StackOverflow documenting this issue (not Bulma specific): https://stackoverflow.com/questions/262158/disabled-input-text-color

It looks like one solution is patching sass/elements/form.sass:

input
  &[disabled],
  fieldset[disabled] &
+   -webkit-text-fill-color: $input-disabled-color
+   opacity: 1

Happy to submit a PR if welcome.

@Neha
Copy link

Neha commented Feb 13, 2019

Hey,
Every browser has its own styling or default style for native HTML tags. When developing a lib/framework should we leave the tags default behavior on the browser and if any user wants to change it, they can go ahead and do needful changes in its own code?

What is your thought?

Thanks,
Neha

@dsernst
Copy link
Author

dsernst commented Feb 18, 2019

Multiple users reported they were confused, thinking the <input disabled> field's value= was instead placeholder= text, because it was so faded.

I agree in part with the sentiment to respect browser defaults.

But Bulma is already choosing to override the default <input disabled> text color. That setting simply isn't taking effect in Safari & iOS Safari.

I believe this can be considered more of a bug than a stylistic choice.

@Neha
Copy link

Neha commented Feb 25, 2019

Make sense. Especially when the Bulma has taken care of the code to override the browser(s) default style.

You should raise the PR with fix as you suggested.

@mxlje
Copy link

mxlje commented May 22, 2019

Is someone working on this? I tried out the fix above and it does fix the issue for me.

dsernst added a commit to dsernst/bulma that referenced this issue Jun 4, 2019
Fixes jgthms#2355 

Safari is rendering `disabled` input fields with faded text. 

Instead of the Bulma default `#7a7a7a` (48% luminosity), the input text renders at `#cecece` (81% luminosity).

Multiple users reported confusion, thinking the `<input disabled> value=` was instead `placeholder=` text, because it was so faded.

Bulma is [already choosing to override the default `<input disabled>` text `color`](https://github.com/jgthms/bulma/blob/ff8c4c18accf2c0094aa77945b1d2180ac927159/sass/elements/form.sass#L67). That setting simply isn't taking effect in Safari & iOS Safari.

This PR fixes it.
@dsernst
Copy link
Author

dsernst commented Jun 4, 2019

PR opened: #2517

@stale
Copy link

stale bot commented Dec 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants