Skip to content

Docs design tweaks #204

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 5 commits into from
Mar 8, 2021
Merged

Docs design tweaks #204

merged 5 commits into from
Mar 8, 2021

Conversation

aomarks
Copy link
Member

@aomarks aomarks commented Mar 8, 2021

  • Added horizontal line between h2 sections (try ?mods=docsSectionBorderBelow to see an underline instead)
  • Tweaked heading colors and font sizes
  • New syntax highlighting theme
  • Switched to Open Sans
  • Fixed bug with mod parameters affecting external links

@aomarks aomarks requested a review from justinfagnani March 8, 2021 20:35
@aomarks aomarks mentioned this pull request Mar 8, 2021
@github-actions
Copy link

github-actions bot commented Mar 8, 2021

A live preview of this PR will be available at the URL(s) below.
The latest URL will be appended to this comment on each push.
Each build usually takes around 7 minutes, and will 404 until finished.

https://pr204-f43446b---lit-dev-bvxw3ycs6q-uw.a.run.app/
https://pr204-83ee123---lit-dev-bvxw3ycs6q-uw.a.run.app/
https://pr204-970260f---lit-dev-bvxw3ycs6q-uw.a.run.app/
https://pr204-80a8b3c---lit-dev-bvxw3ycs6q-uw.a.run.app/

@aomarks aomarks force-pushed the docs-design-tweaks branch from f43446b to 83ee123 Compare March 8, 2021 20:38
@aomarks aomarks requested review from kevinpschaaf and sorvell March 8, 2021 20:41
@aomarks aomarks force-pushed the docs-design-tweaks branch from 83ee123 to 970260f Compare March 8, 2021 20:49

.CodeMirror, playground-file-editor, playground-preview {
border: 1px solid #dedede;
border-radius: 6px;
Copy link
Contributor

Choose a reason for hiding this comment

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

btw, <litdev-example> still has this style and it differs from the 5px used elsewhere. It maybe could be border-radius: inherit;?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed I think. I made it match the styles of the other code snippets, and got rid of the border around the editor (still needed for the preview)

image

@@ -3,6 +3,15 @@
* ------------------------------------ */

main {
/* Colors */
--docs-h1-underline-color: var(--color-blue);
--docs-h2-color: #384861;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the steel-blue color in the Ocupop design/logo? Maybe make it a variable next to --color-blue?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not from Ocupop, I just picked it. Not using it anywhere else yet, might change, and the h3 is a less saturated version. So not sure it deserves a proper name yet. Maybe I'll add one if we end up using it somewhere else.

@@ -32,12 +41,20 @@ article {
line-height: 1.8em;
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this line height is inheriting into code editors - I think the lines look a little tall. Could you try 1.5em for those?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, yeah but I also had some incorrect extra padding that was making the effective line height much bigger than 1.8em. Fixed, and I think 1.8em actually looks good.

* ------------------------------------ */

article li {
padding-inline: 0.5em 10%;
Copy link
Contributor

Choose a reason for hiding this comment

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

We also have article li > p elements that are getting pretty big top and bottom margins. Can we trim those a bit? Maybe even 0 (line-height would still apply):

article li > p {
  margin: 0;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Shrunk it, but not quite to zero. I think a little gap helps readability, just like you would have a gap for two adjacent paragraphs.

image


.docsSectionBorderBelow article h2 {
border-top: none !important;
padding: 1em 0 0.75em 0 !important;
Copy link
Contributor

@justinfagnani justinfagnani Mar 8, 2021

Choose a reason for hiding this comment

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

Can't tell for sure, but I might like the smaller .5 bottom padding even with the bottom border.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@aomarks aomarks merged commit 512efdf into master Mar 8, 2021
@aomarks aomarks deleted the docs-design-tweaks branch March 8, 2021 22:25
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.

2 participants