Skip to content

more css tweaks #765

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 6 commits into from
Nov 4, 2024
Merged

more css tweaks #765

merged 6 commits into from
Nov 4, 2024

Conversation

Rich-Harris
Copy link
Member

@Rich-Harris Rich-Harris commented Nov 2, 2024

Tidies up a bit more CSS. This one involves actual changes:

  • tweaked the light more foreground colours a bit, to add more distance between --sk-fg-2 and --sk-fg-3. Also makes headings (--sk-fg-1) a slightly less deep black
  • fixes line height for --sk-font-body-small (it was using the same absolute line height as --sk-font-body, rather than the same relative line height. This is most visible in the sidebar on the docs)
  • uses --sk-font-ui-medium for <figcaption> elements. This feels appropriate and looks better IMHO
  • a couple of other small fixes and tweaks
  • tweaks background colours a bit. --sk-bg-2 is no longer identical to --sk-bg-1 in light mode, which means that e.g. code snippets have a subtle background (chore: light background for code snippets #707). in dark mode, there's slightly less contrast, and the darker backgrounds are desaturated a tiny bit (chore: tweak dark mode backgrounds #699)

I think this looks better but would be interested to know how others feel

Copy link

vercel bot commented Nov 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 5:25pm

@benmccann
Copy link
Member

I think this makes dark mode look nicer. Perhaps separately, I'd be curious to experiment with making the left nav darker than the main content like Vite does

In light mode, I think the right nav text doesn't have enough contrast in this PR

@Rich-Harris
Copy link
Member Author

tweaked both of those things, what do you reckon?

@dummdidumm
Copy link
Member

I like the changes mostly. Wondering if the left nav should have a bit more space between entries, basically revert to what it's like on main, just not by changing the line height back but by adding margins for that specifically. Semantically, the entries are not text but more like bullet points, and they have more spacing between them, too

@benmccann
Copy link
Member

Yeah, this look really nice

I was also wondering about the spacing in the left and right navs. It's not too bad either way and I'm not sure if I have a clear preference, but I definitely noticed that the items were closer together and think I probably preferred it with a bit more spacing

@Rich-Harris
Copy link
Member Author

I wrote this recently in response to a similar proposal about the sidebar, before I messed it up by using the main body line height instead of the body-small line height: #458 (comment)

Normally the reason to have spacing between list items is so that it's clear that the first two lines are part of a single item, then the next two, then the next three, rather than having seven lines that are only differentiable via the placement of the bullet points:

image

That doesn't really apply when there's a single line for everything. If the feeling that we should bend the line-height rules is universal then it's easy enough to do — personally I think it's a little more consistent this way and I prefer the greater information density

@Rich-Harris Rich-Harris merged commit 8d76120 into main Nov 4, 2024
5 checks passed
@Rich-Harris Rich-Harris deleted the more-css-tweaks branch November 4, 2024 20:02
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.

3 participants