Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Margin bottom on last-child #41

Open
j1mie opened this issue Apr 30, 2018 · 3 comments
Open

Margin bottom on last-child #41

j1mie opened this issue Apr 30, 2018 · 3 comments

Comments

@j1mie
Copy link

j1mie commented Apr 30, 2018

Hi there,

screen shot 2018-04-30 at 15 23 55

This selector seems to be causing some strange behaviour for elements on my site - it looks like it has a high specificity level that's overriding margins on my own components.

Wondering if you have any ideas or suggestions for this?

Cheers!

@seejamescode
Copy link
Contributor

This was a fix to solve bottom margin on the last elements in a grid messing everything up. Particularly with default margin bottom on type elements. It tends to be more helpful than destructive. However, the only workaround I know of is !important.

So if you can think of a more graceful way, let me know.

@j1mie
Copy link
Author

j1mie commented May 1, 2018

Seeing as you're now using helper classes for grid columns, as well as for the flex fallback, perhaps this fix could be added to those instead? What do you think?

@seejamescode
Copy link
Contributor

What if you use a type element as a grid child though? I think we would need to disable that child’s native margin bottom.

Can you share an example situation from your site? That may help show what we should avoid targeting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants