Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="padding-md">
  <div class="container max-width-adaptive-sm">
    <div class="text-component line-height-md">
      <h1>Take CodyFrame for a spin!</h1>
      <p>CodyFrame is a lightweight front-end framework for building accessible, bespoke interfaces.</p>
      <p>By the CodyHouse folks.</p>


                // 🐞 CodyFrame template
// 📝 Docs:
// 📦 Download:

// --------------------------------

// Mixins

// --------------------------------

// edit font rendering -> tip: use for light text on dark backgrounds
@mixin fontSmooth {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

// reset user agent style
@mixin reset {
  background-color: transparent;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  line-height: inherit;
  appearance: none;

/// color functions

// define HSL color variable
@mixin defineColorHSL($color, $hue, $saturation, $lightness){
  #{$color}: unquote("hsl(#{$hue}, #{$saturation}, #{$lightness})");#{$color}-h: #{$hue};#{$color}-s: #{$saturation};#{$color}-l: #{$lightness};

// return color with different opacity value
@function alpha($color, $opacity){
  $color: str-replace($color, 'var(');
  $color: str-replace($color, ')');
  $color-h: var(#{$color+'-h'});
  $color-s: var(#{$color+'-s'});
  $color-l: var(#{$color+'-l'});
  @return hsla($color-h, $color-s, $color-l, $opacity);

// return color with different lightness value
@function lightness($color, $lightnessMultiplier){
  $color: str-replace($color, 'var(');
  $color: str-replace($color, ')');
  $color-h: var(#{$color+'-h'});
  $color-s: var(#{$color+'-s'});
  $color-l: var(#{$color+'-l'});
  @return hsl($color-h, $color-s, calc(#{$color-l} * #{$lightnessMultiplier}));

// replace substring with another string
// credits:
@function str-replace($string, $search, $replace: '') {
  $index: str-index($string, $search);
  @if $index {
    @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
  @return $string;

/// Edit Units
@mixin spaceUnit($space-unit) { // edit the space unit on a component level
  --space-unit:  #{$space-unit};
  --space-xxxxs: calc(0.125 * #{$space-unit});
  --space-xxxs:  calc(0.25 * #{$space-unit});
  --space-xxs:   calc(0.375 * #{$space-unit});
  --space-xs:    calc(0.5 * #{$space-unit});
  --space-sm:    calc(0.75 * #{$space-unit});
  --space-md:    calc(1.25 * #{$space-unit});
  --space-lg:    calc(2 * #{$space-unit});
  --space-xl:    calc(3.25 * #{$space-unit});
  --space-xxl:   calc(5.25 * #{$space-unit});
  --space-xxxl:  calc(8.5 * #{$space-unit});
  --space-xxxxl: calc(13.75 * #{$space-unit});
  --component-padding: var(--space-md);

@mixin textUnit($text-unit, $text-scale-ratio: 1.2) { // edit the text unit and the type scale on a component level
  --text-xs: calc((#{$text-unit} / #{$text-scale-ratio}) / #{$text-scale-ratio});
  --text-sm: calc(var(--text-xs) * #{$text-scale-ratio});
  --text-md: calc(var(--text-sm) * #{$text-scale-ratio} * #{$text-scale-ratio});
  --text-lg: calc(var(--text-md) * #{$text-scale-ratio});
  --text-xl: calc(var(--text-lg) * #{$text-scale-ratio});
  --text-xxl: calc(var(--text-xl) * #{$text-scale-ratio});
  --text-xxxl: calc(var(--text-xxl) * #{$text-scale-ratio});
  --text-xxxxl: calc(var(--text-xxxl) * #{$text-scale-ratio});
  font-size: $text-unit;

// visibility
@mixin srHide {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);

@mixin srShow {
  position: static;
  clip: auto;
  clip-path: none;

// --------------------------------

// Breakpoints

// --------------------------------

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

@mixin breakpoint($breakpoint, $logic: false) {
  @if( $logic ) {
    @media #{$logic} and (min-width: map-get($map: $breakpoints, $key: $breakpoint)) { @content; }
  } @else {
    @media (min-width: map-get($map: $breakpoints, $key: $breakpoint)) { @content; }