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

More explicitly define font resets on form controls #607

Merged
merged 1 commit into from Aug 8, 2016

Conversation

jonathantneal
Copy link
Contributor

@jonathantneal jonathantneal commented Jul 7, 2016

Resolves #591 by explicitly setting font-family, font-size, and line-height rather than using inherit.

^ @battaglr, also see the line-height tests in the related issue.

@battaglr
Copy link
Contributor

battaglr commented Jul 7, 2016

@jonathantneal, the code looks great (and thanks for the tests)! I think there's a couple of things that we are missing:

@avastamin
Copy link

  • {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    }

You should add this as well.

@jonathantneal
Copy link
Contributor Author

@avastamin, we all love box-sizing: border-box, but that is not a browser default anywhere, and it has nothing to do with this pull request. For something like normalize.css with developer preferences built in try sanitize.css.

@battaglr, I’ll update the optgroup normalization. Thank you for finding that. I will leave ::-webkit-file-upload-button until we can discuss it in an issue first.

@battaglr
Copy link
Contributor

battaglr commented Aug 4, 2016

@jonathantneal, great! I agree that we can discuss things like ::-webkit-file-upload-button in another issue to avoid delaying this PR. 👍

@jonathantneal jonathantneal merged commit 5d728b8 into master Aug 8, 2016
@jonathantneal jonathantneal deleted the feature/de-inherit branch Aug 8, 2016
Totktonada added a commit to whatifrussian/website that referenced this pull request Oct 7, 2016
---- Summary ----

A text inside the issue form's textarea and the submit button should now
be gray when the element is disabled. Any other style changes are
unintentional and can be considered as bugs (if it looks worse then
before).

Despite some breaks are possible, my thought is that going forward with
actual normalize.css is good choice and any bugs will visible and
therefore will be fixed sooner or latter.

---- Details ----

The original intention was to get fix for color of disabled form's
elements from [1]. It removes `color: inherit` from rules for forms
elements, which affected enabled and disabled elements both. The
intention was to fix the issue form when some elements are disabled.

During testing of the new normalize.css I found that textarea is colored
black despite other text has some other default color (#2e3436). It's
maybe due to my browser has non-so-standard configuration (Firefox 47.0
with dark devedition theme enabled), but anyway it's possible user's
configuration. I added back `color: inherit` for issue form rules and
add `color: graytext` for disabled elements.

New normalize.css also replaces `font: inherit` for form elements with
choosen default (sans-serif, 100%, 1.15 line-height), see [2]. It
doesn't work well when the default font was replaced with some other.
So I added this rule back for the issue form.

There is one more found difference. Search form at the top of the page
cut from right side with the new normalize.css. It's due to reverting
the box-sizing rule, see [3]. I added back `box-sizing: content-box` to
the rules for search input element.

[1]: necolas/normalize.css#502
[2]: necolas/normalize.css#607
[3]: necolas/normalize.css#496
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.

None yet

3 participants