Reputation: 6388
I use sass for styling and I have a main sass file which has @imports of various different scss files conditionally included with media queries.
phone
all/most tablet (portrait), that behaves like the phone
@import "global";
@media only screen and (min-width: 320px){
@import "styleguide";
@import "phone";
}
@media only screen and (min-device-width: 768px)
and (orientation: portrait){
}
@media only screen and (min-device-width: 768px)
and (orientation: landscape){
@import "tablet-styleguide";
@import "tablet";
}
Upvotes: 0
Views: 365
Reputation: 6388
The issue was that instead of min-device-wdith
, I should use min-width
.
Upvotes: 0
Reputation: 6522
Try formatting your imports like this (instead of inside a media query):
@import url(foo.css) screen and (min-width:320px);
@import url(bar.css) screen and (min-device-width:768px) and (orientation:portrait);
@import url(blah.css) screen and (min-device-width:768px) and (orientation:landscape);
Upvotes: 1