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

              
                <!-- untouched from codepen challenge "List Styles" https://codepen.io/challenges/2022/april/1 -->
<h1>Todo List</h1>
<ul>
	<li>Groceries
		<ul>
			<li>3 Tomatoes</li>
			<li>1 bunch of cherries</li>
			<li>6 onions</li>
			<li>3 heads of garlic</li>
			<li>1 bag spring mix</li>
		</ul>
	</li>
	<li>Cancel gym membership</li>
	<li>Clean gutters</li>
	<li>Take package to the post office</li>
	<li>Call Avery about Ali's party (afternoon)</li>
	<li>Sort recycling & put out trash</li>
</ul>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;900&display=swap");
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	transform-style: preserve-3d;
}
:root {
	--wood-color1: hsl(10, 50%, 30%); /*pole*/
	--wood-color2: hsl(10, 50%, 30%); /*li*/
	--wood-color3: hsl(10, 50%, 40%); /*sub li*/
	--wood-pattern-ver: url(https://i.imgur.com/xaBlaEJ.png);
	--wood-pattern-hor: url(https://i.imgur.com/e3bGQNX.png);
}
body {
	min-height: 100vh;
	display: grid;
	place-items: center;
	perspective: 1000px;
	padding: 1rem;
	background-image: url(https://images.pexels.com/photos/276299/pexels-photo-276299.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1);
	background-size: cover;
	background-position: center;
	font-family: "Lato", sans-serif;
	overflow: hidden;
}
body > ul { --count: 6; }
body > ul > li:nth-child(1) { --idx: 0; }
body > ul > li:nth-child(2) { --idx: 1; }
body > ul > li:nth-child(3) { --idx: 2; }
body > ul > li:nth-child(4) { --idx: 3; }
body > ul > li:nth-child(5) { --idx: 4; }
body > ul > li:nth-child(6) { --idx: 5; }

body > ul {
	display: grid;
	row-gap: 1rem;
	grid-template-columns: 1fr 1fr;
	list-style: none;
	padding: 2rem;
	--pole-width: 1.5rem;
	padding-bottom: 15rem;
	position: relative;
	animation: rotateList 10s linear infinite;
	text-shadow: 1px 1px 2px rgb(0 0 0 /0.5);
	user-select: none;
	cursor: default;
}

/* pole  */
body > ul::after {
	content: "";
	position: absolute;
	left: calc(50% - var(--pole-width) / 2);
	background-color: var(--wood-color1);
	background-image: linear-gradient(to right, #0009, #0000, #fff4, #0007),
		var(--wood-pattern-ver);
	background-size: 300% auto;
	background-position: 0%, 0%;
	height: 100%;
	width: var(--pole-width);
	border-radius: calc(var(--pole-width) * 0.5) calc(var(--pole-width) * 0.5)
		calc(var(--pole-width) * 0.25) calc(var(--pole-width) * 0.25);
	animation: rotateList 10s linear infinite reverse,
		backgroundShift 10s linear infinite;
}
body > ul:hover, body > ul:hover::after { animation-play-state: paused; }
@keyframes rotateList { to { transform: rotateY(-360deg); } }
@keyframes backgroundShift { to { background-position: 0%, 150%; } }

body > ul > li {
	grid-column: 2;
	position: relative;
	padding: 0.5rem 1rem;
	transform-origin: center left;
	transform: 
		rotateY(calc(360deg / var(--count) * var(--idx)))
		translateX(calc(var(--pole-width) / 2 - 1px));
	position: relative;
	width: max-content;
	max-width: 15rem;
	color: white;
}
body > ul > li:nth-child(1){
	width: unset;
}
body > ul > li::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--wood-color2);
	background-image: 
		linear-gradient(to right, #0004, #0000 1rem),
		var(--wood-pattern-hor);
	transform: translateZ(-1px);
	z-index: -1;
	border-radius: 0 100vw 100vw 0;
	box-shadow: inset 2px -2px 4px rgb(0 0 0 /0.5),
		inset -2px 2px 4px rgb(255 255 255 /0.2);
}

body > ul > li > ul {
	--spacing: 0.25rem;
	--inset-inline: 1rem;
	position: absolute;
	top: calc(100% + var(--spacing));
	left: var(--inset-inline);
	right: calc(var(--inset-inline) * 2);
	list-style: none;
	display: grid;
	gap: var(--spacing);
}

body > ul > li > ul > li {
	padding: 0.5rem 1rem;
	position: relative;
	color: white;
}

body > ul > li > ul > li::before {
	content: "";
	position: absolute;
	height: var(--spacing);
	inset-inline: 1rem;
	bottom: 100%;
	background-image: linear-gradient(
		to right,
		#000 0.25rem,
		#0000 0.25rem calc(100% - 0.25rem),
		#000 calc(100% - 0.25rem)
	);
}
body > ul > li > ul > li::after {
	content: "";
	position: absolute;
	inset: 0;
	transform: translateZ(-1px);
	background-color: var(--wood-color3);
	background-image: linear-gradient(to right, #0004, #0000 1rem),
		var(--wood-pattern-hor);
	z-index: -1;
	border-radius: 0.25rem;
	box-shadow: inset 1px -1px 2px rgb(0 0 0 /0.5),
		inset -1px 1px 2px rgb(255 255 255 /0.2);
}
h1 {
	position: absolute;
	top: 1rem;
	text-transform: uppercase;
	font-weight: 700;
	transform: translateZ(-5px);
}
              
            
!

JS

              
                
              
            
!
999px

Console