Skip to content

docs: edit h3, button, and hr, boilerplate styles - #41052

Closed
kapunahelewong wants to merge 1 commit into
angular:masterfrom
kapunahelewong:boilerplate
Closed

kapunahelewong wants to merge 1 commit into
angular:masterfrom
kapunahelewong:boilerplate

Conversation

@kapunahelewong

@kapunahelewong kapunahelewong commented Mar 2, 2021 •

Copy link
Copy Markdown
Contributor

Puts styles into boilerplate to avoid re-use per these comments by @gkalpak #40914 (review)

@kapunahelewong
kapunahelewong requested a review from gkalpak March 2, 2021 16:02
@ngbot ngbot Bot modified the milestone: Backlog Mar 2, 2021
@google-cla google-cla Bot added the cla: yes label Mar 2, 2021
@kapunahelewong kapunahelewong changed the title Boilerplate docs: edit h3, button, and textarea boilerplate styles Mar 2, 2021
@mary-poppins

Copy link
Copy Markdown

@kapunahelewong kapunahelewong changed the title docs: edit h3, button, and textarea boilerplate styles docs: edit h3, button, hr, and textarea boilerplate styles Mar 2, 2021
@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@kapunahelewong
kapunahelewong marked this pull request as ready for review March 9, 2021 16:30
@kapunahelewong kapunahelewong changed the title docs: edit h3, button, hr, and textarea boilerplate styles docs: edit h3, button, and hr, boilerplate styles Mar 9, 2021
@mary-poppins

Copy link
Copy Markdown

@pullapprove
pullapprove Bot requested a review from jessicajaniuk March 9, 2021 21:06
@mary-poppins

Copy link
Copy Markdown

@jessicajaniuk jessicajaniuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🍪

@mary-poppins

Copy link
Copy Markdown

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a little unusual. What is the purpose of this style?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without box-sizing: border-box, the inputs extend past their parent container. This keeps them inside and behaving as intended.

Here's my thinking on the width, padding, and display (I'm open to other ways though):

The width at 100% and display: block set a default style that lends itself to a responsive-friendly, consistent UI with minimal maintenance. When we have inputs we want to keep smaller or inline, this would be the exception to the rule and we can style them in the example. Having labels, and especially text inputs, that are inline and different widths can be harder for the eye to scan and display arrhythmically at smaller widths, like StackBlitz. The 100% width and padding create a larger target area for touch and pointers. In this most recent commit, I've changed the selector to be more specific with input[type="text"] so as not to break checkboxes, etc.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am asking about the display: block style specifically. Does it make any difference?
(AFAICT, it does not, since box-sizing: border-box and width: 100% should be enough. But maybe I am missing something.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Aha I see! Removed. I wasn't noticing the redundancy. Thanks!

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@kapunahelewong
kapunahelewong requested a review from gkalpak March 22, 2021 17:55

@gkalpak gkalpak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

BTW, are there any styles from specific examples that could be removed now that these styles are in the common stylesheet?

@kapunahelewong

Copy link
Copy Markdown
Contributor Author

LGTM 👍

BTW, are there any styles from specific examples that could be removed now that these styles are in the common stylesheet?

Yes, and that's part of my clean up in the accessibility pass. I don't know them off the top of my head, but am keeping a look out as I work through. Thanks so much for all your help here, @gkalpak!!

@kapunahelewong kapunahelewong added the action: merge The PR is ready for merge by the caretaker label Mar 22, 2021
TeriGlover pushed a commit to TeriGlover/angular that referenced this pull request Apr 5, 2021
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Apr 23, 2021
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 effort1: hours risk: low target: patch This PR is targeted for the next patch release type: bug/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants