Skip to content

fix(docs-infra): typography, layout, and UI polish - #40427

Closed
gkalpak wants to merge 16 commits into
angular:masterfrom
gkalpak:pr38750
Closed

gkalpak wants to merge 16 commits into
angular:masterfrom
gkalpak:pr38750

Conversation

@gkalpak

@gkalpak gkalpak commented Jan 14, 2021 •

Copy link
Copy Markdown
Member

This PR is based on (and supercedes) #38750 (which was in turn based on #36045). It:

The PR contains the following changes (see individual commits for details):

  • [fix] Update the sidenav background to better distinguish from main content.
  • [fix] Remove uppercase style from sidenav nav-items.
  • [fix] Fix padding in sidenav and ensure all nav-items have equal height.
  • [fix] Improve heading styles.
  • [fix] Make content links more prominent on hover.
  • [fix] Improve typography styles (incl. bigger font size/line height).
  • [fix] Improve legibility and focus on content.
  • [refactor] Clean up styles in _card.scss.
  • [fix] Fix the styling of the cards in docs introduction page.
  • [refactor] Simplify the CSS rules for styling the "collapsed/expanded" sidenav icons.
  • [refactor] Remove unused styles for .heading CSS class.

@gkalpak gkalpak added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer refactoring Issue that involves refactoring or code-cleanup comp: docs-infra target: patch This PR is targeted for the next patch release labels Jan 14, 2021
@ngbot ngbot Bot modified the milestone: Backlog Jan 14, 2021
@google-cla

This comment has been minimized.

@google-cla google-cla Bot added the cla: no label Jan 14, 2021
@gkalpak
gkalpak requested review from petebacondarwin and removed request for petebacondarwin January 14, 2021 11:09
@gkalpak gkalpak added state: WIP and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 14, 2021
@mary-poppins

Copy link
Copy Markdown

@google-cla

google-cla Bot commented Jan 14, 2021

Copy link
Copy Markdown

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@mary-poppins

Copy link
Copy Markdown

@gkalpak
gkalpak marked this pull request as ready for review January 14, 2021 14:12
@gkalpak gkalpak added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Jan 14, 2021
mhevery pushed a commit that referenced this pull request Feb 2, 2021
This commit includes some general improvements to heading styles
(font-weight, margin/padding). It also adds a horizontal separator above
`<h2>` headings to segment important sections more easily.
(As a consequence, we can remove several `<hr />` elements right before
`<h2>` headings.)

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
mhevery pushed a commit that referenced this pull request Feb 2, 2021
mhevery pushed a commit that referenced this pull request Feb 2, 2021
This commit changes the layout of the main content to improve
legibility, especially on wider screens:

- Limit main content width to 50em (800px by default).
- Center main content on the page.

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
This commit cleans up the styles in `_card.scss` by:
- Fixing incosistenct indentation/newlines.
- Removing rules for unused selectors.
- Removing unnecessary styles.

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
…ge (#40427)

This commit fixes the layout and appearance of the cards shown in the
docs introduction page (`/docs`) in the following ways:

- Center the cards.
- Ensure two cards are shown per line (instead of 3 one the first line
  and 1 on the second).
- Adjust their widths to ensure their content fits well in them
  (given that the cards have a fixed height).
- Use more engaging styles to better indicate that the cards are
  clickable (as discussed [here][1]).

[1]: #40427 (comment)

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
…ed/expanded" sidenav icons (#40427)

This commit simplifies the styling of the "collapsed/expanded" icons in
sidenav nav-items with children by consolidating the CSS rules in one
block (instead of having duplicate blocks for different levels).

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
…40427)

This commit removes some styles for the `.heading` CSS class which do
not have any effect (either because they are overridden in other rules
or because they do not make any difference).

NOTE:
The `.heading` class is kept in the HTML to make it easier to associate
the `.heading-children` element with its corresponding `.heading`
parent.

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
…from main content (#40427)

Previously, we used a box-shadow to indicate that the sidenav is
separate from the main content.

This commits updates the sidenav styling to remove the shadow and give
it a slightly different background color instead.

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
mhevery pushed a commit that referenced this pull request Feb 2, 2021
… equal height (#40427)

This commit improves the padding nav-menus and nav-items in the sidenav.
It also ensures that all nav-items have the same height, regardless of
their level and of whether they have children or not.

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
This commit includes some general improvements to heading styles
(font-weight, margin/padding). It also adds a horizontal separator above
`<h2>` headings to segment important sections more easily.
(As a consequence, we can remove several `<hr />` elements right before
`<h2>` headings.)

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
mhevery pushed a commit that referenced this pull request Feb 2, 2021
mhevery pushed a commit that referenced this pull request Feb 2, 2021
This commit changes the layout of the main content to improve
legibility, especially on wider screens:

- Limit main content width to 50em (800px by default).
- Center main content on the page.

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
This commit cleans up the styles in `_card.scss` by:
- Fixing incosistenct indentation/newlines.
- Removing rules for unused selectors.
- Removing unnecessary styles.

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
…ge (#40427)

This commit fixes the layout and appearance of the cards shown in the
docs introduction page (`/docs`) in the following ways:

- Center the cards.
- Ensure two cards are shown per line (instead of 3 one the first line
  and 1 on the second).
- Adjust their widths to ensure their content fits well in them
  (given that the cards have a fixed height).
- Use more engaging styles to better indicate that the cards are
  clickable (as discussed [here][1]).

[1]: #40427 (comment)

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
…ed/expanded" sidenav icons (#40427)

This commit simplifies the styling of the "collapsed/expanded" icons in
sidenav nav-items with children by consolidating the CSS rules in one
block (instead of having duplicate blocks for different levels).

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
…40427)

This commit removes some styles for the `.heading` CSS class which do
not have any effect (either because they are overridden in other rules
or because they do not make any difference).

NOTE:
The `.heading` class is kept in the HTML to make it easier to associate
the `.heading-children` element with its corresponding `.heading`
parent.

PR Close #40427
@mhevery mhevery closed this in 35cb39d Feb 2, 2021
mhevery pushed a commit that referenced this pull request Feb 2, 2021
mhevery pushed a commit that referenced this pull request Feb 2, 2021
… equal height (#40427)

This commit improves the padding nav-menus and nav-items in the sidenav.
It also ensures that all nav-items have the same height, regardless of
their level and of whether they have children or not.

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
This commit includes some general improvements to heading styles
(font-weight, margin/padding). It also adds a horizontal separator above
`<h2>` headings to segment important sections more easily.
(As a consequence, we can remove several `<hr />` elements right before
`<h2>` headings.)

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
mhevery pushed a commit that referenced this pull request Feb 2, 2021
mhevery pushed a commit that referenced this pull request Feb 2, 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.

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 refactoring Issue that involves refactoring or code-cleanup 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.

7 participants