• Skip to main content
  • Skip to primary sidebar

Web Development Archive

  • Archive
You are here: Home / CSS / Breakpoints in Dart SASS

Breakpoints in Dart SASS

_breakpoints.scss

@use 'sass:map';

$breakpoints: (
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px,
);

@mixin media-breakpoint-up($breakpoint) {
$size: map.get($breakpoints, $breakpoint); // Frissített szintaxis
@if $size {
@media (min-width: #{$size}) {
@content;
}
} @else {
@error "Nincs ilyen breakpont definiálva: #{$breakpoint}.";
}
}

Usage

.container {
width: 100%;

@include media-breakpoint-up(md) {
width: 80%;
}

@include media-breakpoint-up(lg) {
width: 60%;
}
}

Filed Under: CSS Tagged With: SASS

About Gabor Flamich

I'm a web developer and designer based in Budapest, Hungary. In recent years, I've documented hundreds of solutions I came across during development. This site is an archive for useful code snippets on WordPress, Genesis Framework and WooCommerce. If You have any questions related to WordPress development, get in touch!

Primary Sidebar

  • angular.io
© 2026 WP Flames - All Right Reserved