I noticed on my phone, using this menu:
It's obvious that it exceeded the size of the row from this picture and it creates a line break during the transition, however, on desktop, it does not. It should stay in the same row during the transition:
Here is my sass:
.h5-menu { //h5 menu styling
@include span(4 inside);
@include transition(0.25s ease all);
font-weight:400; //override default 300
text-transform:uppercase;
color:$lb300;
padding:{
bottom:25px;
top:25px;
}
background-color:$lb700;
cursor:pointer;
}
.h5-selected { //css class to add when option is selected
@include span(8 inside);
background-color:$lb500!important;
color:$white!important;
}
On the parent element, I set the layout to have no gutters.
I noticed that when I remove the transition, there's no line break; however, it looks choppy, is there anyway I can make this work with a transition?
Try adding of 12
after you mention how many columns you want like...
@include span(4 of 12 inside);
If it still doesn't solve... Kindly consider preparing a codepen/jsfiddler or share the link 2 your live site ;-)
EDIT If that doesn't solve...
box-sizing
for both elements should be border-box
.Fix for subpixel issues It seems like it's a sub pixel issue... try this css...
.h5-selected {
...
margin-right: -1px;
}