Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Stephen Blank
16,286 PointsFoundation's show-for-small-only class disables flexbox functionality?
Using Foundation 5.4.7:
I have a container that is using flexbox for child element positioning.
When I add a Foundation visibility class, such as show-for-small-only, Foundation adds a media query with the rule display: inherit !importantl
The !important rule seems to be the issue, as removing it using chrome dev tools allows the display: flex; to work.
Is this a known issue? Is there a way I could do this better or a workaround? Am I making a basic mistake somewhere?
Example code:
#transport-container {
width: 100%;
background-color: $flesh-color;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
p {
font-size: 10vw;
color: $darker-blue-color;
}
}
<div id="transport-container" class="show-for-small-only">
<p>TRANSPORT</p>
</div>