I currently have the following scss file with contents:
/* Portrait tablet to landscape and desktop */ @media (min-width: 768px) and (max-width: 979px) { // Something here } /* Desktop */ @media (min-width: 981px) and (max-width: 1198px) { // Something here } /* Large Desktop */ @media (min-width: 1200px) { // Something here }
If I load the application.css file in Rails, I get the following:
@media (min-width: 768px) and (max-width: 979px) { .navbar-fixed-top { margin-bottom: 0 !important; } body { padding-top: 0 !important; } .static_pages-controller-home .landing .sign-up { display: none; } .static_pages-controller-home .container #students #bulletpoints h2, .static_pages-controller-home .container #students #bulletpoints p { text-align: left !important; } } @media (min-width: 1200px) { .navbar-fixed-top { margin-bottom: 0 !important; } .static_pages-controller-home .container #students #bulletpoints h2 { text-align: left !important; } }
Please note that in the compiled file we have the comment /* Desktop */ , but CSS does not exist inside the media query, infact it seems that the compilation ignores the entire media query. Is there any way around this?
My goal is to have some css specific to this width range.
source share