Skip to content

fix(form-field): inconsistent border width across outline gap in Chrome #10956

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

Merged
merged 1 commit into from
Apr 26, 2018

Conversation

kherock
Copy link
Contributor

@kherock kherock commented Apr 23, 2018

Closes #10710 (You can see screenshots there).

Chrome render borders that have non-integer widths differently when a border-radius is set. This adds an imperceptibly small border radius to the outline gap so that it renders the same as the outside borders.

@kherock kherock requested a review from mmalerba as a code owner April 23, 2018 09:19
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@googlebot googlebot added the cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla label Apr 23, 2018
@kherock
Copy link
Contributor Author

kherock commented Apr 23, 2018

CLA is signed!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes PR author has agreed to Google's Contributor License Agreement and removed cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla labels Apr 23, 2018
@kherock kherock force-pushed the outline-gap-fix branch 3 times, most recently from 4b2bbd7 to 0772492 Compare April 23, 2018 09:37
@kherock
Copy link
Contributor Author

kherock commented Apr 23, 2018

Sorry for all the noise on CI, clearly I need some rest. I think this should be ready to be looked at!

@mmalerba
Copy link
Contributor

Thanks for the PR. I'll need to bring up some demos and test across different browsers

Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

Looks great on the browsers I tested!

opacity: 1;
transition: opacity 300ms $swift-ease-out-timing-function;
}
// hack for Chrome's treatment of border width on non-integer displays
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you read about this somewhere, or just figured it out through experimentation? If you read about it, it would be nice to include a link for reference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, this was just through experimentation! Unfortunately I couldn't find any reported issue related to this. I don't imagine this scenario comes up too often.

Closes angular#10710. Chrome render borders that have non-integer widths differently when a border-radius is set. This adds an imperceptibly small border radius to the outline gap so that it renders the same as the outside borders.
@kherock
Copy link
Contributor Author

kherock commented Apr 25, 2018

I just tweaked my comment to be a bit more accurate and updated the issue reference to be a URL rather than just the issue number.

@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Apr 25, 2018
@andrewseguin andrewseguin merged commit a609acf into angular:master Apr 26, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mat-form-field: Form field outline gap has thin border on displays with non integer scaling
4 participants