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 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


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.


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.



   p “The line-height controls the leading, which is the extra space between lines of text above and beyond the font’s size”
      span.Formula__result Computed line-height 
      span = 
      span.Formula__first Computed font-size (content area)
      span +
      span.Formula__second Leading Area
      section.Setting__prop font-size
         select(id = 'font-size-1')
            option(value="32px") 32px
            option(value="3rem") 3rem
            option(value="4rem") 4rem
            option(value="12px") 12px
            option(value="1.2em") 1.2em
            option(value="150%") 150%
      section.Setting__prop line-height
         select(id = 'line-height-1')
            option(value="48px") 48px
            option(value="1") 1
            option(value="1.4") 1.4
            option(value="normal") normal
            option(value="10px") 10px
            option(value="25vh") 25vh
      p#elem.Font__line Content Area
         span &nbsp;





:root {
   --highlight : #F89406;
   --highlight-w: #BE90D4;
   --highlight-m: #19B5FE;
   --highlight-str: #DB0A5B;
   --line-height: 48px;
   --font-size: 32px;

body {
   box-sizing: border-box;
   background-color: #F5D76E;
   font-family: 'Josefin Slab', serif;

.Formula {
   line-height: 1.4;
   &__result {
     border: 3px solid var(--highlight-m);
   &__first {
     background-color: var(--highlight)
   &__second {
      background: var(--highlight-str); 

.Setting {
   margin-bottom: 4rem;
   &__prop {
      font-size: 1rem;

.Font {
   font-size: var(--font-size);
   margin: 3rem;
   &__serif {
      font-family: 'Josefin Slab', serif;
      background-color: var(--highlight);
      display: none;
   &__line {
      background-color: var(--highlight);
      font-weight: 100;
      line-height: 1;
      position: relative;
      font-size: var(--font-size);
      margin: 0;
      padding: 0;
      & span {
         content: '\2002';
         display: inline;
         background: var(--highlight-str);
         border: 3px solid var(--highlight-m);
         line-height: var(--line-height);
         position: absolute;
         top: 50%;
         left: 50%;
         width: 100%;
         transform: translate(-50%, -50%);
         z-index: -1; 
         text-align: right;
   &__sansSerif {
      background-color: var(--highlight-w);
      font-family: 'Oswald', sans-serif;
      font-weight: 100;
      display: none;
   &__monospace {
      background-color: var(--highlight-m);
      font-family: 'Source Code Pro', monospace;
      display: none;


                let currFontsize = document.querySelector('#elem');

let currLineheight = document.querySelector('#elem span');

let fontsizeElem = document.getElementById('font-size-1');
let lineheightElem = document.getElementById('line-height-1');

let fontsize = fontsizeElem.value;
let lineheight = lineheightElem.value;

fontsizeElem.addEventListener('change', () => {"--font-size", fontsizeElem.value);

lineheightElem.addEventListener('change', () => {"--line-height",  lineheightElem.value);
// set from ui the fontsize and line height to see the differences

// get variable from inline style



// get variable from wherever