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

              
                <ol class="timeline">
	<li class="timeline-item">
		<span class="timeline-item-icon | avatar-icon">
			<i class="avatar">
				<img src="https://assets.codepen.io/285131/hat-man.png" />
			</i>
		</span>
		<div class="new-comment">
			<input type="text" placeholder="Add a comment..." />
		</div>
	</li>
	<li class="timeline-item">
		<span class="timeline-item-icon | faded-icon">
			<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
				<path fill="none" d="M0 0h24v24H0z" />
				<path fill="currentColor" d="M12.9 6.858l4.242 4.243L7.242 21H3v-4.243l9.9-9.9zm1.414-1.414l2.121-2.122a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414l-2.122 2.121-4.242-4.242z" />
			</svg>
		</span>
		<div class="timeline-item-description">
			<i class="avatar | small">
				<img src="https://assets.codepen.io/285131/winking-girl.png" />
			</i>
			<span><a href="#">Luna Bonifacio</a> has changed <a href="#">2 attributes</a> on <time datetime="21-01-2021">Jan 21, 2021</time></span>
		</div>
	</li>
	<li class="timeline-item">
		<span class="timeline-item-icon | faded-icon">
			<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
				<path fill="none" d="M0 0h24v24H0z" />
				<path fill="currentColor" d="M12 13H4v-2h8V4l8 8-8 8z" />
			</svg>
		</span>
		<div class="timeline-item-description">
			<i class="avatar | small">
				<img src="https://assets.codepen.io/285131/hat-man.png" />
			</i>
			<span><a href="#">Yoan Almedia</a> moved <a href="#">Eric Lubin</a> to <a href="#">πŸ“š Technical Test</a> on <time datetime="20-01-2021">Jan 20, 2021</time></span>
		</div>
	</li>
	<li class="timeline-item | extra-space">
		<span class="timeline-item-icon | filled-icon">
			<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
				<path fill="none" d="M0 0h24v24H0z" />
				<path fill="currentColor" d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zM7 10v2h2v-2H7zm4 0v2h2v-2h-2zm4 0v2h2v-2h-2z" />
			</svg>
		</span>
		<div class="timeline-item-wrapper">
			<div class="timeline-item-description">
				<i class="avatar | small">
					<img src="https://assets.codepen.io/285131/hat-man.png" />
				</i>
				<span><a href="#">Yoan Almedia</a> commented on <time datetime="20-01-2021">Jan 20, 2021</time></span>
			</div>
			<div class="comment">
				<p>I've sent him the assignment we discussed recently, he is coming back to us this week. Regarding to our last call, I really enjoyed talking to him and so far he has the profile we are looking for. Can't wait to see his technical test, I'll keep you posted and we'll debrief it all together!😊</p>
				<button class="button">πŸ‘ 2</button>
				<button class="button | square">
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
						<path fill="none" d="M0 0h24v24H0z" />
						<path fill="currentColor" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zM7 12a5 5 0 0 0 10 0h-2a3 3 0 0 1-6 0H7z" />
					</svg>
				</button>
			</div>
			<button class="show-replies">
				<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-forward" width="44" height="44" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
					<path stroke="none" d="M0 0h24v24H0z" fill="none" />
					<path d="M15 11l4 4l-4 4m4 -4h-11a4 4 0 0 1 0 -8h1" />
				</svg>
				Show 3 replies
				<span class="avatar-list">
					<i class="avatar | small">
						<img src="https://assets.codepen.io/285131/hat-man.png" />
					</i>
					<i class="avatar | small">
						<img src="https://assets.codepen.io/285131/winking-girl.png" />
					</i> <i class="avatar | small">
						<img src="https://assets.codepen.io/285131/smiling-girl.png" />
					</i>
				</span>
			</button>
	</li>
</ol>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap");

*,
*:before,
*:after {
	box-sizing: border-box;
}

:root {
	--c-grey-100: #f4f6f8;
	--c-grey-200: #e3e3e3;
	--c-grey-300: #b2b2b2;
	--c-grey-400: #7b7b7b;
	--c-grey-500: #3d3d3d;

	--c-blue-500: #688afd;
}

/* Some basic CSS overrides */
body {
	line-height: 1.5;
	min-height: 100vh;
	font-family: "Outfit", sans-serif;
	padding-top: 20vh;
	padding-bottom: 20vh;
}

button,
input,
select,
textarea {
	font: inherit;
}

a {
	color: inherit;
}
img {
	display: block;
	max-width: 100%;
}
/* End basic CSS override */

.timeline {
	width: 85%;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
	display: flex;
	flex-direction: column;
	padding: 32px 0 32px 32px;
	border-left: 2px solid var(--c-grey-200);
	font-size: 1.125rem;
}

.timeline-item {
	display: flex;
	gap: 24px;
	& + * {
		margin-top: 24px;
	}
	& + .extra-space {
		margin-top: 48px;
	}
}

.new-comment {
	width: 100%;
	input {
		border: 1px solid var(--c-grey-200);
		border-radius: 6px;
		height: 48px;
		padding: 0 16px;
		width: 100%;
		&::placeholder {
			color: var(--c-grey-300);
		}

		&:focus {
			border-color: var(--c-grey-300);
			outline: 0; // Don't actually do this
			box-shadow: 0 0 0 4px var(--c-grey-100);
		}
	}
}

.timeline-item-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	margin-left: -52px;
	flex-shrink: 0;
	overflow: hidden;
	box-shadow: 0 0 0 6px #fff;
	svg {
		width: 20px;
		height: 20px;
	}

	&.faded-icon {
		background-color: var(--c-grey-100);
		color: var(--c-grey-400);
	}

	&.filled-icon {
		background-color: var(--c-blue-500);
		color: #fff;
	}
}

.timeline-item-description {
	display: flex;
	padding-top: 6px;
	gap: 8px;
	color: var(--c-grey-400);

	img {
		flex-shrink: 0;
	}
	a {
		color: var(--c-grey-500);
		font-weight: 500;
		text-decoration: none;
		&:hover,
		&:focus {
			outline: 0; // Don't actually do this
			color: var(--c-blue-500);
		}
	}
}

.avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	&.small {
		width: 28px;
		height: 28px;
	}

	img {
		object-fit: cover;
	}
}

.comment {
	margin-top: 12px;
	color: var(--c-grey-500);
	border: 1px solid var(--c-grey-200);
	box-shadow: 0 4px 4px 0 var(--c-grey-100);
	border-radius: 6px;
	padding: 16px;
	font-size: 1rem;
}

.button {
	border: 0;
	padding: 0;
	display: inline-flex;
	vertical-align: middle;
	margin-right: 4px;
	margin-top: 12px;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	height: 32px;
	padding: 0 8px;
	background-color: var(--c-grey-100);
	flex-shrink: 0;
	cursor: pointer;
	border-radius: 99em;

	&:hover {
		background-color: var(--c-grey-200);
	}

	&.square {
		border-radius: 50%;
		color: var(--c-grey-400);
		width: 32px;
		height: 32px;
		padding: 0;
		svg {
			width: 24px;
			height: 24px;
		}

		&:hover {
			background-color: var(--c-grey-200);
			color: var(--c-grey-500);
		}
	}
}

.show-replies {
	color: var(--c-grey-300);
	background-color: transparent;
	border: 0;
	padding: 0;
	margin-top: 16px;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 1rem;
	cursor: pointer;
	svg {
		flex-shrink: 0;
		width: 24px;
		height: 24px;
	}

	&:hover,
	&:focus {
		color: var(--c-grey-500);
	}
}

.avatar-list {
	display: flex;
	align-items: center;
	& > * {
		position: relative;
		box-shadow: 0 0 0 2px #fff;
		margin-right: -8px;
	}
}

              
            
!

JS

              
                // Nope. CSS is powerful.

              
            
!
999px

Console