🎉 Black Friday deal! 25% off your first year of CodyHouse Pro →

Projects

Progress value is 30%

Breakpoints

Breakpoint options in CodyFrame.


🔍 On this page:

  1. Breakpoints list
  2. How to use the breakpoint mixin
  3. How to edit the breakpoints

Breakpoints List #

Here's the list of the default breakpoints:

$breakpoints: (
  xs: 32rem, // ~512px
  sm: 48rem, // ~768px
  md: 64rem, // ~1024px
  lg: 80rem, // ~1280px
  xl: 90rem  // ~1440px
);

CodyFrame is mobile first, so the breakpoint mixin targets only the min-width of the viewport.

How to use the breakpoint mixin #

Here's an example of how to use the mixin to add a media query:

@include breakpoint(md) {
    /* your code here */
}

Which outputs in CSS:

@media (min-width: 64rem) {
  /* your code here */
}

If you need to use more advanced media queries, you can pass an additional $logic argument to the mixin as well. For example:

@include breakpoint(sm, "not all") {
  /* your code here */
}

 This will be converted to:

@media not all and (min-width: 32rem) {
  /* your code here */
}

How to edit the breakpoints #

To edit the default breakpoints, copy the $breakpoints SASS map (removing the !default flag) and import your custom breakpoints before the 'base' and 'custom-style' files of the framework.

$breakpoints: (
  xs: 32rem,
  sm: 48rem,
  md: 64rem,
  lg: 80rem,
  xl: 90rem
);

@import 'base';
@import 'custom-style';

✅ Project duplicated

✅ Project created

There was an error while trying to export your project. Please try again or contact us