123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              input#bluepurple.variation(type="radio" value="1" name="color" checked)
label(for="bluepurple")

input#sunset.variation(type="radio" value="2" name="color")
label(for="sunset")

input#godiva.variation(type="radio" value="3" name="color")
label(for="godiva")

input#dark.variation(type="radio" value="4" name="color")
label(for="dark")

input#pinkaru.variation(type="radio" value="5" name="color")
label(for="pinkaru")

main
	section.results-header
		h1 Find dogs near you.
		.results-header__option
			.option__button.option--grid.selected
				span
				span
				span
				span
				span Grid
			.option__button.option--list
				span
				span
				span
				span List
	div.filter-section__wrapper
		section.filter-section
			h6 Filters
			.filters
				h5.filters__title Dog Type
				.filters__item
					.checkbox
						input#checkbox-1(type="checkbox")
						label(for="checkbox-1") Puppy
							span.box
							.tooltip.top(data-tooltip="Younger than 18 months.")
								span
									i.icon-info
					span.badge.status-primary 10
				.filters__item
					.checkbox
						input#checkbox-2(type="checkbox" checked)
						label(for="checkbox-2") Young
							span.box
					span.badge.status-primary 5
				.filters__item
					.checkbox
						input#checkbox-3(type="checkbox")
						label(for="checkbox-3") Adult
							span.box
					span.badge.status-primary 20
				.filters__item
					.checkbox
						input#checkbox-4(type="checkbox")
						label(for="checkbox-4") Senior
							span.box
					span.badge.status-primary 8
			.filters
				h5.filters__title Dog Size
				.filters__item
					.checkbox
						input#checkbox-5(type="checkbox")
						label(for="checkbox-5") Small
							span.box
					span.badge.status-primary 9
				.filters__item
					.checkbox
						input#checkbox-6(type="checkbox" checked)
						label(for="checkbox-6") Medium
							span.box
					span.badge.status-primary 12
				.filters__item
					.checkbox
						input#checkbox-7(type="checkbox")
						label(for="checkbox-7") Large
							span.box
					span.badge.status-primary 17
				.filters__item
					.checkbox
						input#checkbox-8(type="checkbox")
						label(for="checkbox-8") XL
							span.box
					span.badge.status-primary 3
			
	section.results-section.results--grid
		- for (var i=0; i<9; i++)
			.profile
				.profile__image
					img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/dog.png" alt="Doggo")
				.profile__info
					h3 Doggo Dogg
					p.profile__info__extra A very good boi that loves playing fetch and ice-cream! Gentle with everyone. Scared of the rain.
				.profile__stats
					p.profile__stats__title Type
					h5.profile__stats__info Puppy
				.profile__stats
					p.profile__stats__title Size
					h5 Medium
				.profile__stats
					p.profile__stats__title Weight
					h5.profile__stats__info 45 lbs
				.profile__cta
					a.button Adopt Doggo!
	
footer
	.explanation
		| Part of the  
		a(href="https://codepen.io/collection/DQvYpQ" target="_blank") CSS Grid collection here
		| .  
		a(href="https://codepen.io/oliviale/full/mgWjpq" target="_blank") Part I
		|  •  
		a(href="https://codepen.io/oliviale/full/WqwOzv" target="_blank") Part II
		|  • 
		a(href="https://codepen.io/oliviale/full/GbmyYx" target="_blank") Part III
	.social
		a(href="https://twitter.com/meowlivia_" target="_blank")
			i.icon-social-twitter.icons
		a(href="https://github.com/oliviale" target="_blank")
			i.icon-social-github.icons
		a(href="https://dribbble.com/oliviale" target="_blank")
			i.icon-social-dribbble.icons
			
	
            
          
!
            
              :root {
	--canvasColor: #f9f9f9;
}

body {
	background: var(--canvasColor);
	font-family: "Poppins", sans-serif;
	font-weight: 300;
	line-height: 1.5;
	font-size: 16px;
	text-align: center;
	transition: all 0.3s ease;
}

* {
	box-sizing: border-box;
}

main {
	--neutralShade0: #f8f8f8;
	--neutralShade1: #f2f2f2;
	--neutralShade2: #e8e9e9;
	--neutralShade3: #d1d3d4;
	--neutralShade4: #babdbf;
	--neutralShade5: #808488;
	--neutralShade6: #666a6d;
	--neutralShade7: #4d5052;
	--neutralShade8: #212122;

	--grayColor: #999;
	--lightGrayColor: #ddd;

	--borderRadius: 6px;
	--boxShadow: 0 2px 5px rgba(#333, 0.2);
}

/*overall layout*/

main {
	width: 90%;
	margin: 3em auto 0;
	max-width: 1500px;
	color: var(--foregroundColor);
	text-align: left;
}

main section {
	position: relative;
}

/*typography*/
strong {
	font-weight: 500;
}

em {
	font-style: italic;
}

h1 {
	font: 700 48px/1.2 "Poppins", sans-serif;
	margin-bottom: 10px;
}

h2 {
	font: 700 32px/1.2 "Poppins", sans-serif;
	margin-bottom: 10px;
}

h3 {
	font: 700 24px/1.2 "Poppins", sans-serif;
	margin-bottom: 10px;
}

h4 {
	font: 700 20px/1.2 "Poppins", sans-serif;
	margin-bottom: 10px;
}

h5 {
	font: 500 18px/1.2 "Poppins", sans-serif;
	margin-bottom: 10px;
}

h6 {
	font: 500 16px/1.2 "Poppins", sans-serif;
	text-transform: uppercase;
}

/*checkboxes*/
input:disabled {
	~ * {
		opacity: 0.3;
		user-select: none;
		pointer-events: none;
	}
}

.checkbox {
	position: relative;
	user-select: none;
	margin-bottom: 10px;
	input {
		display: none;
	}
	label {
		position: relative;
		vertical-align: middle;
		cursor: pointer;
		font-weight: 500;
		padding-left: 35px;
	}
	span.box {
		display: inline-block;
		width: 20px;
		border-radius: var(--borderRadius);
		border: 1px solid var(--grayColor);
		width: 24px;
		height: 24px;
		vertical-align: middle;
		margin-right: 3px;
		transition: 0.3s ease;
		position: absolute;
		left: 0;
		&:before,
		&:after {
			content: "";
			position: absolute;
			width: 4px;
			height: 16px;
			border-radius: 40px;
			background: var(--backgroundColor);
			transition: all 0.3s ease;
		}
		&:before {
			transform: rotate(45deg) translateY(-5px) translateX(10px) scale(0);
		}
		&:after {
			height: 8px;
			transform: rotate(-45deg) translateY(10px) translateX(-4px) scale(0);
		}
	}
	input:checked {
		+ label {
			span.box {
				background: var(--accent2Color);
				border-color: var(--accent2Color);
				&:before {
					transform: rotate(45deg) translateY(-5px) translateX(10px) scale(1);
				}
				&:after {
					height: 8px;
					transform: rotate(-45deg) translateY(10px) translateX(-4px) scale(1);
				}
			}
		}
	}
	input:disabled:checked + span.box {
		background: var(--grayColor);
		border: var(--grayColor);
	}
	input:disabled:checked ~ label {
		&:before,
		&:after {
			background: black;
		}
	}
}

/*buttons & links*/

.buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	> * {
		flex: 1 1 calc(50% - 20px);
		margin-top: 20px;
		&:nth-child(odd) {
			margin-right: 20px;
		}
	}
}

a.button,
input.button,
button {
	outline: none;
	width: 100%;
	text-align: center;
	display: inline-block;
	border: none;
	font: 500 16px/1 "Poppins", sans-serif;
	padding: 20px;
	cursor: pointer;
	border-radius: var(--borderRadius);
	background: var(--primaryColor);
	color: var(--backgroundColor);
	position: relative;
	top: 0;
	transition: 0.2s ease;
	&:hover,
	&.hover {
		top: -3px;
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
	}
	&:active,
	&.active {
		background: var(--primaryShade4);
		outline: none;
		box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
		top: 0;
	}
	&.disabled {
		opacity: 0.4;
		user-select: none;
		pointer-events: none;
	}
	&.medium {
		padding: 15px 18px;
		width: auto;
	}
	&.small {
		padding: 10px 12px;
		width: auto;
		font-size: 14px;
		font-weight: 500;
	}
	&.secondary {
		background: var(--secondaryColor);
		&:active,
		&:focus,
		&.active {
			background: var(--secondaryShade4);
			outline: none;
		}
	}
	&.accent {
		background: var(--accentColor);
		&:active,
		&:focus,
		&.active {
			background: var(--accentShade4);
		}
	}
	&.accent2 {
		background: var(--accent2Color);
		&:active,
		&:focus,
		&.active {
			background: var(--accent2Shade4);
		}
	}
	&.accent3 {
		background: var(--accent3Color);
		&:active,
		&:focus,
		&.active {
			background: var(--accent3Shade4);
		}
	}
}

/*badges*/

.badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 50px;
	font-weight: 500;
	text-transform: uppercase;
	line-height: 1;
}

.alert {
	margin-bottom: 15px;
	display: block;
	padding: 10px 15px;
	border-radius: var(--borderRadius);
	font-weight: 500;
	position: relative;
	cursor: pointer;
	&.non-collapsible {
		&:before,
		&:after {
			content: none;
		}
	}
	&:before,
	&:after {
		content: "";
		position: absolute;
		width: 4px;
		height: 16px;
		border-radius: 40px;
		right: 30px;
		top: 8px;
	}
	&:before {
		transform: rotate(45deg) translateY(-5.5px) translateX(13.5px);
	}
	&:after {
		transform: rotate(-45deg) translateY(13.5px) translateX(5.5px);
	}
}

.status-primary {
	background: var(--primaryShade1);
	color: var(--primaryShade5);
	&:before,
	&:after {
		background: var(--primaryShade5);
	}
}

/*tooltips*/

.tooltip {
	cursor: pointer;
	position: relative;
	display: block;
	width: 100%;
	text-align: center;
	z-index: 10;
	span {
		border-bottom: 1px dotted;
	}
	&:after {
		content: attr(data-tooltip);
		background: var(--neutralShade2);
		max-width: 90%;
		width: auto;
		position: absolute;
		left: 0;
		right: 0;
		margin: auto;
		opacity: 0;
		height: auto;
		font-size: 14px;
		padding: 10px;
		border-radius: var(--borderRadius);
		color: var(--foregroundColor);
		text-align: center;
	}
	&.dark:after {
		background: var(--neutralShade7);
		color: var(--backgroundColor);
	}
	&.top {
		&:after {
			bottom: 80%;
			transition: opacity 0.3s ease 0.3s,
				bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
		}
		&:hover,
		&.hovered {
			&:after {
				bottom: 130%;
				opacity: 1;
			}
		}
	}
	&.bottom {
		&:after {
			top: 80%;
			transition: opacity 0.3s ease 0.3s,
				top 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
		}
		&:hover,
		&.hovered {
			&:after {
				top: 130%;
				opacity: 1;
			}
		}
	}
}

/*variations*/
input.variation {
	display: none;
	+ label {
		display: inline-block;
		width: 50px;
		height: 50px;
		margin: 30px 20px 0;
		border-radius: 50%;
		cursor: pointer;
		border: 6px solid #fff;
		box-shadow: 0 0 4px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.2);
	}
}

#bluepurple {
	+ label {
		background: linear-gradient(to left, #673ab7 50%, #03a9f4 50%);
	}
	&:checked ~ main {
		--backgroundColor: #fff;
		--foregroundColor: #111;
		--primaryColor: #03a9f4;
		--primaryShade1: #e1f5fe;
		--primaryShade2: #b3e5fc;
		--primaryShade3: #4fc3f7;
		--primaryShade4: #0288d1;
		--primaryShade5: #0277bd;
		--secondaryColor: #673ab7;
		--secondaryShade1: #ede7f6;
		--secondaryShade2: #d1c4e9;
		--secondaryShade3: #9575cd;
		--secondaryShade4: #512da8;
		--secondaryShade5: #311b92;
		--accentColor: #009688;
		--accentShade1: #e0f2f1;
		--accentShade2: #b2dfdb;
		--accentShade3: #4db6ac;
		--accentShade4: #00796b;
		--accentShade5: #004d40;
		--accent2Color: #8bc34a;
		--accent2Shade1: #e7f6d5;
		--accent2Shade2: #c5e1a5;
		--accent2Shade3: #aed581;
		--accent2Shade4: #689f38;
		--accent2Shade5: #558b2f;
		--accent3Color: #f44336;
		--accent3Shade1: #ffdde0;
		--accent3Shade2: #ffcdd2;
		--accent3Shade3: #ef9a9a;
		--accent3Shade4: #d32f2f;
		--accent3Shade5: #b71c1c;
	}
}

#sunset {
	+ label {
		background: linear-gradient(to right, #ff9557 50%, #ffcc67 50%);
	}
	&:checked ~ main {
		--canvasColor: #f9f9f9;
		--backgroundColor: #fff;
		--foregroundColor: #111;
		--primaryColor: #ff9557;
		--primaryShade1: #ffe2d1;
		--primaryShade2: #ffceb2;
		--primaryShade3: #ffb184;
		--primaryShade4: #e88850;
		--primaryShade5: #d17a48;
		--secondaryColor: #ffcc67;
		--secondaryShade1: #fff1d5;
		--secondaryShade2: #ffde9e;
		--secondaryShade3: #ffd074;
		--secondaryShade4: #e8ba5e;
		--secondaryShade5: #ba954b;
		--accentColor: #4e5166;
		--accentShade1: #cecfd5;
		--accentShade2: #aeafb9;
		--accentShade3: #8e909d;
		--accentShade4: #6e7081;
		--accentShade5: #404354;
		--accent2Color: #588b8b;
		--accent2Shade1: #c2d4d4;
		--accent2Shade2: #a3bfbf;
		--accent2Shade3: #85aaaa;
		--accent2Shade4: #507f7f;
		--accent2Shade5: #497272;
		--accent3Color: #fe5f55;
		--accent3Shade1: #fec4c1;
		--accent3Shade2: #fea7a2;
		--accent3Shade3: #fe7c73;
		--accent3Shade4: #e7574e;
		--accent3Shade5: #b9463e;
	}
}

#godiva {
	+ label {
		background: linear-gradient(to right, #a05793 50%, #a3d858 50%);
	}
	&:checked ~ main {
		--canvasColor: #f9f9f9;
		--backgroundColor: #fff;
		--foregroundColor: #111;

		--primaryColor: #a05793;
		--primaryShade1: #e5d1e1;
		--primaryShade2: #d3b2cd;
		--primaryShade3: #b984b0;
		--primaryShade4: #925086;
		--primaryShade5: #834879;

		--secondaryColor: #a3d858;
		--secondaryShade1: #e5f4d1;
		--secondaryShade2: #cce9a3;
		--secondaryShade3: #bce285;
		--secondaryShade4: #95c550;
		--secondaryShade5: #779e41;

		--accentColor: #245e71;
		--accentShade1: #d7e1e5;
		--accentShade2: #afc4cb;
		--accentShade3: #7398a4;
		--accentShade4: #4b7b8a;
		--accentShade5: #1e4d5d;

		--accent2Color: #2aa5a1;
		--accent2Shade1: #d8eeed;
		--accent2Shade2: #9ed6d4;
		--accent2Shade3: #64bdba;
		--accent2Shade4: #279693;
		--accent2Shade5: #1f7976;

		--accent3Color: #92374d;
		--accent3Shade1: #ebdad3;
		--accent3Shade2: #cda4ae;
		--accent3Shade3: #af6d7d;
		--accent3Shade4: #853246;
		--accent3Shade5: #6b2939;
	}
}

#dark {
	+ label {
		background: linear-gradient(to right, #367bc3 50%, #38bfa7 50%);
	}
	&:checked ~ main {
		--canvasColor: #2a313b;
		--backgroundColor: #2a313b;
		--foregroundColor: #ebe8d8;

		--primaryColor: #367bc3;
		--primaryShade5: #b5cfe9;
		--primaryShade4: #91b7de;
		--primaryShade3: #5a93cd;
		--primaryShade2: #3270b2;
		--primaryShade1: #285a8e;

		--secondaryColor: #38bfa7;
		--secondaryShade5: #c8ede7;
		--secondaryShade4: #92dccf;
		--secondaryShade3: #6ed0be;
		--secondaryShade2: #33ae98;
		--secondaryShade1: #2e9d89;

		--accentColor: #586994;
		--accentShade5: #d1d6e1;
		--accentShade4: #a3adc4;
		--accentShade3: #7684a7;
		--accentShade2: #49567a;
		--accentShade1: #39435f;

		--accent2Color: #8fe1a2;
		--accent2Shade5: #d6f4dd;
		--accent2Shade4: #c1eecc;
		--accent2Shade3: #a3e6b2;
		--accent2Shade2: #82cd94;
		--accent2Shade1: #76b985;

		--accent3Color: #fe938c;
		--accent3Shade5: #fee1df;
		--accent3Shade4: #fec4c0;
		--accent3Shade3: #fea6a0;
		--accent3Shade2: #e78680;
		--accent3Shade1: #b96b66;
		color: #f1f2eb;
		border-color: #f1f2eb;
		> section {
			border-color: #f1f2eb;
			> h6 {
				color: #f1f2eb;
			}
		}
	}
}

#pinkaru {
	+ label {
		background: linear-gradient(to right, #f95794 50%, #323da5 50%);
	}
	&:checked ~ main {
		border-color: #fff;
		> section {
			border-color: #fff;
			> h6 {
				color: #fff;
			}
		}
		--canvasColor: #2a313b;
		--backgroundColor: #2a313b;
		--foregroundColor: #e3f2fd;

		--primaryColor: #f95794;
		--primaryShade5: #fdd1e1;
		--primaryShade4: #fba3c4;
		--primaryShade3: #fa75a7;
		--primaryShade2: #e35087;
		--primaryShade1: #b6406c;

		--secondaryColor: #323da5;
		--secondaryShade5: #c7cae6;
		--secondaryShade4: #8f95cd;
		--secondaryShade3: #6971bd;
		--secondaryShade2: #2e3896;
		--secondaryShade1: #293288;

		--accentColor: #ffc729;
		--accentShade5: #ffefc4;
		--accentShade4: #ffe08a;
		--accentShade3: #ffd14f;
		--accentShade2: #e8b526;
		--accentShade1: #d1a322;

		--accent2Color: #53dd6c;
		--accent2Shade5: #d0f5d6;
		--accent2Shade4: #a1ecae;
		--accent2Shade3: #72e386;
		--accent2Shade2: #4cc963;
		--accent2Shade1: #3da14f;

		--accent3Color: #f52f57;
		--accent3Shade5: #fcc6d1;
		--accent3Shade4: #f98da3;
		--accent3Shade3: #f65475;
		--accent3Shade2: #df2b50;
		--accent3Shade1: #b32340;
	}
}

#dark,
#pinkaru {
	&:checked ~ main {
		h6.subheader,
		.feedback-form {
			color: var(--neutralShade1);
		}
		::placeholder {
			color: var(--neutralShade4);
			opacity: 1;
		}
		:-ms-input-placeholder {
			color: var(--neutralShade4);
		}
		::-ms-input-placeholder {
			color: var(--neutralShade4);
		}
		.tooltip:after {
			color: var(--backgroundColor);
		}
		a.button,
		input.button,
		button,
		.tooltip.dark:after {
			color: var(--foregroundColor);
			text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
		}
		.button:active,
		.button.active {
			background: var(--primaryShade1);
		}
		.button.secondary:active,
		.button.secondary.active {
			background: var(--secondaryShade1);
		}
		.button.accent {
			background: var(--accentShade2);
			&:active {
				background: var(--accentShade1);
			}
		}
		.button.accent2 {
			background: var(--accent2Shade2);
			&:active {
				background: var(--accent2Shade1);
			}
		}
		.button.accent3 {
			background: var(--accent3Shade2);
			&:active {
				background: var(--accent3Shade1);
			}
		}
		a.link {
			color: var(--neutralShade2);
			&:hover,
			&.hover {
				color: var(--neutralShade1);
				border-bottom: 2px solid;
			}
			&.primary {
				color: var(--primaryShade4);
				&:hover,
				&.hover {
					color: var(--primaryShade5);
				}
			}
			&.secondary {
				color: var(--secondaryShade4);
				&:hover,
				&.hover {
					color: var(--secondaryShade5);
				}
			}
		}
		.profile-default img {
			border-bottom: 7px solid var(--secondaryShade5);
		}
	}
}

/* PROFILE CARDS */

.results-header {
	grid-column: span 2;
	display: grid;
	grid-template-columns: 1fr max-content;
	&__option {
		display: grid;
		grid-gap: 8px;
		grid-template-columns: repeat(2, 1fr);
		cursor: pointer;
	}
	.option__button {
		display: grid;
		grid-gap: 5px;
		width: 55px;
		height: 75px;
		border-radius: var(--borderRadius);
		padding: 10px;
		overflow: hidden;
		transition: 0.2s ease;
		> span {
			background: var(--foregroundColor);
			transition: 0.2s ease;
			&:last-child {
				background: none !important;
				text-align: center;
				text-transform: uppercase;
				font: 500 14px/1 "Poppins", sans-serif;
				display: block;
				margin-top: 2px;
			}
		}
		&:hover {
			> span {
				color: var(--primaryShade5);
				background: var(--primaryShade5);
			}
		}
		&.selected {
			> span {
				color: var(--primaryColor);
				background: var(--primaryColor);
			}
		}
	}
	.option--grid {
		grid: repeat(2, 1fr) min-content / repeat(2, 1fr);
		span:last-child {
			grid-column: span 2;
		}
	}
	.option--list {
		grid: repeat(3, 1fr) min-content / 100%;
	}
}

.results-section {
	display: grid;
	grid-gap: 35px;
}

.results--grid {
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.results--list {
	grid-template-columns: 100%;
}

.profile {
	position: relative;
	background: var(--backgroundColor);
	color: var(--foregroundColor);
	box-shadow: 0 3px 15px rgba(#333, 0.2);
	border-radius: 10px;
	overflow: hidden;
	transition: 0.2s ease;
	display: grid;
	grid: 200px repeat(5, auto) / 100%;
	&__image {
		img {
			width: 100%;
			height: 100%;
			object-fit: cover;
			border-bottom: 7px solid var(--secondaryColor);
		}
	}
	&__info {
		padding: 20px 25px 0;
	}
	&__stats {
		padding: 5px 25px;
		&__title {
			color: var(--grayColor);
			text-transform: uppercase;
			font-size: 16px;
		}
	}
	&__cta {
		padding: 0 25px 25px;
	}
	a {
		&:hover {
			top: 0;
			box-shadow: none;
			background: var(--primaryShade4);
		}
		&:active,
		&:focus {
			top: 0;
			box-shadow: none;
			background: var(--primaryShade5);
		}
	}
}

#dark,
#pinkaru {
	&:checked ~ main {
		a.button {
			color: var(--foregroundColor);
			text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
		}
		.button:hover {
			background: var(--primaryShade2);
		}
		.button:active {
			background: var(--primaryShade1);
		}
		.profile-default img {
			border-bottom: 7px solid var(--secondaryShade5);
		}
		.results-header .option__button.selected {
			> span {
				color: var(--primaryShade3);
				background: var(--primaryShade3);
			}
		}
	}
}

/*FILTERS*/

.filter-section {
	margin: 2em 0;
}

.filters {
	&__title {
		font-size: 18px;
		color: var(--grayColor);
		margin: 25px 0;
	}
	&__item {
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: center;
		margin-bottom: 10px;
		.checkbox {
			position: relative;
			margin: 0;
			.tooltip {
				display: inline-block;
				margin-left: 10px;
				width: auto;
				vertical-align: middle;
				span {
					border: none;
				}
				&:after {
					min-width: 100px;
					margin-left: -50px;
				}
			}
		}
	}
	&:not(:first-of-type) {
		border-top: 0.5px solid var(--lightGrayColor);
		margin-top: 25px;
	}
}

@media (min-width: 500px) and (max-width: 992px) {
	.filter-section {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		h6 {
			grid-column: span 2;
		}
	}
	.filters:nth-child(2) {
		margin-right: 25px;
	}
	.filters:nth-child(3) {
		border-top: none;
		border-left: 0.5px solid var(--lightGrayColor);
		margin-top: 0;
		padding-left: 25px;
	}
}

@media (min-width: 500px) {
	input.variation + label {
		margin: 70px 20px 20px;
	}
	.results-section {
		&.results--grid {
			.profile {
				width: 100%;
				margin: auto;
				overflow: hidden;
				grid: 340px auto auto / repeat(3, minmax(80px, 1fr));
				grid-gap: 10px;
				&__image {
					grid-column: span 3;
				}
				&__info {
					grid-column: span 3;
				}
				&__stats {
					padding: 5px 25px;
				}
				&__cta {
					grid-column: span 3;
				}
			}
		}
	}
}

@media (min-width: 768px) {
	.results-section {
		&.results--list {
			.profile {
				grid-template-columns: 150px repeat(3, 1fr) auto;
				grid-template-rows: auto auto;
				width: 100%;
				padding-right: 20px;
				&__image {
					grid-column: 1 / 2;
					grid-row: 1 / 3;
					margin-right: 20px;
					img {
						border-radius: 10px 0 0 10px;
						border: none;
					}
				}
				&__info {
					grid-column: 2 / 6;
					grid-row: 1;
					padding: 20px 20px 15px 0;
				}
				&__stats {
					min-width: 100px;
					padding: 15px 0;
					border-top: 0.5px solid var(--grayColor);
					grid-row: 2 / 3;
					&:nth-child(3) {
						grid-column: 2 / 3;
					}
					&:nth-child(4) {
						grid-column: 3 / 4;
					}
					&:nth-child(5) {
						grid-column: 4 / 5;
					}
				}
				&__cta {
					grid-row: 2 / 3;
					grid-column: 5 / 6;
					border-top: 0.5px solid var(--grayColor);
					padding: 15px 0 0;
				}
			}
		}
	}
}

@media (max-width: 768px) {
	.results-header__option {
		display: none;
	}
}

@media (min-width: 992px) {
	main {
		display: grid;
		grid: min-content auto / minmax(250px, 18%) 1fr;
		grid-gap: 40px;
	}
	.filter-section__wrapper {
		position: relative;
	}
	.filter-section {
		position: sticky;
		top: 30px;
	}
	.results-section {
		margin-left: 2em;
	}
}

footer {
	display: grid;
	grid: min-content / 1fr max-content;
	text-align: left;
	width: 90%;
	margin: 5em auto 4em;
	max-width: 1500px;
	align-items: center;
	a {
		text-decoration: none;
		color: #333;
		padding: 3px 0;
		border-bottom: 1px dashed;
		&:hover {
			border-bottom: 1px solid;
		}
	}
	.social a {
		text-decoration: none;
		margin-left: 10px;
		.icons {
			display: inline-block;
			font-size: 20px;
		}
	}
	&.dark,
	&.dark a {
		color: #f9f9f9;
	}
}

            
          
!
            
              //apprearance
$("input.variation").on("click", function() {
	if ($(this).val() > 3) {
		$("body").css("background", "#111");
		$("footer").attr("class", "dark");
	} else {
		$("body").css("background", "#f9f9f9");
		$("footer").attr("class", "");
	}
});

// toggle list vs card view
$(".option__button").on("click", function() {
	$(".option__button").removeClass("selected");
	$(this).addClass("selected");
	if ($(this).hasClass("option--grid")) {
		$(".results-section").attr("class", "results-section results--grid");
	} else if ($(this).hasClass("option--list")) {
		$(".results-section").attr("class", "results-section results--list");
	}
});

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console