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

              
                <body>
	<div class="notepad">
		<div class="list-wrapper">
			<div class="list-header">
				<h1>TO-DO LIST:</h1>
			</div>
			<div class="list-items">
				<li class="li-item" id="li-1"><input onclick="strikeGroceries()" type="checkbox" class="list-cb" id="list-cb-1"><span>Groceries</span></li>
				<li class="li-item" id="li-2"><input onclick="strikeClean()" type="checkbox" class="list-cb" id="list-cb-2"><span>Clean gutters</span></li>
				<li class="li-item" id="li-3"><input onclick="strikePoffice()" type="checkbox" class="list-cb" id="list-cb-3"><span>Post office</span></li>
				<li class="li-item" id="li-4"><input onclick="strikeAvery()" type="checkbox" class="list-cb" id="list-cb-4"><span>Call Avery</span></li>
				<li class="li-item" id="li-5"><input onclick="strikeSort()" type="checkbox" class="list-cb" id="list-cb-5"><span>Sort recycling</span> </li>
				<li class="li-item" id="li-6"><input onclick="strikeTrash()" type="checkbox" class="list-cb" id="list-cb-6"> <span>Put out trash</span></li>

			</div>
		</div>
	</div>
</body>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Codystar&family=Life+Savers:wght@400;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Grape+Nuts&display=swap");

:root {
	/*Color Variables */

	$dark-purple: hsla(248, 31%, 23%, 1);
	$pink: hsla(331, 61%, 84%, 1);
	$lilac: hsla(290, 29%, 68%, 1);
	$purple: hsla(263, 44%, 57%, 1);
	$dark-grey: hsla(225, 16%, 35%, 1);
	$light-grey: hsla(224, 12%, 68%, 1);
	$light-grey-5: hsla(224, 12%, 68%, 0.5);

	$black: $dark-purple;
	$white: hsla(328, 61%, 98%, 1);

	$notepad-border: #000;
	$notepad-bg: $white;
	$list-item-border: $light-grey-5;
	$header-border: $lilac;
	$text-bg-default: $lilac;
	$text-bg-strike: $light-grey;
	$notepad-back: $dark-purple;
	$header-color: $pink;
	$header-bg: $purple;
	$list-color: $dark-purple;

	/*Text variables*/
	$header-ff: "Life Savers", sans-serif;
	$list-ff: "Grape Nuts", sans-serif;
	/* Shadows and gradients */

	$gradient-bg: linear-gradient(
		90deg,
		hsla(216, 96%, 56%, 1) 0%,
		hsla(178, 64%, 65%, 1) 100%
	);
	$gradient-list-stack: linear-gradient(
		90deg,
		$white 10%,
		$black 11%,
		$white 12%,
		$white 22%,
		$black 23%,
		$white 24%,
		$white 100%
	);

	$notepad-shadow: -2px 2px 0px 0px $black, -4px 4px 0px 0px $white,
		-6px 6px 0px 0px $black, -8px 8px 0px 0px $white, -10px 10px 0px 0px $black,
		-8px 18px 0px 8px $notepad-back;

	/*Size Variables */
	$notepad-width: 300px;
	$notepad-height: 430px;
	$li-height: $notepad-height / 11;
	$header-height: $notepad-height / 8;

	body {
		height: 100vh;
		overflow: clip;
		display: grid;
		place-items: center;
		background: $gradient-bg;
		.notepad {
			background-color: $notepad-bg;
			margin: auto;
			padding: 2rem;
			height: $notepad-height;
			width: $notepad-width;
			border: 1px solid $notepad-border;
			display: grid;
			place-content: center;
			box-shadow: $notepad-shadow;
			border-radius: 6px 6px 10px 10px;
			transform: skew(5deg);
			.list-wrapper {
				height: $notepad-height;
				width: $notepad-width;
				padding: 1rem;
				border: 1px solid $notepad-border;
				display: grid;
				grid-template-rows: auto auto;
				grid-row-gap: 20px;
				grid-template-columns: auto;
				align-content: start;
				border-radius: 10px;
				.list-header {
					border-color: $header-border;
					border-style: double;
					border-width: 8px;
					margin: auto;
					height: $header-height;
					text-align: center;
					border-radius: 8px;
					background-color: $header-bg;
					display: grid;
					align-content: center;
					padding: 0.5rem 2rem;
					h1 {
						font-size: 2rem;
						font-weight: 800;
						font-family: $header-ff;
						color: $header-color;
						border-color: $header-border;
						border-style: dotted;
						border-radius: inherit;
						border-width: 3px;
						padding: 0.25rem 0.5rem;
					}
				}
				.list-items {
					background-color: $notepad-bg;
					display: grid;
					grid-template-rows: repeat(6, $li-height);
					grid-template-columns: 100%;
					width: $notepad-width;
					grid-row-gap: 10px;
					align-content: space-between;

					.li-item {
						height: $li-height;
						margin: auto;
						width: 100%;
						list-style: none;
						display: grid;
						justify-content: space-between;
						grid-template-columns: 10% 85%;
						grid-template-rows: 100%;
						align-items: center;
						border: 1px solid $list-item-border;
						.list-cb {
							height: 25px;
							width: 30px;
							margin-left: 5px;
						}
						span {
							padding: 0.5rem;
							align-self: center;
							font-family: $list-ff;
							font-size: 1.5rem;
							color: $list-color;
						}
					}
					.striked-item {
						background-color: $text-bg-strike;
						span {
							text-decoration-line: line-through;
						}
					}
				}
			}
		}
	}
}

              
            
!

JS

              
                function strikeGroceries() {
	var groceries = document.getElementById("li-1");
	groceries.classList.toggle("striked-item");
}

function strikeClean() {
	var clean = document.getElementById("li-2");
	clean.classList.toggle("striked-item");
}

function strikePoffice() {
	var poffice = document.getElementById("li-3");
	poffice.classList.toggle("striked-item");
}

function strikeAvery() {
	var avery = document.getElementById("li-4");
	avery.classList.toggle("striked-item");
}

function strikeSort() {
	var sortrec = document.getElementById("li-5");
	sortrec.classList.toggle("striked-item");
}

function strikeTrash() {
	var trash = document.getElementById("li-6");
	trash.classList.toggle("striked-item");
}

              
            
!
999px

Console