Search
 
SCRIPT & CODE EXAMPLE
 

CSS

scss media query

/* Using SCSS variables to store breakpoints */
$breakpoint-tablet: 768px;
@media (min-width: $breakpoint-tablet) {
  
}
Comment

media query in scss

$size__site_content_width: 1024px;

/* Media Queries */ Not necessarily correct, edit these at will 
$media_queries : (
    'mobile'    : "only screen and (max-width: 667px)",
    'tablet'    : "only screen and (min-width: 668px) and (max-width: $size__site_content_width)",
    'desktop'   : "only screen and (min-width: ($size__site_content_width + 1))",
    'retina2'   : "only screen and (-webkit-min-device-pixel-ratio: 2) and (min-resolution: 192dpi)",
    'retina3'   : "only screen and (-webkit-min-device-pixel-ratio: 3) and (min-resolution: 288dpi)",
    'landscape' : "screen and (orientation:landscape) ",    
    'portrait'  : "screen and (orientation:portrait) "
);

@mixin for_breakpoint($breakpoints) {
    $conditions : ();
    @each $breakpoint in $breakpoints {
        // If the key exists in the map
        $conditions: append(
            $conditions,
            #{inspect(map-get($media_queries, $breakpoint))},
            comma
        );
    }

    @media #{$conditions} {
        @content;
    }

}
Comment

PREVIOUS NEXT
Code Example
Css :: css grid auto row 
Css :: css noise filter 
Css :: corona.html:61 Uncaught ReferenceError: $ is not defined 
Css :: css pointer-events 
Css :: remove outline 
Css :: show arrow on hover css 
Css :: css scroll fixed content 
Css :: css clear 
Css :: crystal background css 
Css :: sass table 
Css :: remove horizontal scroll in small devices css 
Css :: sass import 
Css :: wave css 
Css :: css disabled hover none 
Css :: text background image css 
Css :: css 4 modal 
Css :: css button style rectangle 
Css :: scale textarea 
Css :: CSS line-height values 
Css :: css file path 
Css :: padding css 3 values 
Css :: rainbow text shadow animation 
Css :: text background in css 
Css :: tilt element css animation 
Css :: rgba colors 
Css :: purge tailwind css 
Css :: background color for a page in css 
Css :: enable bootstrap intellisence vs code 
Css :: django jsonfield 
Css :: operador css contain attr 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =