css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <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">
		<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>
              // Variables
:root {
	--background-color: #1d1c25;
	--font-size: 18px;
	--line-height: 18px;

// Global
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-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');
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................