question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove the buttonSpacer used to add margin between components

See original GitHub issue

Describe the bug We have a component called buttonSpacer and its propose is to add margin between components. We can remove the need for it and use CSS to add the margin.

https://github.com/Sboonny/freeCodeCamp/blob/1f0070630a101d87a6f3b483b8cdb3173dbb155d/client/src/components/helpers/button-spacer.tsx#L1-L10?plain=1

Usually, I try to think of a reason for it, but the only thing that I can come up with is, this is a relic of the past, and we don’t need it anymore.

If there are special cases in which margin needs to be added, CSS selectors can handle that. And if it’s there a need for consistency between spacing, adding a gap to its parent component should do the trick, as well.


Here is how it looks without the buttonSpacer, here is the page https://www.freecodecamp.org/settings

With the buttonSpacer

image

Without the buttonSpacer

image

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dinesh-14commented, Dec 23, 2022

Let me know once you open.

1reaction
Sboonnycommented, Dec 23, 2022

I have did the check, to be honest I don’t want to open it in holiday season, while other maintainers taken time off for holiday @dinesh-14

Read more comments on GitHub >

github_iconTop Results From Across the Web

Still space between elements (buttons) with "margin: 0"?
The space is caused by the newline and indentation between the two internal divs. Removing the white space will bring the two closer....
Read more >
Spacing in CSS - Ahmad Shadeed
A spacer that creates an auto spacing between the header logo and navigation. You might think that making this with CSS is fairly...
Read more >
How to Add or Remove Blank Space Between WordPress ...
To remove or add blank space between your blocks, simply click the 'Spacings' option and then scroll down to the 'Margin-Bottom' section. Here ......
Read more >
Edit spacing (margin and padding) - PageFly Manual
In this article, you will learn how to control the spacing between elements with margin and padding. This guide you how to edit...
Read more >
Spacing - Bootstrap
Assign responsive-friendly margin or padding values to an element or a subset of its sides with shorthand classes. Includes support for individual ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found