Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

HTML

              
                .wrapper 
  .title Rate your experience
  .content We highly value your feedback! Kindly take a moment to rate your experience and provide us with your valuable feedback.
  .rate-box
     - for(var i = 0; i < 5; i++)
      input(type="radio", name="star", id="star" + i, checked=i === 2)
      label(for="star" + i, class="star")
  textarea(cols="30", rows="6", placeholder="Tell us about your experience!")
  .submit-btn Send
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Potta+One&display=swap');

@mixin flexCenter {
  display: flex;
  justify-content: center;
  align-items: center;
}

* {
  box-sizing: border-box;
}
html {
  font-size: 100vmax / 1600 * 100;
  @media (max-width: 992px) {
    font-size: 60px;
  }
}
body {
  min-height: 100vh;
  padding: 0.5rem;
  @include flexCenter;
  
  color: #222;
  font-size: 0.24rem;
  font-family: 'Space Grotesk', sans-serif;
  
  background-image: radial-gradient(farthest-side, #afc8f9 90%, #fff0), radial-gradient(farthest-side, #ddc1fb 90%, #fff0), radial-gradient(circle at 0 0, #d5e0fa, #e5d5f6);
  background-size: 7rem 7rem, 6rem 6rem, auto;
  background-position: 30% 10%, 80% 90%, 0;
  background-repeat: no-repeat;
  backdrop-filter: blur(50px);
}


$primary-color: #ffcc33;

$shadow-dark: rgba(#000, 0.3);
$shadow-light: rgba(#fff, 0.8);
$shadow-outer: 3px 3px 8px #{$shadow-dark}, -3px -3px 8px #{$shadow-light};
$shadow-inner: inset 2px 2px 8px #{$shadow-dark},
  inset -2px -2px 8px #{$shadow-light};

.wrapper {
  width: 6rem;
  padding: 0.3rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  
  border-radius: 0.25rem;
  box-shadow: 10px 10px 30px rgba(#000, 0.2);
  background-color: rgba(#fff, 0.5);
  z-index: 1;
  .title {
    font-weight: bold;
    font-size: 0.36rem;
  }
  .content {
    line-height: 1.6;
    color: #555;
  }
}

.rate-box {
  display: flex;
  flex-direction: row-reverse; // reverse the order
  gap: 0.1rem;
  input {
    display: none;
    &:hover ~ .star:before {
      color: rgba($primary-color, 0.5);
    }
    &:active +.star:before {
      transform: scale(0.9);
    }
    &:checked ~ .star:before {
      color: $primary-color;
      text-shadow: $shadow-outer;
    }
  }
  .star:before {
    content: '\2605';
    display: inline-block;
    font-family: 'Potta One', cursive;
    font-size: 0.6rem;
    cursor: pointer;
    color: #0000;
    text-shadow: 2px 2px 3px rgba(#fff, 0.5);
    background-color: #aaa;
    background-clip: text;
    -webkit-background-clip: text;
    transition: all 0.3s;
  }
}

textarea {
  border: none;
  resize: none;
  width: 100%;
  padding: 0.2rem;
  
  color: inherit;
  font-family: inherit;
  line-height: 1.5;
  
  border-radius: 0.2rem;
  box-shadow: $shadow-inner;
  background-color: rgba(#fff, 0.3);
  &::placeholder {
    color: #aaa;
  }
  &:focus {
    outline-color: $primary-color;
  }
}

.submit-btn {
  padding: 0.2rem 0.5rem;
  box-shadow: $shadow-outer;
  border-radius: 1rem;
  cursor: pointer;
  background-color: rgba($primary-color, 0.8);
  transition: all 0.2s;
  &:active {
    transform: translate(2px, 2px);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console