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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

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

              
                <h1>Safari 13.1 (macOS) / Mobile Safari 13.4 (iOS 13.4) backdrop-filter rendering bug demo</h1>
<p>Adding box-shadow to an element that has backdrop-filter will produce an offset of visible blurred background by blur radius size set in box-shadow property.</p>
<p>Relevant issue in webkit bug tracker: <a href="https://bugs.webkit.org/show_bug.cgi?id=163206">https://bugs.webkit.org/show_bug.cgi?id=163206</a>
<br>

<div class="row">
	
	<div class="container">
		<div class="overlay blur-background">
			<p>
				-webkit-backdrop-filter: blur(10px)<br>
				without box-shadow
			</p>
		</div>
	</div>
	
	<div class="container">
		<div class="overlay blur-background shadow">
			<p>
				-webkit-backdrop-filter: blur(10px)<br>
				with box-shadow (20px blur radius)
			</p>
		</div>
	</div>
	
	
	<div class="container">
		<div class="overlay blur-background shadow-40">
			<p>
				-webkit-backdrop-filter: blur(10px)<br>
				with box-shadow (40px blur radius)
			</p>
		</div>
	</div>

</div>

<p>As long as you don't include backdrop-filter and box-shadow on the same element at same time it's seemingly fine...</p>

<div class="row">
	
	<div class="container">
		<div class="overlay shadow">
			<div class="inner blur-background">
				<p>
					-webkit-backdrop-filter: blur(10px)<br>
					with box-shadow (separate element as workaround)
				</p>
			</div>
		</div>
	</div>
</div>

<p>Until you have any child element that has box-shadow then things will start looking weird again.</p>

<div class="row">
	<div class="container">
		<div class="overlay blur-background">
			<p>
				-webkit-backdrop-filter: blur(10px)<br>
				without box-shadow
			</p>
			<div class="floating-element">
				Inner element with box-shadow
			</div>
		</div>
	</div>
</div>

<p>Blur is not the culprit here because any other backdrop-filter value will produce the same issue. For example, invert() :</p>


<div class="row">
	
	<div class="container">
		<div class="overlay invert-background">
			<p>
				-webkit-backdrop-filter: invert(2)<br>
				without box-shadow
			</p>
		</div>
	</div>
	
	<div class="container">
		<div class="overlay invert-background shadow">
			<p>
				-webkit-backdrop-filter: invert(2)<br>
				with box-shadow (20px blur radius)
			</p>
		</div>
	</div>
	
	
	<div class="container">
		<div class="overlay invert-background shadow-40">
			<p>
				-webkit-backdrop-filter: invert(2)<br>
				with box-shadow (40px blur radius)
			</p>
		</div>
	</div>

</div>
              
            
!

CSS

              
                body {
	padding: 20px;
}

.row {
	display: flex;
}

.container {
	display: inline-block;
	width: 400px;
	height: 200px;
	position: relative;
	background-color: skyblue;
	color: #fff;
	padding: 30px;
	margin: 0 10px 10px 0;
	
	&:before {
		content: "Lorem ipsum dolor sit amet consectetur, adipisicing elit. Et, tempora molestiae fugit corporis iste qui impedit pariatur accusamus ipsum quas eligendi veritatis obcaecati explicabo, sit eveniet, natus ducimus beatae. Amet!";
		position: absolute;
		left: 10px;
		right: 10px;
		top: 10px;
		bottom: 10px;
		font-size: 23px;
		font-weight: bold;
	}
	
	&.flex {
		display: inline-flex;
		flex-flow: column nowrap;
		align-items: center;
	}
	
	.overlay {
		position: relative;
		max-width: 200px;
		background: rgba(255,0,255,0.1);
		border: 1px dashed red;
		
		.inner {
			border: 1px dashed blue;
		}
		
		p {
			margin: 20px;
			color: #000;
		}
	
	}
	
	.blur-background {
		-webkit-backdrop-filter: blur(10px);
	}
	
	.invert-background {
		-webkit-backdrop-filter: invert(2);
	}
	
	.shadow {
		box-shadow: 0 0 20px rgba(0,0,0,0.5);
	}
	.shadow-40 {
		box-shadow: 0 0 40px rgba(0,0,0,0.5);
	}
}

.floating-element {
	position: absolute;
	top: 40px;
	right: 90px;
	box-shadow: 0 0 20px rgba(0,0,0,0.5);
	background: rgb(0,0,255);
	border-radius: 20px;
	padding: 20px;
}

.animated {
	@keyframes move {
		0% {
			transform: translateX(20px);
			opacity: 0;
		}
		100% {
			transform: translateX(0);
			opacity: 1;
		}
	}
	animation: move 2s;
	animation-fill-mode: both;
}
              
            
!

JS

              
                
              
            
!
999px

Console