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

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

              
                .ma-opener
	.ma-opener__content
		h1 Atsushi Nakajima
		p  Atsushi is the main protagonist of Bungo Stray Dogs and a member of the Armed Detective Company. He has a strong sense of morality, as seen through his interactions with Kyouka. He values life and tries to help his enemies, such as Kyouka and Lucy Maud Montgomery, both of whom were moved by his actions. He hates it when people die due to unfortunate circumstances or abuse their power to hurt others, as shown during his battle with Akutagawa. 
	.ma-opener__image.ma-opener__image--1
		.ma-opener__imageEl
	.ma-opener__image.ma-opener__image--2
		.ma-opener__imageEl
	.ma-opener__image.ma-opener__image--3
		.ma-opener__imageEl
	.ma-opener__image.ma-opener__image--4
		.ma-opener__imageEl
              
            
!

CSS

              
                
$opener-bp-1: 480px;
$opener-bp-2: 900px;

.ma-opener {
	display: grid;
	width: 100%;
	max-width: 1200px;
	min-height: 100vh;
	margin: 0 auto;
	grid-template-rows: repeat(5, 1fr);
	
	@media (min-width: $opener-bp-1) {
		grid-template-columns: repeat(7, 1fr);
		grid-template-rows: repeat(9, 1fr);
	}
	
	@media (min-width: $opener-bp-2) {
		grid-template-columns: repeat(10, 1fr);
		grid-template-rows: repeat(11, 1fr);
	}
}


.ma-opener__content {
	padding: 0.5rem 1rem;
	grid-row: 2 / span 1;
	
	border: 1px solid black;
	box-shadow: 0.5rem 0.5rem 2rem black, -0.5rem -0.5rem 2rem black;
	background-color: rgba(white, 0.875);
	z-index: 2;
	
	@media (min-width: $opener-bp-1) {
		grid-column: 2 / span 5;
		grid-row: 4 / span 3;
	}
	
	@media (min-width: $opener-bp-2) {
		grid-column: 4 / span 4;
		grid-row: 4 / span 4;
	}
}

.ma-opener__image {
	padding: 1rem;
	margin: 0.5rem 1rem;

	background-color: white;
}

.ma-opener__image .ma-opener__imageEl {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
}

.ma-opener__image--1 {
	border: 1px solid #aaaaaa;

	@media (min-width: $opener-bp-1) {
		grid-column: 4 / span 4;
		grid-row: 1 / span 3;
	}
	
	@media (min-width: $opener-bp-2) {
		grid-column: 4 / span 6;
		grid-row: 1 / span 4;
	}
}

.ma-opener__image--2 {
	grid-row: 3 / span 1;
	
	border: 2px solid #59515f;
	
	@media (min-width: $opener-bp-1) {
		grid-column: 1 / span 4;
		grid-row: 2 / span 3;
	}
	
	@media (min-width: $opener-bp-2) {
		grid-column: 7 / span 4;
		grid-row: 3 / span 8;
	}
}

.ma-opener__image--3 {
	border: 1px solid #795c34;

	@media (min-width: $opener-bp-1) {
		grid-column: 4 / span 4;
		grid-row: 6 / span 3;
	}
	
	@media (min-width: $opener-bp-2) {
		grid-column: 1 / span 4;
		grid-row: 2 / span 5;
	}
}

.ma-opener__image--4 {
	border: 3px solid #7e491d;

	@media (min-width: $opener-bp-1) {
		grid-column: 1 / span 4;
		grid-row: 7 / span 3;
	}
	
	@media (min-width: $opener-bp-2) {
		grid-column: 2 / span 6;
		grid-row: 7 / span 5;
	}
}



.ma-opener__image--1 .ma-opener__imageEl {
	background-image: url('https://cdn.anisearch.com/images/character/screen/55/55489/full/367506.jpg');
	background-position: top center;
}

.ma-opener__image--2 .ma-opener__imageEl {
	background-image: url('http://vignette2.wikia.nocookie.net/vsbattles/images/3/30/Atsushi_anime.png/revision/latest?cb=20160620033748');
	background-position: top center;
}

.ma-opener__image--3 .ma-opener__imageEl {
	background-image: url('https://s-media-cache-ak0.pinimg.com/564x/ed/82/0f/ed820f2818258f026278bdd9891cd7e5.jpg');
	background-position: top left;
}

.ma-opener__image--4 .ma-opener__imageEl {
	background-image: url('https://1.bp.blogspot.com/-gQxJ0k8_RRA/V_EG4CEkgQI/AAAAAAAACIA/nUVUYP0fLO0Ef7zq4QSgtAydshp1B1f7gCLcB/s1600/Nakajima%2BAtsushi%2Bstray%2Bdog%2Bwith%2Bbomb%2Btiger%2Bform.jpg');
	background-position: bottom center;
}

              
            
!

JS

              
                
              
            
!
999px

Console