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 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

              
                <div class="wrapper">
	<header class="header">
		<div class="header__container">
			<div class="header--default">
				<div class="header__brandmark">
					<svg width="40" height="32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-labelledby="logo-title" aria-describedby="logo-description" class="header__brandmark-item inline-svg">
						<title id="logo-title">Harley Davidson logo</title>
						<desc id="logo-description">White badge with only the outlines</desc>
						<path fill-rule="evenodd" clip-rule="evenodd" d="M2.47 18.875h35.06v-5.458H2.47v5.458zm27.993 4.88S25.938 27.84 20 29.315c-5.938-1.475-10.46-5.56-10.46-5.56 1.347-.799 1.802-1.83 1.954-2.468h17.013c.153.639.606 1.67 1.956 2.468zM9.5 7.452s5.098.265 10.5-3.707c5.402 3.972 10.5 3.707 10.5 3.707-1.653 1.66-1.928 2.983-1.962 3.553H11.461c-.033-.57-.307-1.894-1.961-3.553zM40 11.005h-8.788c.052-1.38 1.856-2.04 1.856-2.04V5.409C23.255 4.88 20 0 20 0S16.745 4.88 6.932 5.41v3.555s1.804.66 1.856 2.04H0v10.282h8.759c-.501 1.773-2.997 2.222-2.997 2.222C12.912 30.829 20 32 20 32s7.09-1.172 14.237-8.491c0 0-2.496-.45-2.995-2.222H40V11.005z" fill="#fff"></path>
					</svg>
				</div>

				<button class="button button__open-nav" aria-labelledby="button-open-navigation" aria-expanded="false">
					<span id="button-open-navigation" hidden>Open Navigation</span>
					<svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 32 32" aria-hidden="true" focusable="false" class="button__open-nav-icon inline-svg">
						<line class="top-line lines" x1="0" x2="32" y1="12" y2="12" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"></line>
						<line class="middle-line lines" x1="0" x2="32" y1="18" y2="18" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"></line>
						<line class="bottom-line lines" x1="0" x2="32" y1="24" y2="24" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"></line>
					</svg>
				</button>

				<div class="nav-social" aria-labelledby="social-networks-menu">
					<h2 id="social-networks-menu" hidden>Social Networks Menu</h2>

					<ul class="nav-social__items">
						<li class="nav-social__item">
							<a href="#0" class="nav-social__link" target="_blank" rel="noopener" aria-labelledby="icon-facebook">
								<span id="icon-facebook" hidden>Visit our Facebook page (opens in new tab)</span>
								<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" class="inline-svg">
									<path d="M12 21a9 9 0 100-18 9 9 0 000 18z" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
									<path d="M15.75 8.25h-1.5A2.25 2.25 0 0012 10.5V21M9 13.5h6" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
								</svg>
							</a>
						</li>
						<li class="nav-social__item">
							<a href="#0" class="nav-social__link" target="_blank" rel="noopener" aria-labelledby="icon-instagram">
								<span id="icon-instagram" hidden>Visit our Instagram page (opens in new tab)</span>
								<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" class="inline-svg">
									<path d="M12 15.75a3.75 3.75 0 100-7.5 3.75 3.75 0 000 7.5z" stroke="#fff" stroke-width="2" stroke-miterlimit="10"></path>
									<path d="M16.125 3.375h-8.25a4.5 4.5 0 00-4.5 4.5v8.25a4.5 4.5 0 004.5 4.5h8.25a4.5 4.5 0 004.5-4.5v-8.25a4.5 4.5 0 00-4.5-4.5z" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
									<path d="M16.875 8.25a1.125 1.125 0 100-2.25 1.125 1.125 0 000 2.25z" fill="#fff"></path>
								</svg>
							</a>
						</li>
						<li class="nav-social__item">
							<a href="#0" class="nav-social__link" target="_blank" rel="noopener" aria-labelledby="icon-twitter">
								<span id="icon-twitter" hidden>Visit our Twitter page (opens in new tab)</span>
								<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" class="inline-svg">
									<path d="M21 6.86a10.357 10.357 0 01-2.601 2.588h0A10.38 10.38 0 013 18.155h0a10.325 10.325 0 005.677-1.795h0A10.394 10.394 0 014.513 5h0a10.376 10.376 0 007.474 4.652h0a3.244 3.244 0 016.002-2.254h0A10.43 10.43 0 0021 6.859" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
								</svg>
							</a>
						</li>
					</ul>
				</div>
			</div>
			<!-- .header -->

			<div class="header--active" hidden>
				<div class="header__brandmark brandmark">
					<svg width="40" height="32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-labelledby="logo-title" aria-describedby="logo-description" class="header__brandmark-item inline-svg">
						<title id="logo-title">Harley Davidson logo</title>
						<desc id="logo-description">White badge with only the outlines</desc>
						<path fill-rule="evenodd" clip-rule="evenodd" d="M2.47 18.875h35.06v-5.458H2.47v5.458zm27.993 4.88S25.938 27.84 20 29.315c-5.938-1.475-10.46-5.56-10.46-5.56 1.347-.799 1.802-1.83 1.954-2.468h17.013c.153.639.606 1.67 1.956 2.468zM9.5 7.452s5.098.265 10.5-3.707c5.402 3.972 10.5 3.707 10.5 3.707-1.653 1.66-1.928 2.983-1.962 3.553H11.461c-.033-.57-.307-1.894-1.961-3.553zM40 11.005h-8.788c.052-1.38 1.856-2.04 1.856-2.04V5.409C23.255 4.88 20 0 20 0S16.745 4.88 6.932 5.41v3.555s1.804.66 1.856 2.04H0v10.282h8.759c-.501 1.773-2.997 2.222-2.997 2.222C12.912 30.829 20 32 20 32s7.09-1.172 14.237-8.491c0 0-2.496-.45-2.995-2.222H40V11.005z" fill="#fff"></path>
					</svg>
				</div>

				<button class="button button__close-nav" aria-labelledby="button-close-navigation">
					<span id="button-close-navigation" hidden>Close Navigation</span>
					<svg xmlns="http://www.w3.org/2000/svg" width="56" height="56" viewBox="0 0 56 56" aria-hidden="true" focusable="false" class="button__close-nav-icon inline-svg">
						<line class="top-line lines" x1="12" x2="44" y1="28" y2="28" transform="rotate(45 28 28)" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"></line>
						<line class="bottom-line lines" x1="12" x2="44" y1="28" y2="28" transform="rotate(-45 28 28)" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"></line>
					</svg>
				</button>

				<nav class="navbar" aria-labelledby="main-menu">
					<h2 id="main-menu" hidden>Main Menu</h2>

					<ul class="nav navbar__nav">
						<li class="nav__item">
							<a class="nav__link" href="#0">Bikes</a>
						</li>
						<li class="nav__item">
							<a class="nav__link" href="#0">Parts</a>
						</li>
						<li class="nav__item">
							<a class="nav__link" href="#0">Mens</a>
						</li>
						<li class="nav__item">
							<a class="nav__link" href="#0">Womens</a>
						</li>
						<li class="nav__item">
							<a class="nav__link" href="#0">Goods &amp; Gifts</a>
						</li>
						<li class="nav__item">
							<a class="nav__link" href="#0">Experience H-D</a>
						</li>
					</ul>
				</nav>
				<!-- nav > .navbar -->

				<div class="nav-social" aria-labelledby="social-networks-menu">
					<h2 id="social-networks-menu" hidden>Social Networks Menu</h2>

					<ul class="nav-social__items">
						<li class="nav-social__item">
							<a href="#0" class="nav-social__link" target="_blank" rel="noopener" aria-labelledby="icon-facebook">
								<span id="icon-facebook" hidden>Visit our Facebook page (opens in new tab)</span>
								<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" class="inline-svg">
									<path d="M12 21a9 9 0 100-18 9 9 0 000 18z" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
									<path d="M15.75 8.25h-1.5A2.25 2.25 0 0012 10.5V21M9 13.5h6" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
								</svg>
							</a>
						</li>
						<li class="nav-social__item">
							<a href="#0" class="nav-social__link" target="_blank" rel="noopener" aria-labelledby="icon-instagram">
								<span id="icon-instagram" hidden>Visit our Instagram page (opens in new tab)</span>
								<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" class="inline-svg">
									<path d="M12 15.75a3.75 3.75 0 100-7.5 3.75 3.75 0 000 7.5z" stroke="#fff" stroke-width="2" stroke-miterlimit="10"></path>
									<path d="M16.125 3.375h-8.25a4.5 4.5 0 00-4.5 4.5v8.25a4.5 4.5 0 004.5 4.5h8.25a4.5 4.5 0 004.5-4.5v-8.25a4.5 4.5 0 00-4.5-4.5z" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
									<path d="M16.875 8.25a1.125 1.125 0 100-2.25 1.125 1.125 0 000 2.25z" fill="#fff"></path>
								</svg>
							</a>
						</li>
						<li class="nav-social__item">
							<a href="#0" class="nav-social__link" target="_blank" rel="noopener" aria-labelledby="icon-twitter">
								<span id="icon-twitter" hidden>Visit our Twitter page (opens in new tab)</span>
								<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" class="inline-svg">
									<path d="M21 6.86a10.357 10.357 0 01-2.601 2.588h0A10.38 10.38 0 013 18.155h0a10.325 10.325 0 005.677-1.795h0A10.394 10.394 0 014.513 5h0a10.376 10.376 0 007.474 4.652h0a3.244 3.244 0 016.002-2.254h0A10.43 10.43 0 0021 6.859" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
								</svg>
							</a>
						</li>
					</ul>
				</div>
				<!-- .nav-social -->
			</div>
			<!-- .header .header-active -->
		</div>
		<!-- .header__container -->
	</header>
	<!-- header -->

	<figure class="product product__main-image">
		<img src="https://nav-slide-bikes.netlify.app/images/product__main.webp" class="product__item" alt="Motorcycle image">
	</figure>

	<!-- Removed /li to avoid space between icon__caret-right and element -->
	<div class="breadcrumbs">
		<!-- prettier-ignore -->
		<nav aria-label="breadcrumbs">
			<ol class="breadcrumb">
				<li class="breadcrumb__item"><a class="breadcrumb__link" href="#0">Motorcycles</a>
				</li>
				<li class="breadcrumb__item"><a class="breadcrumb__link" href="#0" aria-current="page">Electric</a>
				</li>
			</ol>
		</nav>
	</div>

	<article class="details">
		<h1 class="details__title">LiveWire</h1>
		<p class="details__text">
			<span class="details__bold">A new way to ride. </span>Get instant
			power and acceleration with just a twist of the throttle.
		</p>

		<button class="button button__primary" aria-describedby="button-motorcycle-details">
			<span class="button__primary-text">Details</span>
		</button>
		<span id="button-motorcycle-details" hidden>Open Details Page</span>
	</article>

	<aside class="product product__support-image--horizontal">
		<img src="https://nav-slide-bikes.netlify.app/images/product__support--horizontal.webp" class="product__item" alt="null">
	</aside>

	<aside class="product product__support-image--vertical">
		<img src="https://nav-slide-bikes.netlify.app/images/product__support--vertical.webp" alt="null">
	</aside>
</div>

<!-- Preloading background-images to prevent a flash on initial loading -->
<div class="preload" hidden>
	<img src="https://nav-slide-bikes.netlify.app/images/brandmark__full.svg" alt="null">
</div>
              
            
!

CSS

              
                /* =====================================================================
  -> VARIABLES
===================================================================== */
:root {
	////// -> COLOR PALETTE
	--color-primary: #ff671f;

	////// -> MARGINS AND PADDINGS
	// Base 16
	--spacer-4: 0.25rem;
	--spacer-8: 0.5rem;
	--spacer-16: 1rem;
	--spacer-24: 1.5rem;
	--spacer-32: 2rem;
	--spacer-40: 2.5rem;
	--spacer-48: 3rem;
	--spacer-56: 3.5rem;
	--spacer-64: 4rem;
	--spacer-72: 4.5rem;
	--spacer-80: 5rem;
	--spacer-96: 6rem;
	--spacer-112: 7rem;
	--spacer-128: 8rem;
	--spacer-160: 10rem;
	--spacer-176: 11rem;
	--spacer-192: 12rem;
	--spacer-208: 13rem;
	--spacer-256: 16rem;

	////// -> FONTS
	--font-primary: "Libre Franklin", sans-serif;
	--font-button: "Barlow Semi Condensed", sans-serif;

	////// -> MIX CSS CUSTOM PROPERTIES
	--easing--xl: cubic-bezier(0.8, 0, 0.2, 1);
	--easing--s: cubic-bezier(0.5, 0.7, 0.4, 1);

	--topWrapperHeight: 4rem;
	--headerDefaultWidth: 7rem;
}

/* =====================================================================
  -> ABSTRACTS
===================================================================== */
////// -> MIXINS
@mixin fn_text-properties {
	font-weight: 400;
	font-style: normal;
}

////// -> FUNCTIONS
@function fn_calculate-rem($size) {
	$rem-default: 16;
	$rem-size: $size / $rem-default;
	@return #{$rem-size}rem;
}

@function fn_calculate-lh($lh, $size) {
	@return $lh / $size;
}

/* =====================================================================
  -> BASE
===================================================================== */
////// -> RESET
* {
	margin: 0;
	padding: 0;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

html {
	box-sizing: border-box;
	font-size: 100%; // 1rem = 16px
	font-weight: normal;
	height: 100%;
} //--> html

////// -> GENERAL RULES
body {
	color: #fff;
	background-color: #000;
	height: 100%;
} // -> body

[hidden] {
	display: none !important;
}

/* =====================================================================
  -> TYPOGRAPHY
===================================================================== */
////// -> GENERAL
body {
	font-family: var(--font-primary);
	font-size: inherit;
	font-weight: inherit;
	line-height: fn_calculate-lh(24, 16);
}

////// -> HEADINGS
h1 {
	@include fn_text-properties;

	font-size: fn_calculate-rem(48);
	// font-size: 7.7vw;
	font-weight: 700;
	line-height: fn_calculate-lh(56, 48);
}

////// -> PARTIALS
.navbar {
	@include fn_text-properties;

	font-family: var(--font-button);
	font-size: fn_calculate-rem(28);
	line-height: fn_calculate-lh(56, 28);
	text-transform: uppercase;
}

.breadcrumb {
	@include fn_text-properties;

	font-family: var(--font-button);
	font-size: fn_calculate-rem(18);
	font-weight: 500;

	&__item {
		&:first-child {
			text-transform: uppercase;
		}
	}

	&__link {
		text-decoration: none;
	}
}

.details {
	&__bold {
		font-weight: 700;
	}
}

////// -> COMPONENTS
.button {
	@include fn_text-properties;

	font-family: var(--font-button);
	font-size: fn_calculate-rem(18);
	line-height: fn_calculate-lh(18, 18);

	font-weight: 500;
	text-transform: uppercase;
}

/* =====================================================================
  -> LAYOUT
===================================================================== */
.wrapper {
	display: grid;
	grid-template-rows: var(--topWrapperHeight) minmax(min-content, 19.5rem) 1fr;
	grid-template-columns:
		[grid-start]
		var(--headerDefaultWidth)
		repeat(11, 1fr)
		[grid-end];

	max-width: 120rem; // 1920px
	height: 100%;
	margin: 0 auto;

	@media only screen and (max-width: 1279px) {
		grid-template-columns:
			[grid-start]
			var(--headerDefaultWidth)
			repeat(5, 6rem)
			repeat(6, 1fr)
			[grid-end];
	}

	@media only screen and (max-width: 980px) {
		grid-template-rows:
			36rem var(--topWrapperHeight) minmax(min-content, 19.5rem)
			26rem;
		grid-template-columns:
			[grid-start]
			var(--headerDefaultWidth)
			repeat(11, 1fr)
			[grid-end];
	}

	@media only screen and (max-width: 480px) {
		grid-template-columns:
			[grid-start]
			calc(var(--headerDefaultWidth) - 3rem)
			repeat(11, 1fr)
			[grid-end];
	}
}

.header {
	grid-row: 1 / -1;
	grid-column: grid-start / 7;

	@media only screen and (max-width: 980px) {
		grid-column: grid-start / grid-end;

		position: fixed;
		width: 100%;
	}

	&.is-active {
		z-index: 10;
	}

	&__container {
		display: grid;

		position: relative;
		z-index: 1;

		height: 100%;
	}

	&--default,
	&--active {
		grid-row: 1 / -1;
		grid-column: 1 / grid-end;
	}

	&--default {
		display: flex;
		flex-direction: column;
		align-items: center;

		z-index: 1;
	}

	&--active {
		display: flex;
		flex-direction: column;

		position: relative;
		z-index: 2;

		> .button {
			position: absolute;
			right: var(--spacer-24);
			top: var(--spacer-48);

			@media only screen and (max-width: 480px) {
				top: var(--spacer-40);
			}
		}

		.nav {
			&__link {
				display: inline-block;
			}

			&-social {
				&__items {
					display: flex;
				}
			}
		}
	}
}

.breadcrumbs {
	grid-row: 1 / 2;
	grid-column: 7 / grid-end;

	display: flex;
	align-items: flex-end;

	z-index: 2;

	@media only screen and (max-width: 980px) {
		grid-row: 2 / 3;
		grid-column: 2 / grid-end;
	}
}

.breadcrumb {
	display: flex;
}

.details {
	grid-row: 2 / 3;
	grid-column: 7 / 11;

	z-index: 2;

	@media only screen and (max-width: 1279px) {
		grid-column: 7 / grid-end;
	}

	@media only screen and (max-width: 980px) {
		grid-row: 3 / 4;
		grid-column: 2 / grid-end;
	}
}

.product {
	&__main-image {
		grid-row: 1 / -1;
		grid-column: 2 / 7;

		z-index: 2;

		@media only screen and (max-width: 980px) {
			grid-row: 1 / 2;
			grid-column: 2 / grid-end;
		}
	}

	&__support-image {
		&--horizontal {
			grid-row: 3 / -1;
			grid-column: 7 / grid-end;

			z-index: 2;

			@media only screen and (max-width: 980px) {
				grid-row: 4 / 5;
				grid-column: 2 / grid-end;
			}
		}

		&--vertical {
			grid-row: 2 / -1;
			grid-column: 10 / grid-end;

			z-index: 3;
		}
	}
}

/* =====================================================================
  -> PARTIALS
===================================================================== */
////// -> HEADER
.header {
	height: 100%;
	overflow: hidden;

	&--default,
	&--active {
		background-color: var(--color-primary);
	}

	&--default {
		height: inherit;
		max-width: 7rem;

		@media only screen and (max-width: 480px) {
			max-width: 4rem;
		}
	}

	&--active {
		transform: translateX(-100%);
		height: inherit;
		padding-top: var(--topWrapperHeight);
		padding-left: var(--headerDefaultWidth);
		overflow: hidden;

		@media only screen and (max-width: 480px) {
			padding-top: 3rem;
			padding-left: 3rem;
		}

		&::after {
			content: url(https://nav-slide-bikes.netlify.app/images/brandmark__full.svg);

			position: absolute;
			bottom: 0;
			right: -4rem;

			transform: rotate(-15deg);
			width: 100%;
			max-width: 352px;

			@media only screen and (max-width: 480px) {
				max-width: 232px;
			}
		}

		> .brandmark {
			margin-top: 0;
			margin-bottom: var(--spacer-24);
		}

		.nav {
			list-style: none;

			&__link {
				color: #ffff;
				text-decoration: none;
			}
		}
	}

	&__brandmark {
		margin-top: var(--spacer-32);
	}
}

////// -> BREADCRUMBS
.breadcrumbs {
	background-color: #000;
}

////// -> DETAILS
.details {
	width: 100%;
	max-height: 19.5rem;

	padding: var(--spacer-32) var(--spacer-32) 0 var(--spacer-32);

	background-color: #000;

	@media only screen and (max-width: 980px) {
		padding: var(--spacer-32) var(--spacer-32) var(--spacer-48) var(--spacer-32);
		text-align: center;
	}

	&__title,
	&__text {
		margin-bottom: var(--spacer-24);
		max-width: 32ch;

		@media only screen and (max-width: 1279px) {
			max-width: 50ch;
		}
	}

	&__text {
		@media only screen and (max-width: 980px) {
			margin: 0 auto;
			margin-bottom: var(--spacer-24);
		}
	}
}

////// -> PRODUCT
.product {
	overflow: hidden;

	&__item {
		object-fit: cover;
		height: 100%;
		width: 100%;
	}

	&__support-image {
		&--vertical {
			max-height: 24rem;

			padding-left: var(--spacer-64);
			text-align: right;

			@media only screen and (max-width: 1279px) {
				display: none;
				visibility: hidden;
			}
		}
	}
}

/* =====================================================================
  -> COMPONENTS
===================================================================== */
////// -> BUTTON
.button {
	background-color: transparent;
	border: none;
	cursor: pointer;

	&__open-nav {
		margin-top: var(--spacer-32);
	}

	&__primary {
		height: 3rem;
		width: 14rem;

		color: #fff;
		border: 2px solid var(--color-primary);

		&-text {
			vertical-align: text-top;
		}
	}

	.lines {
		stroke: #fff;
	}
}

////// -> NAV SOCIAL
.nav-social {
	margin-top: auto;
	margin-bottom: var(--spacer-32);

	&__items {
		list-style: none;
		line-height: 0;
	}

	&__item {
		&:not(:last-child) {
			margin-bottom: var(--spacer-8);
		}
	}

	&__link {
		display: inline-block;
		padding: var(--spacer-4);
	}
}

////// -> BREADCRUMB
.breadcrumb {
	list-style: none;
	margin-left: var(--spacer-32);

	&__item {
		&:not(:first-child) {
			&::before {
				content: url(https://nav-slide-bikes.netlify.app/images/icon__caret--right.svg);
				margin-left: var(--spacer-8);
				margin-right: var(--spacer-8);
			}
		}
	}

	&__link {
		color: var(--color-primary);

		&[aria-current="page"] {
			color: #ffffff;
		}
	}
}

              
            
!

JS

              
                function initSlideNavigation() {
	const buttonOpenNav = document.querySelector(".button__open-nav"),
		buttonCloseNav = document.querySelector(".button__close-nav"),
		header = document.querySelector(".header"),
		headerActive = header.querySelector(".header--active"),
		headerDefault = header.querySelector(".header--default"),
		headerActiveChilds = document.querySelectorAll(".header--active > *"),
		headerActiveBrandmark = CSSRulePlugin.getRule(".header--active::after");

	let navOpen = false,
		updateNavStatus;

	function addCloseListener() {
		document.addEventListener("keydown", closeNavigation);
		buttonCloseNav.addEventListener("click", closeNavigation);
	}

	function openNavigation() {
		// Calculate final -header--normal- position based on header width
		function headerPosition(el) {
			const travelDistance = 0.8;
			let width = window.getComputedStyle(el).width,
				xValue = Math.round(parseInt(width, 10) * travelDistance);

			return xValue;
		}

		tlOpenNav
			.call(() => {
				header.classList.add("is-active");
				headerActive.hidden = false;
				updateNavStatus = !navOpen;
				buttonOpenNav.setAttribute("aria-expanded", updateNavStatus);
			})
			.add("slideIn", null)
			.to(headerActive, { duration: 1.4, xPercent: 100 }, "slideIn")
			.to(
				headerDefault,
				{ duration: 1.4, x: () => headerPosition(header) },
				"slideIn"
			)
			.from(headerActiveChilds, { duration: 1, x: -80 }, "slideIn+=.3")
			.fromTo(
				headerActiveBrandmark,
				{ right: "-6.5rem" },
				{ duration: 0.7, right: "-4rem" },
				"slideIn+=.6"
			)
			.call(() => {
				navOpen = true;
			});
	}

	function closeNavigation(e) {
		if (e.type === "keydown") {
			let keyCode = e.keyCode === 27;
			if (!keyCode) return;
		}

		tlCloseNav
			.call(() => {
				updateNavStatus = !navOpen;
				buttonOpenNav.setAttribute("aria-expanded", updateNavStatus);
				navOpen = false;
			})
			.add("slideOut", null)
			.to(headerActive, { duration: 1, xPercent: 0 }, "slideOut")
			.to(headerDefault, { duration: 0.9, x: 0 }, "slideOut+=.1")
			.fromTo(
				headerActiveBrandmark,
				{ right: "-4rem" },
				{
					right: "-6.5rem",
					duration: 0.6
				},
				"slideOut"
			)
			.call(() => {
				headerActive.hidden = true;
				header.classList.remove("is-active");
			});

		document.removeEventListener("keydown", closeNavigation);
	}

	// GSAP Timelines
	const tlOpenNav = gsap.timeline({
		defaults: { ease: "power3.out" },
		onComplete: () => addCloseListener()
	});

	const tlCloseNav = gsap.timeline({
		defaults: { ease: "power1.in" }
	});

	// Event Listeners
	buttonOpenNav.addEventListener("click", openNavigation);
}

function init() {
	initSlideNavigation();
}

window.addEventListener("load", function () {
	init();
});

              
            
!
999px

Console