HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<svg style="display: none;">
<symbol id="arrow-right" viewBox="0 0 25.17 18.85">
<path d="M0,8H21.8v2.81H0Z" fill="#079eba" />
<path d="M15.75,18.85l-2-2,7.46-7.46L13.78,2l2-2,9.42,9.42Z" fill="#079eba" />
</symbol>
<symbol viewBox="0 0 32 32" id="offer" xmlns="http://www.w3.org/2000/svg">
<path
d="M28,11.66a4.61,4.61,0,0,0-4.6-3.8l-.52-2.95A2.32,2.32,0,0,0,20.16,3a2.42,2.42,0,0,0-1.11.52L15.78,6.33a5.77,5.77,0,0,1-2.7,1.27L6.23,8.8a3.93,3.93,0,0,0-3.17,4.54L4,18.59a3.91,3.91,0,0,0,4.53,3.18l1-.18.68,3.82h0a2.88,2.88,0,1,0,5.67-1l-.67-3.81.18,0h0a5.78,5.78,0,0,1,3,.27l4,1.49a2.31,2.31,0,0,0,3-1.36,2.24,2.24,0,0,0,.11-1.2l-.51-2.94a4.63,4.63,0,0,0,3-5.16ZM13.29,26.37a1.49,1.49,0,0,1-1.71-1.2l-.67-3.82,2.88-.51.68,3.82a1.47,1.47,0,0,1-1.18,1.7Zm10.45-5.54a.88.88,0,0,1-.88.16l-4-1.49a7.11,7.11,0,0,0-3.71-.33l-6.84,1.2a2.51,2.51,0,0,1-2.9-2l-.93-5.26a2.52,2.52,0,0,1,2-2.9L13.33,9a7.16,7.16,0,0,0,3.36-1.58L20,4.63h0a.9.9,0,0,1,1.27.12.81.81,0,0,1,.19.41l.63,3.53v.06l1.36,7.66v0a0,0,0,0,0,0,0L24.05,20h0a.88.88,0,0,1-.31.84Zm.94-5.44L23.6,9.27a3.2,3.2,0,0,1,1.08,6.12Z" />
</symbol>
<symbol viewBox="0 0 32 32" id="home" xmlns="http://www.w3.org/2000/svg">
<path
d="M24.85,12.89v11c0,.5,0,1,0,1.52v0l.88-.88h-7l.87.88V19.6A7.42,7.42,0,0,0,19.48,18a3.51,3.51,0,0,0-2.83-2.72,3.66,3.66,0,0,0-2.23.35A3.43,3.43,0,0,0,13,17.08a3.54,3.54,0,0,0-.44,1.71v6.6l.88-.88h-7l.88.88v-11c0-.51,0-1,0-1.53v0a.88.88,0,0,0-1.76,0v11c0,.5,0,1,0,1.52v0a.89.89,0,0,0,.88.88h7.05a.89.89,0,0,0,.88-.88V19.47a7.34,7.34,0,0,1,0-1l0,.23a2.34,2.34,0,0,1,.18-.64l-.09.21a2.38,2.38,0,0,1,.23-.45l.07-.09c.08-.13-.16.18,0,0s.11-.13.17-.18l.17-.16c.15-.12-.1.07-.05,0l.12-.07a3.09,3.09,0,0,1,.44-.24l-.21.09a2.74,2.74,0,0,1,.64-.17l-.23,0a2.89,2.89,0,0,1,.72,0l-.23,0a2.74,2.74,0,0,1,.64.17l-.21-.09a3.21,3.21,0,0,1,.45.24l.09.06c.13.09-.18-.15,0,0l.18.17a1.29,1.29,0,0,1,.16.17c.12.14-.07-.1,0-.05a.76.76,0,0,1,.08.11,2.64,2.64,0,0,1,.23.44L17.63,18a2.52,2.52,0,0,1,.18.65l0-.24a6.76,6.76,0,0,1,0,.9v6.08a.9.9,0,0,0,.88.88h7.05a.89.89,0,0,0,.88-.88v-11c0-.51,0-1,0-1.52v0a.87.87,0,0,0-.88-.88.89.89,0,0,0-.87.88Z" />
<path id="Path_34" data-name="Path 34"
d="M4.49,15.61l1.2-1.11,2.87-2.66L12,8.63l3-2.77c.49-.45,1-.89,1.46-1.35l0,0H15.24L16.47,5.6l3,2.66L23,11.46l3.08,2.78,1.5,1.35,0,0a.88.88,0,1,0,1.26-1.22l0,0L27.6,13.26l-3-2.66L21.08,7.39,18,4.62c-.5-.45-1-.91-1.5-1.35l0,0a.9.9,0,0,0-1.24,0L14,4.36,11.17,7l-3.45,3.2L4.73,13c-.49.45-1,.89-1.46,1.35l0,0a.88.88,0,0,0,0,1.24.9.9,0,0,0,1.24,0Z" />
</symbol>
<symbol viewBox="0 0 32 32" id="courses" xmlns="http://www.w3.org/2000/svg">
<path id="np_chat_1659587_000000" data-name="np chat 1659587 000000"
d="M5.27,5A1.19,1.19,0,0,0,4.09,6.2v7.53l-2,3.13a.58.58,0,0,0,.17.82.56.56,0,0,0,.33.1H4.09v.48a1.18,1.18,0,0,0,1.18,1.19H7.93v3.36A1.2,1.2,0,0,0,9.12,24H26.67a1.2,1.2,0,0,0,1.19-1.21v-.57h1.49a.6.6,0,0,0,.6-.59.64.64,0,0,0-.1-.33l-2-3.06V10.65a1.19,1.19,0,0,0-1.19-1.19H24V6.2A1.19,1.19,0,0,0,22.83,5Zm0,1.19H22.83V18.26H5.27V17.19a.59.59,0,0,0-.59-.6h-1l1.5-2.38a.62.62,0,0,0,.09-.32V6.2ZM7.89,8.57a.59.59,0,0,0-.48.69.61.61,0,0,0,.54.5H20.13a.6.6,0,0,0,.62-.57.59.59,0,0,0-.57-.62H7.89ZM24,10.65h2.66v7.8a.52.52,0,0,0,.09.32l1.48,2.28h-1a.58.58,0,0,0-.59.59h0v1.19H9.12V19.45H22.83A1.2,1.2,0,0,0,24,18.26Zm-16.13.89A.6.6,0,0,0,8,12.73H20.13a.59.59,0,0,0,.62-.57.59.59,0,0,0-.57-.62H7.89Zm0,3a.61.61,0,0,0-.49.69.61.61,0,0,0,.55.5h7.13a.6.6,0,1,0,.05-1.19H7.89Z"
style="isolation: isolate" />
</symbol>
<symbol viewBox="0 0 32 32" id="categories" xmlns="http://www.w3.org/2000/svg">
<path id="np_lesson_269257_000000" data-name="np lesson 269257 000000"
d="M27.55,21.5H26.5V6.83a.78.78,0,0,0-.78-.78H6.39a.78.78,0,0,0-.78.78V21.5h-1V6.83A1.83,1.83,0,0,1,6.39,5H25.72a1.84,1.84,0,0,1,1.83,1.83Zm-2.62-.57h4.18V22H24.93ZM3,20.93H21.54v1H3Zm16-6.61,8.11,11.53-.85.6L18.1,14.92ZM9.53,12.05H22.58v1h-13Zm0-2.61H22.58v1h-13Zm0,5.22H15v1.05H9.53Z"
style="isolation: isolate" />
</symbol>
<symbol viewBox="0 0 32 32" id="search" xmlns="http://www.w3.org/2000/svg">
<path id="np_search_2043599_000000" data-name="np search 2043599 000000"
d="M21.74,20.33a10.58,10.58,0,1,0-1.41,1.41L27.58,29,29,27.59Zm-8.16,1.85a8.6,8.6,0,1,1,8.59-8.6A8.6,8.6,0,0,1,13.58,22.18Z" />
</symbol>
</svg>
<header class="site-header">
<div class="container site-header__wrapper">
<picture class="logo">
<source srcset="https://ishadeed.com/logo-full.svg" media="(min-width: 880px)">
<img src="https://ishadeed.com/logo-small.svg" />
</picture>
<nav class="main-nav">
<button class="main-nav__toggle" aria-label="Menu">
<span class="main-nav__toggle__icon"></span>
</button>
<ul>
<li class="main-nav__item is-active">
<a href="#">
<svg width="24" height="24">
<use xlink:href="#home"></use>
</svg>
Home
</a>
</li>
<li class="main-nav__item">
<a href="#">
<svg width="24" height="24">
<use xlink:href="#courses"></use>
</svg>
Courses
</a>
</li>
<li class="main-nav__item">
<a href="#">
<svg width="24" height="24">
<use xlink:href="#offer"></use>
</svg>
Offers
</a>
</li>
<li class="main-nav__item">
<a href="#">
<svg width="24" height="24">
<use xlink:href="#categories"></use>
</svg>
Categories <span class="pill">New</span>
</a>
</li>
</ul>
</nav>
<div class="site-header__section">
<button class="search-form__toggle">
<span class="visually-hidden">Search</span>
<svg class="search-form__icon" width="24" height="24">
<use xlink:href="#search"></use>
</svg>
</button>
<form class="search-form">
<label for="search"></label>
<input type="search" name="" id="search" placeholder="What do you want to learn?">
<button class="search-form__button">
<span class="visually-hidden">Search</span>
<svg class="search-form__icon" width="24" height="24">
<use xlink:href="#search"></use>
</svg>
</button>
</form>
<a href="link-to-profile/" class="user-avatar">
<img class="avatar" src="https://ishadeed.com/shadeed.jpg" alt="Ahmad Shadeed">
</a>
</div>
</div>
</header>
<section class="hero">
<img src="img/hero-cover.jpg" alt="" />
<h2>What do you want to learn today?</h2>
<form class="hero-search" action="">
<label for="search" class="visually-hidden">Search for a course or a topic</label>
<input type="text" placeholder="Search for a course or a topic" />
<button aria-label="Search">
<span>Search</span>
<svg class="search-form__icon" width="24" height="24">
<use xlink:href="#search"></use>
</svg>
</button>
</form>
<ul class="pills-list">
<li><a href="#" class="pill pill--outline">Technology</a></li>
<li><a href="#" class="pill pill--outline">Design</a></li>
<li><a href="#" class="pill pill--outline">Business</a></li>
<li><a href="#" class="pill pill--outline">Photography</a></li>
<li><a href="#" class="pill pill--outline">Drawing</a></li>
<li><a href="#" class="pill pill--outline">Programing</a></li>
</ul>
</section>
<section class="hero hero--logged">
<h2>Welcome Back, <strong>Ahmad</strong></h2>
<p>Continue from where you left the last time</p>
</section>
<section class="section">
<div class="wrapper">
<header class="section-header">
<div class="section-header__start">
<h2 class="section__title">Top Courses</h2>
</div>
<div class="section-header__end">
<a href="#">
<span>View All</span>
<svg width="18" height="13">
<use xlink:href="#arrow-right"></use>
</svg>
</a>
</div>
</header>
<ol class="l-grid l-grid-4 top-courses">
<li>
<article class="course">
<a href="#">
<div class="course__thumb">
<img src="//via.placeholder.com/528x294" alt="" />
</div>
<div class="course__details">
<h2 class="course__title">
The Process of Implementing a UI Design From Scratch
</h2>
<!-- <div class="course__progress">
<label for="completion" class="visually-hidden">Course Completion:</label>
<meter class="meter" id="completion" name="fuel" min="0" max="100" low="33" high="66" optimum="80"
value="80">
at 50/100
</meter>
</div> -->
<div class="course__progress" aria-label="50% done"></div>
<p class="course__author">
Ahmad Shadeed</p>
</div>
</a>
</article>
</li>
<li>
<article class="course">
<a href="#">
<div class="course__thumb">
<img src="//via.placeholder.com/528x294" alt="" />
</div>
<div class="course__details">
<h2 class="course__title">
The Process of Implementing a UI Design From Scratch. Adding more content to show how this thing will behave.
</h2>
<!-- <div class="course__progress">
<label for="completion" class="visually-hidden">Course Completion:</label>
<meter class="meter" id="completion" name="fuel" min="0" max="100" low="33" high="66" optimum="80"
value="80">
at 50/100
</meter>
</div> -->
<div class="course__progress" aria-label="50% done"></div>
<p class="course__author">
Ahmad Shadeed</p>
</div>
</a>
</article>
</li>
<li>
<article class="course">
<a href="#">
<div class="course__thumb">
<img src="//via.placeholder.com/528x294" alt="" />
</div>
<div class="course__details">
<h2 class="course__title">
The Process of Implementing a UI Design From Scratch
</h2>
<!-- <div class="course__progress">
<label for="completion" class="visually-hidden">Course Completion:</label>
<meter class="meter" id="completion" name="fuel" min="0" max="100" low="33" high="66" optimum="80"
value="80">
at 50/100
</meter>
</div> -->
<div class="course__progress" aria-label="50% done"></div>
<p class="course__author">
Ahmad Shadeed</p>
</div>
</a>
</article>
</li>
<li>
<article class="course">
<a href="#">
<div class="course__thumb">
<img src="//via.placeholder.com/528x294" alt="" />
</div>
<div class="course__details">
<h2 class="course__title">
The Process of Implementing a UI Design From Scratch
</h2>
<!-- <div class="course__progress">
<label for="completion" class="visually-hidden">Course Completion:</label>
<meter class="meter" id="completion" name="fuel" min="0" max="100" low="33" high="66" optimum="80"
value="80">
at 50/100
</meter>
</div> -->
<div class="course__progress" aria-label="50% done"></div>
<p class="course__author">
Ahmad Shadeed</p>
</div>
</a>
</article>
</li>
</ol>
</div>
</section>
<div class="wrapper" style="margin-top: 20px;">
<article class="course is-featured" style="width: 50%;">
<a href="#">
<div class="course__thumb">
<img src="//via.placeholder.com/528x294" alt="" />
</div>
<div class="course__details">
<h2 class="course__title">
The Process of Implementing a UI Design From Scratch
</h2>
<div class="course__progress" aria-label="50% done"></div>
<p class="course__author">
Ahmad Shadeed</p>
</div>
</a>
</article>
</div>
:root {
--color-brand-primary: #06aed5; }
p {
margin: 0; }
body {
background: #f7f7f7;
margin: 0;
font-family: 'Roboto', sans-serif; }
* {
box-sizing: border-box; }
ul {
list-style: none;
padding: 0;
margin: 0; }
a {
text-decoration: none;
color: #000; }
.visually-hidden {
position: absolute;
overflow: hidden;
clip: rect(0 0 0 0);
height: 1px;
width: 1px;
margin: -1px;
padding: 0;
border: 0; }
.avatar {
width: 38px;
height: 38px;
border-radius: 50%; }
.pill {
display: inline-block;
background: var(--color-brand-primary);
color: #fff;
text-transform: uppercase;
font-size: 13px;
letter-spacing: 0.5px;
border-radius: 20px;
font-weight: 700;
padding: 3px 7px; }
.pill--outline {
text-transform: initial;
background: transparent;
color: #fff;
border: 1px solid rgba(255, 255, 255, 0.5);
font-weight: 400;
padding: 3px 10px; }
.site-header {
position: relative;
padding: 0 16px;
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.05);
background-color: #fff;
background-image: -webkit-linear-gradient(left, #07859D, #079EBA);
background-image: linear-gradient(to right, #07859D, #079EBA);
background-size: 100% 5px;
background-repeat: no-repeat;
padding-top: 5px; }
.site-header__wrapper {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-flex-wrap: wrap;
flex-wrap: wrap; }
@media (max-width: 570px) {
.site-header__wrapper {
padding: 0.5rem 0;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between; } }
@media (max-width: 570px) {
.main-nav {
-webkit-box-ordinal-group: 0;
-webkit-order: -1;
order: -1; } }
.main-nav ul {
display: -webkit-box;
display: -webkit-flex;
display: flex;
height: 100%; }
@media (max-width: 570px) {
.main-nav ul {
position: absolute;
left: 0;
right: 0;
top: 100%;
display: block;
height: initial;
background: whitesmoke;
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
z-index: -1;
visibility: hidden;
-webkit-transition: 0.3s ease-out;
transition: 0.3s ease-out; }
.main-nav ul.is-active {
visibility: visible;
-webkit-transform: translateY(0);
transform: translateY(0); } }
.main-nav__item a {
display: block;
padding: 16px 12px;
text-align: center;
border-bottom: 2px solid transparent; }
@media (min-width: 1250px) {
.main-nav__item a {
padding: 20px 24px; } }
@media (max-width: 570px) {
.main-nav__item a {
text-align: initial;
border-bottom: 0;
border-left: 3px solid transparent; } }
.main-nav__item a:hover {
border-bottom-color: var(--color-brand-primary);
color: var(--color-brand-primary); }
.main-nav__item svg {
display: none;
vertical-align: middle;
width: 26px;
height: 26px;
fill: #639fb4; }
@media (min-width: 1150px) {
.main-nav__item svg {
display: inline-block; } }
@media (max-width: 570px) {
.main-nav__item svg {
display: inline-block; } }
.main-nav__item.is-active a {
color: var(--color-brand-primary);
border-bottom-color: currentColor;
font-weight: 700; }
.main-nav__item.is-active svg {
fill: currentColor; }
@media (max-width: 1150px) {
.main-nav__item.is-active svg {
display: inline-block;
margin-top: -4px; } }
@media (max-width: 570px) {
.main-nav__item.is-active a {
border-left-color: var(--color-brand-primary); } }
@media (max-width: 570px) {
.main-nav__item:not(:last-child) {
border-bottom: 1px solid #e1e0e0; } }
.user-avatar img {
width: 36px;
height: 36px; }
.logo {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
margin-right: 16px; }
.logo img {
position: relative;
top: -3px; }
@media (max-width: 570px) {
.logo {
margin-right: 0;
margin-left: 16px; } }
.site-header__section {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
margin-left: auto; }
.site-header__section > * + * {
margin-left: 8px; }
@media (max-width: 570px) {
.site-header__section {
margin-left: initial;
-webkit-box-flex: initial;
-webkit-flex: initial;
flex: initial; } }
.search-form {
position: relative;
-webkit-transition: -webkit-transform 0.3s ease-out;
transition: -webkit-transform 0.3s ease-out;
transition: transform 0.3s ease-out;
transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out; }
@media (max-width: 700px) {
.search-form {
position: absolute;
left: 0;
right: 0;
top: 100%;
z-index: -1;
padding: 8px;
background: #06aed5;
margin-left: 0;
visibility: hidden;
-webkit-transform: translateY(-100%);
transform: translateY(-100%); }
.search-form.is-active {
visibility: visible;
-webkit-transform: translateY(0);
transform: translateY(0); } }
.search-form input {
display: inline-block;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 100%;
background-color: #f7f7F7;
border: 0;
border-radius: 50px;
font-size: 16px;
padding: 9px 38px 10px 16px;
-webkit-transition: 0.3s ease-out;
transition: 0.3s ease-out; }
.search-form input:focus {
background-color: var(--color-brand-primary);
color: #fff; }
@media (max-width: 700px) {
.search-form input {
background-color: #fff; } }
.search-form:focus-within .search-form__icon {
fill: #fff; }
.search-form__button {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: 0;
background: transparent;
position: absolute;
right: 0;
top: 0;
width: 38px;
height: 100%; }
@media (max-width: 700px) {
.search-form__button {
height: initial;
right: 10px;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%); } }
.search-form__icon {
width: 22px;
-webkit-box-flex: 0;
-webkit-flex: 0 0 22px;
flex: 0 0 22px;
height: 22px;
fill: #858585; }
.search-form__toggle {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 38px;
height: 38px;
background-color: #f7f7F7;
border: 0;
border-radius: 50%;
display: none; }
@media (max-width: 700px) {
.search-form__toggle {
display: block; } }
.search-form__toggle.is-active {
background: var(--color-brand-primary); }
.search-form__toggle.is-active svg {
fill: #fff; }
.main-nav__toggle {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 38px;
height: 38px;
background-color: #f7f7F7;
border: 0;
border-radius: 50%;
display: none; }
@media (max-width: 570px) {
.main-nav__toggle {
display: block; } }
.main-nav__toggle.is-active {
background-color: var(--color-brand-primary); }
.main-nav__toggle.is-active .main-nav__toggle__icon {
background: transparent; }
.main-nav__toggle.is-active .main-nav__toggle__icon:before, .main-nav__toggle.is-active .main-nav__toggle__icon:after {
background-color: #fff; }
.main-nav__toggle.is-active .main-nav__toggle__icon:before {
-webkit-transform-origin: right top;
transform-origin: right top;
-webkit-transform: rotate(-45deg) translate(-2px, -4px);
transform: rotate(-45deg) translate(-2px, -4px); }
.main-nav__toggle.is-active .main-nav__toggle__icon:after {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate(45deg) translate(-8px, -11px);
transform: rotate(45deg) translate(-8px, -11px); }
.main-nav__toggle__icon {
position: relative;
display: block;
height: 2px;
background: #858585;
border-radius: 2px; }
.main-nav__toggle__icon:after, .main-nav__toggle__icon:before {
content: "";
position: relative;
display: block;
width: 100%;
height: 2px;
background: #858585;
border-radius: 2px;
-webkit-transition: 0.2s ease-out;
transition: 0.2s ease-out; }
.main-nav__toggle__icon:after {
top: 4px; }
.main-nav__toggle__icon:before {
top: -6px; }
body {
min-height: 2000px; }
.hero {
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
min-height: 170px;
text-align: center;
padding-left: 1rem;
padding-right: 1rem;
margin-bottom: 1rem; }
@media (min-width: 570px) {
.hero {
min-height: calc(200px + 9vmax); } }
.hero > * + * {
margin-top: 1rem; }
.hero h2 {
margin: 0;
font-size: 18px;
color: #fff;
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.2); }
@media (min-width: 570px) {
.hero h2 {
font-size: 24px; } }
.hero img {
position: absolute;
left: 0;
top: 0;
z-index: -1;
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='tint'><feColorMatrix type='matrix' values='0.03 0 0 0 0 0 0.62 0 0 0 0 0 0.73 0 0 0 0 0 0.69 0'/></filter></svg>#tint");
background: var(--color-brand-primary); }
.hero--logged {
min-height: 200px;
background: var(--color-brand-primary) url("../img/hero-pattern.svg") center/contain;
display: none; }
.hero--logged h2,
.hero--logged p {
color: #fff;
text-shadow: none; }
.pills-list {
position: relative;
-webkit-mask-image: -webkit-linear-gradient(left, #000 70%, transparent);
mask-image: linear-gradient(to right, #000 70%, transparent); }
@media (max-width: 570px) {
.pills-list {
display: -webkit-box;
display: -webkit-flex;
display: flex;
overflow-y: scroll;
-webkit-overflow-scrolling: touch; } }
.pills-list li {
display: inline-block;
margin-left: 2px; }
.pills-list a {
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.2); }
.pills-list:after1 {
content: "";
position: fixed;
right: 16px;
height: 22px;
margin-top: -1px;
width: 30px;
background: -webkit-linear-gradient(right, #6cced5, transparent);
background: linear-gradient(to left, #6cced5, transparent); }
.hero-search {
display: -webkit-box;
display: -webkit-flex;
display: flex;
width: 520px;
max-width: 100%;
margin-left: auto;
margin-right: auto;
position: relative;
background: #fff;
background-clip: content-box;
border: 3px solid rgba(255, 255, 255, 0.5);
border-radius: 50px; }
@media (min-width: 570px) {
.hero-search {
border-width: 5px; } }
.hero-search input {
display: inline-block;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
min-width: 0;
width: 100%;
background-color: transparent;
border: 0;
border-radius: 50px;
font-size: 16px;
padding: 6px 8px 6px; }
@media (min-width: 570px) {
.hero-search input {
padding: 9px 8px 10px; } }
.hero-search button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 31px;
background-color: var(--color-brand-primary);
color: #fff;
border-radius: 50px;
border: 0;
font-size: 16px; }
.hero-search button span {
display: none; }
.hero-search button svg {
fill: #fff; }
@media (max-width: 570px) {
.hero-search button {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center; } }
@media (min-width: 570px) {
.hero-search button {
width: auto;
min-width: 100px;
height: auto; }
.hero-search button svg {
display: none; }
.hero-search button span {
display: inline; } }
.section-header {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
margin-bottom: 1rem; }
.section__title {
font-size: 16px;
color: #4e4e4e;
margin: 0; }
.section__title svg {
display: inline-block;
vertical-align: middle; }
ol {
list-style: none;
padding: 0;
margin: 0; }
ol li {
padding: 0; }
.course__thumb {
position: relative;
height: 0;
padding-bottom: 50%; }
.course__thumb img {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
max-width: 100%;
border-top-left-radius: 3px;
border-top-right-radius: 3px; }
.course__details {
padding: 8px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
background: #fff;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
box-shadow: 0 3px 7px 0 rgba(0, 0, 0, 0.08); }
.course__details > *:not(:last-child) {
margin-bottom: 0.5rem; }
.course__title {
margin: 0;
font-size: 16px;
font-weight: normal;
color: #4e4e4e; }
.course__author {
color: #7b7b7b;
font-size: 14px; }
.course__progress {
position: relative;
width: 86px;
height: 5px;
-webkit-box-ordinal-group: 0;
-webkit-order: -1;
order: -1;
background: #efefef;
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='87px' height='5px' viewBox='0 0 87 1'%3E%3Cline class='st0' x1='0' y1='0.5' x2='87' y2='0.5' stroke='%23000' stroke-width='4px' stroke-dasharray='9' stroke-dashoffset='16' stroke-linecap='round'/%3E%3C/svg%3E");
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='87px' height='5px' viewBox='0 0 87 1'%3E%3Cline class='st0' x1='0' y1='0.5' x2='87' y2='0.5' stroke='%23000' stroke-width='4px' stroke-dasharray='9' stroke-dashoffset='16' stroke-linecap='round'/%3E%3C/svg%3E"); }
.course__progress:after {
content: "";
position: absolute;
left: 0;
top: 0;
width: 70%;
height: 100%;
background: #f0c808;
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='87px' height='5px' viewBox='0 0 87 1'%3E%3Cline class='st0' x1='0' y1='0.5' x2='87' y2='0.5' stroke='%23F0C808' stroke-width='4px' stroke-dasharray='9' stroke-dashoffset='16' stroke-linecap='round'/%3E%3C/svg%3E");
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='87px' height='5px' viewBox='0 0 87 1'%3E%3Cline class='st0' x1='0' y1='0.5' x2='87' y2='0.5' stroke='%23F0C808' stroke-width='4px' stroke-dasharray='9' stroke-dashoffset='16' stroke-linecap='round'/%3E%3C/svg%3E"); }
.course1.is-featured {
position: relative; }
.course1.is-featured:after {
content: "";
position: absolute;
left: -4px;
top: -4px;
border: 50px solid #ffb202;
border-right-color: transparent;
border-bottom-color: transparent;
border-radius: 13px; }
.course.is-featured {
position: relative; }
.course.is-featured:after {
content: "\2605";
position: absolute;
left: -6px;
top: -6px;
width: 100px;
height: 100px;
background: #ffb202;
border-radius: 10px;
-webkit-clip-path: polygon(0 0, 100% 0, 100% 0, 0% 100%);
clip-path: polygon(0 0, 100% 0, 100% 0, 0% 100%);
line-height: 56px;
padding-left: 17px;
box-sizing: border-box;
color: #4E4E4E;
font-size: 28px; }
.course.is-featured:before {
content: "";
position: absolute;
top: 28px;
left: 3px;
width: 100px;
height: 6px;
border-top-right-radius: 5px;
border-top-left-radius: 5px;
background: #ffb202;
z-index: 1;
-webkit-transform: rotate(-45deg) scaleX(1.32) translateX(-12px);
transform: rotate(-45deg) scaleX(1.32) translateX(-12px); }
.wrapper {
max-width: 73rem;
padding-left: 16px;
padding-right: 16px;
margin-left: auto;
margin-right: auto; }
.l-grid-4 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
grid-gap: 24px; }
@media (min-width: 1180px) {
.l-grid-4 {
grid-gap: 30px; } }
.l-grid-4 li article {
height: 100%; }
.l-grid-4 li article > a {
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column; }
.l-grid-4 li .course__details {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
flex-grow: 1; }
@media (max-width: 450px) {
.top-courses {
grid-gap: 16px; }
.course.course a {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row; }
.course__details {
border-bottom-left-radius: 0;
border-top-right-radius: 3px; }
.course__thumb {
-webkit-box-flex: 0;
-webkit-flex: 0 0 120px;
flex: 0 0 120px;
height: 120px;
padding-bottom: 0; }
.course__thumb img {
border-top-right-radius: 0;
border-bottom-left-radius: 3px; }
.course__title {
font-size: 14px; } }
@media (max-width: 480px) {
.course.is-featured {
display: none;
}
}
var searchToggle = document.querySelector('.search-form__toggle');
var searchForm = document.querySelector('.search-form');
var navToggle = document.querySelector('.main-nav__toggle');
var navList = document.querySelector('.main-nav ul');
searchToggle.addEventListener('click', function(){
this.classList.toggle('is-active');
searchForm.classList.toggle('is-active');
navList.classList.remove('is-active');
navToggle.classList.remove('is-active');
});
navToggle.addEventListener('click', function () {
this.classList.toggle('is-active');
navList.classList.toggle('is-active');
searchForm.classList.remove('is-active');
searchToggle.classList.remove('is-active');
});
Also see: Tab Triggers