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

mixin grid-column "$pull: false" not working? #2137

Closed
shrwnsan opened this issue Apr 6, 2013 · 3 comments
Closed

mixin grid-column "$pull: false" not working? #2137

shrwnsan opened this issue Apr 6, 2013 · 3 comments

Comments

@shrwnsan
Copy link

shrwnsan commented Apr 6, 2013

Let's say you have the following markup:

<section class="container row" role="document">
    <div role="main">lorem...</div>
</section

Before, <div role="main"> was <div role="main" class="small-12 large-6 large-offset-6 pull-6"> but I wanted more control at a larger screen size so I took the classes out. E.g. large-9 large-centered

Here's my SCSS:

div[role=main] {
    @include grid-column(
        // small-12
        $columns: 12
    );
}
@media #{$small} {
    div[role=main] {
        @include grid-column(
            $columns: 6,
            $last-column: true,
            $offset: 6,
            $pull: 6
        );
    }
}
@media only screen and (min-width: emCalc(1024px)) {
    div[role=main] {
        @include grid-column(
            $columns: 9,
            $center: true,
            $offset: false,
            $pull: false
        );
    }
}

It seems that the right: 50% style-rule from $offset: 6 ain't getting overwritten. Can anyone else replicate the behavior?

I had to add this to the last media query: right: auto;

@media only screen and (min-width: emCalc(1024px)) {
    div[role=main] {
        @include grid-column(...);
        right: auto;
    }
}

Tips greatly appreciated. TIA

@ascottmccauley
Copy link
Contributor

I have a feeling that this pull would also fix this problem: #2114

@shrwnsan
Copy link
Author

@ascottmccauley Did you get to test it? I'm currently using a Reverie (WP theme F4-based). I'm not too familiar how the author did the foundation file includes that's why. Hence, I haven't checked your solution yet.

Please do let me know if you get a chance to try the scenario on your commit. TIA

@ascottmccauley
Copy link
Contributor

@stechico yes, I've been rolling with this fix in my theme for awhile with no problems.

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

No branches or pull requests

3 participants