Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              <div class="alert">
	<div class="alert-icon">
		<svg style="width:24px;height:24px" viewBox="0 0 24 24">
			<path fill="var(--color)" d="M10 3H14V14H10V3M10 21V17H14V21H10Z" />
		</svg>
	</div>

	<p class="alert-message">
		Lorem ipsum dolor, sit amet consectetur adipisicing elit. Obcaecati dignissimos natus a soluta molestias. Sequi debitis sit itaque aliquam sint!
	</p>
	<div class="spacer"></div>
	<div class="alert-dismiss">dismiss</div>
</div>
            
          
!

CSS

            
              :root,
:host,
html,
body {
	/* changing and setting default styles */
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
		Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
	
	--color:#ef5350;
}

.alert {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	margin: auto;
	width: 500px;
	height: 150px;
	background: #eee;
	display: grid;
	place-content: center;
	grid-template-columns: 100px 1fr;
	grid-template-rows: 1fr 30px;
	border-radius: 5px;
	border: 1px solid  var(--color);
	box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);

	&-icon {
		display: grid;
		margin: auto;
		place-items: center;
		place-content: center;
		border: 2px solid var(--color);
		border-radius: 50%;
		width: 30px;
		height: 30px;

		&::before {
			position: absolute;
			content: "";
			width: 50px;
			height: 50px;
			border-top: 1px solid  var(--color);
			border-bottom: 1px solid  var(--color);
			border-left: 1px solid transparent;
			border-right: 1px solid transparent;
			border-radius: 50%;
			top: 34.5px;
			left: 23.5px;
			margin: auto;
			animation: r .7s linear infinite;
			@keyframes r {
				to {
					transform: rotate(360deg);
				}
			}
		}
	}
	&-message {
		width: 90%;
		max-width: 400px;
		margin: auto;
		border-left: 2px solid  var(--color);
		padding-left: 1rem;
	}
	&-dismiss{
		display:grid;
		color: #e57373;
		text-transform: uppercase;
		font-size: 16px;
		font-weight: 900;
		letter-spacing:1px;
		place-content:center;
		cursor:pointer;
		width: 100px;
		justify-self:right;
	}
}

            
          
!

JS

            
              
            
          
!
999px

Console