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

              
                <!--
Une grille de motifs : https://www.magicpattern.design/tools/css-backgrounds
-->

<div class="container">
	
	<div class="bloc1"></div>
	<div class="bloc2"></div>
	<div class="bloc3"></div>
	<div class="bloc4"></div>
	<div class="bloc5"></div>
	<div class="align bloc6"><h1>CSS GRID</h1></div>
	<div class="bloc7"></div>
	<div class="bloc8"></div>
	<div class="bloc9"></div>
	<div class="bloc10"></div>
	<div class="bloc11"></div>
	<div class="bloc12"></div>
	<div class="bloc13"></div>
	<div class="align bloc14"><h1>& PATTERNS</h1></div>
	<div class="bloc15"></div>
	<div class="bloc16"></div>

</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,[email protected],800&display=swap");

* {
	margin: 0;
	padding: 0;
}

body {
	background-color: #dfdfe9;
	/*margin:3rem;*/
}

/*le titre*/
h1 {
	font-family: "JetBrains Mono", monospace;
	font-size: 3em;
	text-align:center;
}

/*le centrage du titre dans le bloc*/
.align {
  display: flex;
  align-items: center;
  justify-content: center;
}

/*la grille*/
.container {
	height: 100vh;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr;
	grid-template-rows: 1fr 1fr 1fr 1fr;
	grid-template-areas:
		"bloc1 bloc4 bloc3 bloc2"
		"bloc5 bloc6 bloc3 bloc8"
		"bloc9 bloc9 bloc7 bloc12"
		"bloc13 bloc14 bloc14 bloc16";
}

/*Tous les blocs et les patterns*/
.bloc1 {
	grid-area: bloc1;
	background-color: #dfdfe9;
	background: repeating-linear-gradient(
		45deg,
		#161617,
		#161617 6px,
		#dfdfe9 6px,
		#dfdfe9 30px
	);
}
.bloc2 {
	grid-area: bloc2;
	background-color: #dfdfe9;
	background: repeating-linear-gradient(
		-45deg,
		#161617,
		#161617 6px,
		#dfdfe9 6px,
		#dfdfe9 30px
	);
}
.bloc3 {
	grid-area: bloc3;
	background-color: #dfdfe9;
	background-image: linear-gradient(
			#161617 2.4000000000000004px,
			transparent 2.4000000000000004px
		),
		linear-gradient(
			90deg,
			#161617 2.4000000000000004px,
			transparent 2.4000000000000004px
		),
		linear-gradient(
			#161617 1.2000000000000002px,
			transparent 1.2000000000000002px
		),
		linear-gradient(
			90deg,
			#161617 1.2000000000000002px,
			#dfdfe9 1.2000000000000002px
		);
	background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px;
	background-position: -2.4000000000000004px -2.4000000000000004px,
		-2.4000000000000004px -2.4000000000000004px,
		-1.2000000000000002px -1.2000000000000002px,
		-1.2000000000000002px -1.2000000000000002px;
}
.bloc4 {
	grid-area: bloc4;
	background-color: #dfdfe9;
	background-image: radial-gradient(
		#161617 0.6000000000000001px,
		#dfdfe9 0.6000000000000001px
	);
	background-size: 12px 12px;
}
.bloc5 {
	grid-area: bloc5;
	background-color: #dfdfe9;
	background-size: 12px 12px;
	background-image: repeating-linear-gradient(
		45deg,
		#161617 0,
		#161617 1.2000000000000002px,
		#dfdfe9 0,
		#dfdfe9 50%
	);
}
.bloc6 {
	grid-area: bloc6;
	justify-content: center;
	align-content: center;
	background-color: #dfdfe9;
	background-image: linear-gradient(
			#161617 1.2000000000000002px,
			transparent 1.2000000000000002px
		),
		linear-gradient(
			to right,
			#161617 1.2000000000000002px,
			#dfdfe9 1.2000000000000002px
		);
	background-size: 24px 24px;
}
.bloc7 {
	grid-area: bloc7;
	background-color: #dfdfe9;
	background-size: 24px 24px;
	background-image: repeating-linear-gradient(
		0deg,
		#161617,
		#161617 1.2000000000000002px,
		#dfdfe9 1.2000000000000002px,
		#dfdfe9
	);
}
.bloc8 {
	grid-area: bloc8;
	background-color: #dfdfe9;
	background-size: 24px 24px;
	background-image: repeating-linear-gradient(
		to right,
		#161617,
		#161617 1.2000000000000002px,
		#dfdfe9 1.2000000000000002px,
		#dfdfe9
	);
}
.bloc9 {
	grid-area: bloc9;
	background-color: #dfdfe9;
	background: radial-gradient(
			circle,
			transparent 20%,
			#dfdfe9 20%,
			#dfdfe9 80%,
			transparent 80%,
			transparent
		),
		radial-gradient(
				circle,
				transparent 20%,
				#dfdfe9 20%,
				#dfdfe9 80%,
				transparent 80%,
				transparent
			)
			30px 30px,
		linear-gradient(
				#161617 2.4000000000000004px,
				transparent 2.4000000000000004px
			)
			0 -1.2000000000000002px,
		linear-gradient(
				90deg,
				#161617 2.4000000000000004px,
				#dfdfe9 2.4000000000000004px
			) -1.2000000000000002px 0;
	background-size: 60px 60px, 60px 60px, 30px 30px, 30px 30px;
}
.bloc10 {
	grid-area: bloc10;
	background-color: #dfdfe9;
	background-image: linear-gradient(135deg, #161617 25%, transparent 25%),
		linear-gradient(225deg, #161617 25%, transparent 25%),
		linear-gradient(45deg, #161617 25%, transparent 25%),
		linear-gradient(315deg, #161617 25%, #dfdfe9 25%);
	background-position: 12px 0, 12px 0, 0 0, 0 0;
	background-size: 24px 24px;
	background-repeat: repeat;
}
.bloc11 {
	grid-area: bloc11;
	background-color: #dfdfe9;
	background-image: linear-gradient(135deg, #161617 25%, transparent 25%),
		linear-gradient(225deg, #161617 25%, transparent 25%),
		linear-gradient(45deg, #161617 25%, transparent 25%),
		linear-gradient(315deg, #161617 25%, #dfdfe9 25%);
	background-position: 12px 0, 12px 0, 0 0, 0 0;
	background-size: 12px 12px;
	background-repeat: repeat;
}
.bloc12 {
	grid-area: bloc12;
	background-color: #dfdfe9;
	background-image: linear-gradient(45deg, #161617 50%, #dfdfe9 50%);
	background-size: 12px 12px;
}
.bloc13 {
	grid-area: bloc13;
	background-color: #dfdfe9;
	background-image: repeating-linear-gradient(
			45deg,
			#161617 25%,
			transparent 25%,
			transparent 75%,
			#161617 75%,
			#161617
		),
		repeating-linear-gradient(
			45deg,
			#161617 25%,
			#dfdfe9 25%,
			#dfdfe9 75%,
			#161617 75%,
			#161617
		);
	background-position: 0 0, 12px 12px;
	background-size: 24px 24px;
}
.bloc14 {
	grid-area: bloc14;
	background-color: #dfdfe9;
	background-image: radial-gradient(
			#161617 0.6000000000000001px,
			transparent 0.6000000000000001px
		),
		radial-gradient(#161617 0.6000000000000001px, #dfdfe9 0.6000000000000001px);
	background-size: 24px 24px;
	background-position: 0 0, 12px 12px;
}
.bloc15 {
	grid-area: bloc15;
	background-color: #dfdfe9;
	background-image: repeating-radial-gradient(
			circle at 0 0,
			transparent 0,
			#dfdfe9 12px
		),
		repeating-linear-gradient(#16161755, #161617);
}
.bloc16 {
	grid-area: bloc16;
	background-color: #dfdfe9;
	background-image: linear-gradient(
			30deg,
			#161617 12%,
			transparent 12.5%,
			transparent 87%,
			#161617 87.5%,
			#161617
		),
		linear-gradient(
			150deg,
			#161617 12%,
			transparent 12.5%,
			transparent 87%,
			#161617 87.5%,
			#161617
		),
		linear-gradient(
			30deg,
			#161617 12%,
			transparent 12.5%,
			transparent 87%,
			#161617 87.5%,
			#161617
		),
		linear-gradient(
			150deg,
			#161617 12%,
			transparent 12.5%,
			transparent 87%,
			#161617 87.5%,
			#161617
		),
		linear-gradient(
			60deg,
			#16161777 25%,
			transparent 25.5%,
			transparent 75%,
			#16161777 75%,
			#16161777
		),
		linear-gradient(
			60deg,
			#16161777 25%,
			transparent 25.5%,
			transparent 75%,
			#16161777 75%,
			#16161777
		);
	background-size: 24px 42px;
	background-position: 0 0, 0 0, 12px 21px, 12px 21px, 0 0, 12px 21px;
}

              
            
!

JS

              
                
              
            
!
999px

Console