Skip to content

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 4, 2019

For some reason the padding on mat-form-field was reset inside the popover edit overlay which made it looked weird. From what I can tell, there's no reason to do this so these changes remove the override.

For reference, here's what it looks like at the moment:
Angular_Material_-_Google_Chrome_2019-11-04_10-30-02
Angular_Material_-_Google_Chrome_2019-11-04_13-23-00

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent pr: merge safe target: patch This PR is targeted for the next patch release labels Nov 4, 2019
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 4, 2019
@kseamon
Copy link
Collaborator

kseamon commented Nov 4, 2019

IIRC I did that to fix weird layout when there's no heading in the popup. Can you add a screenshot of that use case without the style override?

@crisbeto
Copy link
Member Author

crisbeto commented Nov 4, 2019

Updated the description with an "after" screenshot.

@kseamon
Copy link
Collaborator

kseamon commented Nov 4, 2019

Please also add a screenshot with one of the examples that does not have heading text. I think that’s the case that looked really bad with all the extra top padding in the form field.

Might be solvable with some negative margins?

@crisbeto
Copy link
Member Author

crisbeto commented Nov 4, 2019

Sure, here's a before and after. I don't think there's anything off about it:

Angular_Material_-_Google_Chrome_2019-11-04_19-37-30
Angular_Material_-_Google_Chrome_2019-11-04_19-37-45

@kseamon
Copy link
Collaborator

kseamon commented Nov 4, 2019

That’s it. The space reserved for the label causes a mismatch in vertical spacing above and below. Unfortunately the visual spec I’m working off of is internal or I’d share it.

Is there another less objectionable way to fix the spacing issue without overriding the form field styling?

@crisbeto
Copy link
Member Author

crisbeto commented Nov 4, 2019

How about only clearing the padding-top? The main issue I was aiming to address with this PR was the text being flush against the bottom border. Here's what removing the top padding only looks like:

Angular_Material_-_Google_Chrome_2019-11-04_21-08-57

@kseamon
Copy link
Collaborator

kseamon commented Nov 4, 2019

Looks good. Thanks.

@crisbeto crisbeto closed this Nov 4, 2019
@crisbeto crisbeto force-pushed the popover-edit-form-field-padding branch from b226075 to 0f6cd05 Compare November 4, 2019 20:20
For some reason the padding on `mat-form-field` was reset inside the popover edit overlay which made it looked weird. From what I can tell, there's no reason to do this so these changes remove the override.
@crisbeto crisbeto reopened this Nov 4, 2019
@crisbeto crisbeto added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Nov 4, 2019
@mmalerba mmalerba merged commit 790b53e into angular:master Nov 5, 2019
@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 Dec 6, 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 P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants