Skip to content
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

Adjust margin in sidebar to center elements #202

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

darragh4
Copy link

Related Issue

(#184)

Summary of Changes

Centred the ToC by adjusting the margin of the box so that it will no longer hug the left side of the box.

Copy link

netlify bot commented Mar 30, 2025

Deploy Preview for super-tapioca-5987ce ready!

Name Link
🔨 Latest commit ce0bafb
🔍 Latest deploy log https://app.netlify.com/sites/super-tapioca-5987ce/deploys/67e99dc981325100081ffbdf
😎 Deploy Preview https://deploy-preview-202--super-tapioca-5987ce.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@thescientist13 thescientist13 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Left some feedback, in that I think we need to find a more "localized" place for this change, not a global one.

Let me know if you have any questions. 👍

@@ -133,6 +133,7 @@ h4:focus > a > span.icon {

li {
margin: var(--size-2) 0;
margin-left: 20%;
Copy link
Member

Choose a reason for hiding this comment

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

This is a global style, and so changing this here is potentially going to change <li> globally, which we can see already happening in the header
Screenshot 2025-03-31 at 2 41 00 PM

I think for this kind of change, it should be happening in the styles for the table of contents component specifically
https://github.com/ProjectEvergreen/www.greenwoodjs.dev/blob/main/src/components/table-of-contents/table-of-contents.module.css

Also, for the actual value of whatever we end up going with, we should try and use open-props styles whenever possible as that is the style library we are using in this project.


I suppose we could consider seeing if this li selector is even needed here, or if it's just for markdown content, but that's probably something to work out in a standalone issue / PR

@thescientist13 thescientist13 added docs Greenwood specific content like docs and guides enhancement New feature or request labels Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Greenwood specific content like docs and guides enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

table of contents with lengthy ordered lists has very tight left padding
2 participants