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

Global Context doesn't seem to switch correctly when building Desktop First #218

Open
detectivepixel opened this issue Aug 26, 2015 · 2 comments

Comments

@detectivepixel
Copy link

Using singularitygs 1.6.2

Following the documentation on the section of Responsive Grids i made the following declarations to setup my grid with Desktop First in mind.

I changed the value of the breakpoint variable to max-width as it was mentioned and mobile first to false.

$breakpoint-default-feature: 'max-width';

@include sgs-change('mobile first', false);

// Breakpoints
$tablet: 768px;
$mobile: 380px;

@include add-grid(12);
@include add-grid(4 at $tablet);
@include add-grid(2 at $mobile);

@include add-gutter(1/4);
@include add-gutter-style('opposite');

Then i added these lines of code

@include breakpoint($tablet) {
.test {
@include grid-span(4,1);
}
}

@include breakpoint($mobile) {
.test {
@include grid-span(2,1);
}
}

I was expecting both grid-spans to give me width: 100%

Only the $mobile breakpoint works.
When i checked the css file, the media query outputed for tablet was 2 columns wide and not 4 as expected.

Also

I read the documentation again and in another place it mentions the following:
Be aware this will only work with min-width media queries!

But in the Responsive Grid section it states (from what i made out) it works with both max-width and min-width media queries provided you do the mobile first switching.

I also tried an @include background-grid() but again doesn't work correctly. It outputs the media queries in the wrong order so it only displays the gradient for the tablet.

Worth mentioning is that when i used the Mobile First approach everything worked

@milkovsky
Copy link

milkovsky commented Apr 27, 2017

Looks like the issue is not yet fixed. I have the same issues.
Singularity 1.8.0

@Vagelis-Prokopiou
Copy link

Singularity will continue to work as normal, but further development will stop.

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

No branches or pull requests

4 participants