- 
      
- 
        Save cray0000/6137583 to your computer and use it in GitHub Desktop. 
| // Mobile-first approach. Usecase is to hide one of columns by default (mobile) | |
| // and show additional info on desktop (when @media is active) | |
| // !! Working version !! Original problem description is in initial commit. | |
| // @media vars: | |
| $media-desktop: min-width 769px | |
| $media-mobile: max-width 768px | |
| .page | |
| +use-grid(100% (1) hide) | |
| +container | |
| .sidebar | |
| display: none | |
| .content | |
| +span(1 omega) | |
| +breakpoint($media-desktop) | |
| +use-grid(98% (4 6) 0.1 hide) | |
| +container | |
| .sidebar | |
| display: block | |
| +span(first 1) | |
| .content | |
| +span(last 1) | 
Yup, the case was in full-width span.
+span(1) added default gutter of 1/4 which is margin-right: 25%;. And it kept this gutter in grid that overrides the default one.
So if we add omega argument: +span(1 omega) then overriding of it works properly
I think if it's possible to detect that span is taking all of the columns then making omega argument implicit may be a reasonable solution.
Of course your proposition not to float it at all and make use of default full-width of block element is much better. I'm afraid only clear: both; can help to achieve this but as you said it will be more confusing for people to explicitly do clear: none to override it. And adding clear: none into default +span() output will bloat the compiled css too much so it doesn't worth it either.
Two things strike me here:
display: none;anddisplay: block;- what "doesn't work" about that? IE6 required an inline display, but I'm not sure that's worth worrying about.Unrelated:
clear: all;could work, but may surprise people when they have to remove it somehow.