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

              
                <div class="section section--primary">
	<div class="section__content">
		<div class="panel">
			<div class="panel__title">Our bold component title text</div>
			<div class="panel__text">
				Some pretty awesome body text for our component.
				Lorem ipsum dolor amet n' stuff. And again some lorem ipsum dolor amet.
				Your know...
			</div>

			<ul class="link-list link-list--small">
				<li class="link-list__item">
					<a class="link-list__link" href="#">
						Some pretty awesome link text for our list entry
					</a>
				</li>
				<li class="link-list__item">
					<a class="link-list__link" href="#">
						Another awesome link text for our list entry
					</a>
				</li>
			</ul>

			<a class="panel__button button" href="#">
				<span class="button__icon">&rarr;</span>
				Click me
			</a>
		</div>
	</div>
</div>

<div class="section">
	<div class="section__content">
		<div class="link-list">
			<div class="link-list__title">Our bold link list title!</div>
			<ul class="link-list__list">
				<li class="link-list__item">
					<a class="link-list__link" href="#">
						Some pretty awesome link text for our list entry
					</a>
				</li>
				<li class="link-list__item">
					<a class="link-list__link" href="#">
						Another awesome link text for our list entry
					</a>
				</li>
			</ul>
													 

			<a class="link-list__button button button--primary button--large" href="#">
				<span class="button__icon">&rarr;</span>
				Click me
			</a>
		</div>
	</div>
</div>







<!-- ONLY FOR REFERENCE: -->
<hr style="margin-block-start: 300px;">
<div style="max-inline-size: 400px; margin-inline: auto;">
	<h2>Wireframe reference:</h2>
	<img src="https://i.postimg.cc/tT2LhkSp/Article-mit-Kontext-Und-List-Headline.png" alt="Final Wireframe" style="box-shadow: 0 0 1em black; margin-block-end: 1em;">
	<img src="https://i.postimg.cc/tgBW3VjF/Article-mit-Kontext.png" alt="Wireframe showing a card component in the context of more components" style="box-shadow: 0 0 1em black; margin-block-end: 1em;">
	<img src="https://i.postimg.cc/c4zXB0Hs/Article-mit-Liste.png" alt="Wireframe showing a card component variant list" style="box-shadow: 0 0 1em black; margin-block-end: 1em;">
	<img src="https://i.postimg.cc/y8Snftg0/Article-Variante.png" alt="Wireframe showing a  card component variant with green background" style="box-shadow: 0 0 1em black; margin-block-end: 1em;">
	<img src="https://i.postimg.cc/HLDzFzXR/Article.png" alt="Wireframe showing a simple card component with title, text and button" style="box-shadow: 0 0 1em black; margin-block-end: 1em;">
</div>
              
            
!

CSS

              
                :root {
	--color-primary: Blue;
}

/* --------------------------------------  PANEL */

.panel {
	--color-bg: White;
	
	display: grid;
	padding: 2rem;
	max-inline-size: 70ch; /* width */
	background-color: var(--color-bg);
	box-shadow: 0 0 1em rgba(0, 0, 0, 20%);
	border-radius: 0.25em;
}

.panel__title {
	font-size: 2rem;
	font-weight: bold;
	line-height: 1.2em;
	margin-block-end: 1.75rem;
}

.panel__text {
}

.panel--highlighted {
	--color-bg: darkseagreen;
}

/* --------------------------------------  BUTTON */

.button {
	--color-bg: white;
	--color-text: currentcolor;
	--color-outline: currentcolor;
	--color-icon: var(--color-text);

	font-size: 1.5em;
	padding: 0.75em;
	color: var(--color-text);
	background-color: var(--color-bg);
	display: inline-block;
	justify-self: end;
	margin-block-end: 1rem;
	box-shadow: 0 0 0.5em rgba(0, 0, 0, 33%);
	border-radius: 2em;

	&:hover {
		outline: 5px solid var(--color-outline, currentcolor);
		box-shadow: none;
		transition: all 0.25s;
	}
}

.button__icon {
	border: 0.135em solid var(--color-icon, currentcolor);
	color: var(--color-icon, currentcolor);
	display: inline-block;
	line-height: 1.2em;
	inline-size: 1.5em; /* width */
	text-align: center;
	border-radius: 50%;
	margin-inline-end: 0.5em;
}

.button--primary {
	--color-text: white;
	--color-outline: var(--color-primary);
	--color-bg: var(--color-primary);
}

.button--large {
	font-size: 2rem;
}

/* --------------------------------------  LINK-LIST */

.link-list {
	font-size: 1.5rem;
}

.link-list__title {
	font-size: 2rem;
	font-weight: bold;
	line-height: 1.2em;
	margin-block-end: 1.75rem;
}

.link-list__list {
	list-style-position: inside;
	padding-inline: 0;
}

.link-list__link:hover {
	border-bottom: 2px solid var(--color-primary);
	transition: all 0.5s;
}

.link-list--small {
	font-size: 1rem;
}

/* --------------------------------------  SECTION */

.section {
	--color-bg: transparent;

	padding-block: 2rem;
	color: var(--color-text);
	background-color: var(--color-bg);
}

.section__content {
	max-inline-size: max(50%, 500px);
	margin-inline: auto;
}

.section--primary {
	--color-bg: var(--color-primary);
}

              
            
!

JS

              
                
              
            
!
999px

Console