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

Padding on last elements #184

Open
racheledelman opened this issue May 19, 2020 · 4 comments
Open

Padding on last elements #184

racheledelman opened this issue May 19, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@racheledelman
Copy link

When a paragraph or button is the last element in its div, it should have zero bottom padding. This is so that the contents of e.g. a slab can be centered horizontally.

@lkogler lkogler added the enhancement New feature or request label May 19, 2020
@racheledelman
Copy link
Author

bencalegari added a commit that referenced this issue Jun 18, 2020
[#184]
Signed-off-by: Em Barnard-Shao <ebarnard@codeforamerica.org>
@SymonneSingleton
Copy link
Contributor

The current PR adds a margin bottom to the last child. However, that is leading to the padding from labels being removed (for every text input there is one

label, which is technically the last p child, hence the removed padding). Some more investigation is needed to scope down which elements are being targeted when removing padding

@racheledelman
Copy link
Author

Discussed with @SymonneSingleton: This approach may not work with some elements with a lot of divs. For example these paragraphs in grid, should still have space between them when they're stacked on mobile.

@wschaefer
Copy link
Contributor

The first PR put:

&:last-child {
    margin-bottom: 0;
  }

on p tags and button classes. Due to the issues described above by @SymonneSingleton we're closing that PR.

To move this forward it would probably be best to pair with a designer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants