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

Fix issue #12652 - Sidebar spacing #13106

Closed
wants to merge 7 commits into from
Closed

Fix issue #12652 - Sidebar spacing #13106

wants to merge 7 commits into from

Conversation

geekpulp
Copy link
Contributor

@geekpulp geekpulp commented Dec 27, 2018

Fix spacing on sidebar

Adding some spacing on the sidebar below each of the descriptions. This
corrects issue #12652

Description

  • remove margin from .components-base-control__help and created margin in .components-base-control + .components-base-control.
  • moved from px to $grid-size

How has this been tested?

Minimal testing, made the change, tried it in safari, Chrome, Firefox on MacOS

Screenshots

Types of changes

small css change that increase spacing on sidebar below description

Checklist:

  • [X ] My code is tested.
  • [ X] My code follows the WordPress code style.
  • [ X] My code follows the accessibility standards.
  • [ X] My code has proper inline documentation.
  • [ X] I've included developer documentation if appropriate.

Fix spacing on sidebar

Adding some spacing on the sidebar below each of the descriptions. This
corrects issue #12652
@@ -18,6 +18,6 @@
.components-base-control__help {
margin-top: -$grid-size;
font-style: italic;
margin-bottom: 0;
margin-bottom: 20px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR @geekpulp

I'm wondering if the best way to fix is to add a margin bottom to the help component (which may or may not be present depending on what component is used). It feels like the root issue is that there's no space between controls. So maybe the fix is more to target something like .components-base-control + .components-base-control

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Another thing is I think we're trying to make sure we use the $grid-size as a basis for all these spaces in the UI. So maybe $grid-size*2 or something?

cc @jasmussen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback. You’re right. I’ll change my approach and update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@youknowriad Ok, I've had another crack at it. Seems to have done the trick. Also updated a related stylesheet to use $grid-size.

It's quite a learning curve but this is strangely fun.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for using $grid-size! If you need to, there's also $grid-size-large, which is the same as $grid-size * 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jasmussen Cool, I'll change that then. Is there somewhere I can go to see standards like grid-size so I can proactively make changes like that? Is it something documented somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm showing my newbie skills here with Git. Sorting it.

remove margin from .components-base-control__help and created margin in .components-base-control + .components-base-control.

This should make the spacing between components in the sidebar more appealing.
Changing to $gridsize from px
@youknowriad youknowriad added this to the 4.9 milestone Jan 3, 2019
@geekpulp geekpulp closed this Jan 3, 2019
@Soean Soean mentioned this pull request Jan 4, 2019
5 tasks
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