cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div class="container">
	<div class="row">
		<div class="top-s">
			<h1>Increase Font Size</h1>
			
			<input type="range" value="18" min="18" max="24" class="range">
		</div>
				
		<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Placeat nemo error velit, enim beatae pariatur consequatur aut sequi repudiandae illo doloremque quibusdam sunt esse quam at non culpa ratione unde aspernatur ipsam vitae quos quo voluptatem omnis. Fugiat, assumenda possimus.</p>
		
		<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae non distinctio deleniti magnam velit nostrum optio reprehenderit assumenda quo voluptate eum consequuntur quas corporis, id labore? Quaerat libero qui deleniti consequatur numquam praesentium provident vitae explicabo voluptates eum recusandae, itaque neque consectetur omnis iste nostrum maiores dolorum facilis. Non, quisquam!</p>
	</div>
</div>
            
          
!
            
              // Variables
:root {
	--background-color: #1d1c25;
	--font-size: 18px;
	--line-height: 18px;
}

// Global
html, 
body {
	height: 100%;
	margin: 0; padding: 0;
	font-family: 'Lato', sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background-color: var(--background-color);
}


// Grid
.container {
  display: grid;
  grid-template-columns: auto;	
  padding-top: 60px;
	padding-bottom: 60px;
}

.row {
	width: 700px;
  align-self: center;
  justify-self: center;
  padding: 20px;
	
	// 	Top Section
	.top-s {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	
	// Title
	h1 {
		background: linear-gradient(45deg, rgba(59,173,227,1) 0%, 
																			 rgba(87,111,230,1) 25%, 
																			 rgba(152,68,183,1) 51%, 
																			 rgba(255,53,127,1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
	}
	
	// 	Text
	p {	
		margin-bottom: 50px;
		color: #fff;
		line-height: calc(var(--line-height) * 1.5);
		font-size: var(--font-size);
	}
}

// Range Input Customization
input[type="range"] {
  -webkit-appearance: none;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  width: 200px;
  height: 20px;
  margin: 0;
  border: none;
  padding: 1px 2px;
  border-radius: 14px;
  background: #131319;
  outline: none;
	
  &::-moz-range-track {
    border: inherit;
    background: transparent;
  }
  
	&::-ms-track {
    border: inherit;
    color: transparent;
    background: transparent;
  }
  
	&::-ms-fill-lower, 
	&::-ms-fill-upper {
    background: transparent;
  }
  
	&::-ms-tooltip {
    display: none;
  }
  
	&::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 40px;
    height: 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(45deg, rgba(59, 173, 227, 1) 0%, 
																			 rgba(87, 111, 230, 1) 25%, 
																			 rgba(152, 68, 183, 1) 51%, 
																			 rgba(255, 53, 127, 1) 100%);
  }
  
	&::-moz-range-thumb {
    width: 40px;
    height: 18px;
    border: none;
    border-radius: 12px;
    background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%);
  }
  
	&::-ms-thumb {
    width: 40px;
    height: 18px;
    border-radius: 12px;
    border: 0;
    background-image: linear-gradient(to bottom, #529de1 0, #245e8f 100%);
  }
}
            
          
!
            
              const range 		 = document.querySelector('.range');
const root 			 = document.querySelector(':root');
const rootStyles = getComputedStyle(root);

range.addEventListener('input', function() {
	
	root.style.setProperty('--font-size', this.value + 'px');
	root.style.setProperty('--line-height', this.value + 'px');
	
});
            
          
!
999px
Loading ..................

Console