diff --git a/docs/blob.0b90d97e.png b/docs/blob.04a97260.png similarity index 100% rename from docs/blob.0b90d97e.png rename to docs/blob.04a97260.png diff --git a/docs/favicon-32x32.7c1b17bc.png b/docs/favicon-32x32.ce990b8a.png similarity index 100% rename from docs/favicon-32x32.7c1b17bc.png rename to docs/favicon-32x32.ce990b8a.png diff --git a/docs/index.html b/docs/index.html index 870310e79..d9c8bff78 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ - 30 Seconds of CSS

30 Seconds of CSS

A curated collection of useful CSS snippets you can understand in 30 seconds or less.

Bouncing loaderanimation

Creates a bouncing loader animation.

HTML

<div class="bouncing-loader">
+    30 Seconds of CSS                   

30 Seconds of CSS

A curated collection of useful CSS snippets you can understand in 30 seconds or less.

Bouncing loaderanimation

Creates a bouncing loader animation.

HTML

<div class="bouncing-loader">
   <div></div>
   <div></div>
   <div></div>
@@ -27,7 +27,7 @@
 .bouncing-loader > div:nth-child(3) {
   animation-delay: 0.4s;
 }
-

Demo

Explanation

Note: 1rem is usually 16px.

  1. @keyframes defines an animation that has two states, where the element changes opacity and is translated up on the 2D plane using transform: translate3d(). Using a single axis translation on transform: translate3d() improves the performance of the animation.

  2. .bouncing-loader is the parent container of the bouncing circles and uses display: flex and justify-content: center to position them in the center.

  3. .bouncing-loader > div, targets the three child divs of the parent to be styled. The divs are given a width and height of 1rem, using border-radius: 50% to turn them from squares to circles.

  4. margin: 3rem 0.2rem specifies that each circle has a top/bottom margin of 3rem and left/right margin of 0.2rem so that they do not directly touch each other, giving them some breathing room.

  5. animation is a shorthand property for the various animation properties: animation-name, animation-duration, animation-iteration-count, animation-direction are used.

  6. nth-child(n) targets the element which is the nth child of its parent.

  7. animation-delay is used on the second and third div respectively, so that each element does not start the animation at the same time.

Browser support

95.3%

✅ No caveats.

Box-sizing resetlayout

Resets the box-model so that widths and heights are not affected by their borders or padding.

HTML

<div class="box">border-box</div>
+

Demo

Explanation

Note: 1rem is usually 16px.

  1. @keyframes defines an animation that has two states, where the element changes opacity and is translated up on the 2D plane using transform: translate3d(). Using a single axis translation on transform: translate3d() improves the performance of the animation.

  2. .bouncing-loader is the parent container of the bouncing circles and uses display: flex and justify-content: center to position them in the center.

  3. .bouncing-loader > div, targets the three child divs of the parent to be styled. The divs are given a width and height of 1rem, using border-radius: 50% to turn them from squares to circles.

  4. margin: 3rem 0.2rem specifies that each circle has a top/bottom margin of 3rem and left/right margin of 0.2rem so that they do not directly touch each other, giving them some breathing room.

  5. animation is a shorthand property for the various animation properties: animation-name, animation-duration, animation-iteration-count, animation-direction are used.

  6. nth-child(n) targets the element which is the nth child of its parent.

  7. animation-delay is used on the second and third div respectively, so that each element does not start the animation at the same time.

Browser support

93.4%

✅ No caveats.

Box-sizing resetlayout

Resets the box-model so that widths and heights are not affected by their borders or padding.

HTML

<div class="box">border-box</div>
 <div class="box content-box">content-box</div>
 

CSS

html {
   box-sizing: border-box;
@@ -49,20 +49,20 @@
 .content-box {
   box-sizing: content-box;
 }
-

Demo

border-box
content-box

Explanation

  1. box-sizing: border-box makes the addition of padding or borders not affect an element's width or height.
  2. box-sizing: inherit makes an element respect its parent's box-sizing rule.

Browser support

98.4%

✅ No caveats.

Calc()other

The function calc() allows to define CSS values with the use of mathematical expressions, the value adopted for the property is the result of a mathematical expression.

HTML

<div class="box-example"></div>
+

Demo

border-box
content-box

Explanation

  1. box-sizing: border-box makes the addition of padding or borders not affect an element's width or height.
  2. box-sizing: inherit makes an element respect its parent's box-sizing rule.

Browser support

95.9%

✅ No caveats.

Calc()other

The function calc() allows to define CSS values with the use of mathematical expressions, the value adopted for the property is the result of a mathematical expression.

HTML

<div class="box-example"></div>
 

CSS

.box-example {
   height: 280px;
   background: #222 url('https://image.ibb.co/fUL9nS/wolf.png') no-repeat;
   background-position: calc(100% - 20px) calc(100% - 20px);
 }
-

Demo

If you want to align a background-image from right and bottom wasn't possible with just straight length values. So now it's possible using calc():

Background-image in the right/bottom

Explanation

  1. It allows addition, subtraction, multiplication and division.
  2. Can use different units (pixel and percent together, for example) for each value in your expression.
  3. It is permitted to nest calc() functions.
  4. It can be used in any property that <length>, <frequency>, <angle>, <time>, <number>, <color>, or <integer> is allowed, like width, height, font-size, top, left, etc.

Browser support

94.9%

✅ No caveats.

Circlevisual

Creates a circle shape with pure CSS.

HTML

<div class="circle"></div>
+

Demo

If you want to align a background-image from right and bottom wasn't possible with just straight length values. So now it's possible using calc():

Background-image in the right/bottom

Explanation

  1. It allows addition, subtraction, multiplication and division.
  2. Can use different units (pixel and percent together, for example) for each value in your expression.
  3. It is permitted to nest calc() functions.
  4. It can be used in any property that <length>, <frequency>, <angle>, <time>, <number>, <color>, or <integer> is allowed, like width, height, font-size, top, left, etc.

Browser support

93.0%

✅ No caveats.

Circlevisual

Creates a circle shape with pure CSS.

HTML

<div class="circle"></div>
 

CSS

.circle {
   border-radius: 50%;
   width: 2rem;
   height: 2rem;
   background: #333;
 }
-

Demo

Explanation

border-radius: 50% curves the borders of an element to create a circle.

Since a circle has the same radius at any given point, the width and height must be the same. Differing values will create an ellipse.

Browser support

95.5%

✅ No caveats.

Clearfixlayout

Ensures that an element self-clears its children.

Note: This is only useful if you are still using float to build layouts. Please consider using a modern approach with flexbox layout or grid layout.

HTML

<div class="clearfix">
+

Demo

Explanation

border-radius: 50% curves the borders of an element to create a circle.

Since a circle has the same radius at any given point, the width and height must be the same. Differing values will create an ellipse.

Browser support

93.7%

✅ No caveats.

Clearfixlayout

Ensures that an element self-clears its children.

Note: This is only useful if you are still using float to build layouts. Please consider using a modern approach with flexbox layout or grid layout.

HTML

<div class="clearfix">
   <div class="floated">float a</div>
   <div class="floated">float b</div>
   <div class="floated">float c</div>
@@ -90,7 +90,7 @@
   display: block;
   clear: both;
 }
-

Demo

Explanation

padding-top on the ::before pseudo-element causes the height of the element to equal a percentage of its width. 100% therefore means the element's height will always be 100% of the width, creating a responsive square.

This method also allows content to be placed inside the element normally.

Browser support

99+%

✅ No caveats.

Countervisualother

Counters are, in essence, variables maintained by CSS whose values may be incremented by CSS rules to track how many times they're used.

HTML

<ul>
+

Demo

Explanation

padding-top on the ::before pseudo-element causes the height of the element to equal a percentage of its width. 100% therefore means the element's height will always be 100% of the width, creating a responsive square.

This method also allows content to be placed inside the element normally.

Browser support

99+%

✅ No caveats.

Countervisualother

Counters are, in essence, variables maintained by CSS whose values may be incremented by CSS rules to track how many times they're used.

HTML

<ul>
   <li>List item</li>
   <li>List item</li>
   <li>
@@ -109,7 +109,7 @@ li::before {
   counter-increment: counter;
   content: counters(counter, '.') ' ';
 }
-

Demo

  • List item
  • List item
  • List item
    • List item
    • List item
    • List item

Explanation

You can create a ordered list using any type of HTML.

  1. counter-reset Initializes a counter, the value is the name of the counter. By default, the counter starts at 0. This property can also be used to change its value to any specific number.

  2. counter-increment Used in element that will be countable. Once counter-reset initialized, a counter's value can be increased or decreased.

  3. counter(name, style) Displays the value of a section counter. Generally used in a content property. This function can receive two parameters, the first as the name of the counter and the second one can be decimal or upper-roman (decimal by default).

  4. counters(counter, string, style) Displays the value of a section counter. Generally used in a content property. This function can receive three parameters, the first as the name of the counter, the second one you can include a string which comes after the counter and the third one can be decimal or upper-roman (decimal by default).

  5. A CSS counter can be especially useful for making outlined lists, because a new instance of the counter is automatically created in child elements. Using the counters() function, separating text can be inserted between different levels of nested counters.

Browser support

98.4%

✅ No caveats.

Custom scrollbarvisual

Customizes the scrollbar style for the document and elements with scrollable overflow, on WebKit platforms.

HTML

<div class="custom-scrollbar">
+

Demo

  • List item
  • List item
  • List item
    • List item
    • List item
    • List item

Explanation

You can create a ordered list using any type of HTML.

  1. counter-reset Initializes a counter, the value is the name of the counter. By default, the counter starts at 0. This property can also be used to change its value to any specific number.

  2. counter-increment Used in element that will be countable. Once counter-reset initialized, a counter's value can be increased or decreased.

  3. counter(name, style) Displays the value of a section counter. Generally used in a content property. This function can receive two parameters, the first as the name of the counter and the second one can be decimal or upper-roman (decimal by default).

  4. counters(counter, string, style) Displays the value of a section counter. Generally used in a content property. This function can receive three parameters, the first as the name of the counter, the second one you can include a string which comes after the counter and the third one can be decimal or upper-roman (decimal by default).

  5. A CSS counter can be especially useful for making outlined lists, because a new instance of the counter is automatically created in child elements. Using the counters() function, separating text can be inserted between different levels of nested counters.

Browser support

95.9%

✅ No caveats.

Custom scrollbarvisual

Customizes the scrollbar style for the document and elements with scrollable overflow, on WebKit platforms.

HTML

<div class="custom-scrollbar">
   <p>
     Lorem ipsum dolor sit amet consectetur adipisicing elit.<br>
     Iure id exercitationem nulla qui repellat laborum vitae, <br>
@@ -133,7 +133,7 @@ li::before {
   border-radius: 10px;
   box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
 }
-

Demo

Lorem ipsum dolor sit amet consectetur adipisicing elit.
Iure id exercitationem nulla qui repellat laborum vitae,
molestias tempora velit natus. Quas, assumenda nisi.
Quisquam enim qui iure, consequatur velit sit?

Explanation

  1. ::-webkit-scrollbar targets the whole scrollbar element.
  2. ::-webkit-scrollbar-track targets only the scrollbar track.
  3. ::-webkit-scrollbar-thumb targets the scrollbar thumb.

There are many other pseudo-elements that you can use to style scrollbars. For more info, visit the WebKit Blog.

Browser support

88.0%

⚠️ Scrollbar styling doesn't appear to be on any standards track.

Custom text selectionvisual

Changes the styling of text selection.

HTML

<p class="custom-text-selection">Select some of this text.</p>
+

Demo

Lorem ipsum dolor sit amet consectetur adipisicing elit.
Iure id exercitationem nulla qui repellat laborum vitae,
molestias tempora velit natus. Quas, assumenda nisi.
Quisquam enim qui iure, consequatur velit sit?

Explanation

  1. ::-webkit-scrollbar targets the whole scrollbar element.
  2. ::-webkit-scrollbar-track targets only the scrollbar track.
  3. ::-webkit-scrollbar-thumb targets the scrollbar thumb.

There are many other pseudo-elements that you can use to style scrollbars. For more info, visit the WebKit Blog.

Browser support

86.7%

⚠️ Scrollbar styling doesn't appear to be on any standards track.

Custom text selectionvisual

Changes the styling of text selection.

HTML

<p class="custom-text-selection">Select some of this text.</p>
 

CSS

::selection {
   background: aquamarine;
   color: black;
@@ -142,7 +142,7 @@ li::before {
   background: deeppink;
   color: white;
 }
-

Demo

Select some of this text.

Explanation

::selection defines a pseudo selector on an element to style text within it when selected. Note that if you don't combine any other selector your style will be applied at document root level, to any selectable element.

Browser support

84.9%

⚠️ Requires prefixes for full support and is not actually in any specification.

Custom variablesother

CSS variables that contain specific values to be reused throughout a document.

HTML

<p class="custom-variables">CSS is awesome!</p>
+

Demo

Select some of this text.

Explanation

::selection defines a pseudo selector on an element to style text within it when selected. Note that if you don't combine any other selector your style will be applied at document root level, to any selectable element.

Browser support

82.5%

⚠️ Requires prefixes for full support and is not actually in any specification.

Custom variablesother

CSS variables that contain specific values to be reused throughout a document.

HTML

<p class="custom-variables">CSS is awesome!</p>
 

CSS

:root {
   /* Place variables within here to use the variables globally. */
 }
@@ -156,12 +156,12 @@ li::before {
   font-style: var(--some-keyword);
   text-shadow: var(--some-complex-value);
 }
-

Demo

CSS is awesome!

Explanation

The variables are defined globally within the :root CSS pseudo-class which matches the root element of a tree representing the document. Variables can also be scoped to a selector if defined within the block.

Declare a variable with --variable-name:.

Reuse variables throughout the document using the var(--variable-name) function.

Browser support

88.0%

✅ No caveats.

Disable selectioninteractivity

Makes the content unselectable.

HTML

<p>You can select me.</p>
+

Demo

CSS is awesome!

Explanation

The variables are defined globally within the :root CSS pseudo-class which matches the root element of a tree representing the document. Variables can also be scoped to a selector if defined within the block.

Declare a variable with --variable-name:.

Reuse variables throughout the document using the var(--variable-name) function.

Browser support

87.6%

✅ No caveats.

Disable selectioninteractivity

Makes the content unselectable.

HTML

<p>You can select me.</p>
 <p class="unselectable">You can't select me!</p>
 

CSS

.unselectable {
   user-select: none;
 }
-

Demo

You can select me.

You can't select me!

Explanation

user-select: none specifies that the text cannot be selected.

Browser support

87.2%

⚠️ Requires prefixes for full support. ⚠️ This is not a secure method to prevent users from copying content.

Display table centeringlayout

Vertically and horizontally centers a child element within its parent element using display: table (as an alternative to flexbox).

HTML

<div class="container">
+

Demo

You can select me.

You can't select me!

Explanation

user-select: none specifies that the text cannot be selected.

Browser support

89.2%

⚠️ Requires prefixes for full support. ⚠️ This is not a secure method to prevent users from copying content.

Display table centeringlayout

Vertically and horizontally centers a child element within its parent element using display: table (as an alternative to flexbox).

HTML

<div class="container">
   <div class="center">
     <span>Centered content</span>
   </div>
@@ -181,7 +181,7 @@ li::before {
   text-align: center;
   vertical-align: middle;
 }
-

Demo

Centered content

Explanation

  1. display: table on '.center' allows the element to behave like a <table> HTML element.
  2. 100% height and width on '.center' allows the element to fill the available space within its parent element.
  3. display: table-cell on '.center > span' allows the element to behave like an HTML element.
  4. text-align: center on '.center > span' centers the child element horizontally.
  5. vertical-align: middle on '.center > span' centers the child element vertically.

The outer parent ('.container' in this case) must have a fixed height and width.

Browser support

99+%

✅ No caveats.

Donut spinneranimation

Creates a donut spinner that can be used to indicate the loading of content.

HTML

<div class="donut"></div>
+

Demo

Centered content

Explanation

  1. display: table on '.center' allows the element to behave like a <table> HTML element.
  2. 100% height and width on '.center' allows the element to fill the available space within its parent element.
  3. display: table-cell on '.center > span' allows the element to behave like an HTML element.
  4. text-align: center on '.center > span' centers the child element horizontally.
  5. vertical-align: middle on '.center > span' centers the child element vertically.

The outer parent ('.container' in this case) must have a fixed height and width.

Browser support

99+%

✅ No caveats.

Donut spinneranimation

Creates a donut spinner that can be used to indicate the loading of content.

HTML

<div class="donut"></div>
 

CSS

@keyframes donut-spin {
   0% {
     transform: rotate(0deg);
@@ -199,7 +199,7 @@ li::before {
   height: 30px;
   animation: donut-spin 1.2s linear infinite;
 }
-

Demo

Explanation

Use a semi-transparent border for the whole element, except one side that will serve as the loading indicator for the donut. Use animation to rotate the element.

Browser support

95.3%

⚠️ Requires prefixes for full support.

Dynamic shadowvisual

Creates a shadow similar to box-shadow but based on the colors of the element itself.

HTML

<div class="dynamic-shadow"></div>
+

Demo

Explanation

Use a semi-transparent border for the whole element, except one side that will serve as the loading indicator for the donut. Use animation to rotate the element.

Browser support

93.4%

⚠️ Requires prefixes for full support.

Dynamic shadowvisual

Creates a shadow similar to box-shadow but based on the colors of the element itself.

HTML

<div class="dynamic-shadow"></div>
 

CSS

.dynamic-shadow {
   position: relative;
   width: 10rem;
@@ -218,7 +218,7 @@ li::before {
   opacity: 0.7;
   z-index: -1;
 }
-

Demo

Explanation

  1. position: relative on the element establishes a Cartesian positioning context for psuedo-elements.
  2. z-index: 1 establishes a new stacking context.
  3. ::after defines a pseudo-element.
  4. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
  5. width: 100% and height: 100% sizes the pseudo-element to fill its parent's dimensions, making it equal in size.
  6. background: inherit causes the pseudo-element to inherit the linear gradient specified on the element.
  7. top: 0.5rem offsets the pseudo-element down slightly from its parent.
  8. filter: blur(0.4rem) will blur the pseudo-element to create the appearance of a shadow underneath.
  9. opacity: 0.7 makes the pseudo-element partially transparent.
  10. z-index: -1 positions the pseudo-element behind the parent but in front of the background.

Browser support

91.7%

⚠️ Requires prefixes for full support.

Easing variablesanimation

Variables that can be reused for transition-timing-function properties, more powerful than the built-in ease, ease-in, ease-out and ease-in-out.

HTML

<div class="easing-variables">Hover</div>
+

Demo

Explanation

  1. position: relative on the element establishes a Cartesian positioning context for psuedo-elements.
  2. z-index: 1 establishes a new stacking context.
  3. ::after defines a pseudo-element.
  4. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
  5. width: 100% and height: 100% sizes the pseudo-element to fill its parent's dimensions, making it equal in size.
  6. background: inherit causes the pseudo-element to inherit the linear gradient specified on the element.
  7. top: 0.5rem offsets the pseudo-element down slightly from its parent.
  8. filter: blur(0.4rem) will blur the pseudo-element to create the appearance of a shadow underneath.
  9. opacity: 0.7 makes the pseudo-element partially transparent.
  10. z-index: -1 positions the pseudo-element behind the parent but in front of the background.

Browser support

90.2%

⚠️ Requires prefixes for full support.

Easing variablesanimation

Variables that can be reused for transition-timing-function properties, more powerful than the built-in ease, ease-in, ease-out and ease-in-out.

HTML

<div class="easing-variables">Hover</div>
 

CSS

:root {
   /* Place variables in here to use globally */
 }
@@ -254,14 +254,14 @@ li::before {
 .easing-variables:hover {
   transform: rotate(45deg);
 }
-

Demo

Hover

Explanation

The variables are defined globally within the :root CSS pseudo-class which matches the root element of a tree representing the document. In HTML, :root represents the <html> element and is identical to the selector html, except that its specificity is higher.

Browser support

88.0%

✅ No caveats.

Etched textvisual

Creates an effect where text appears to be "etched" or engraved into the background.

HTML

<p class="etched-text">I appear etched into the background.</p>
+

Demo

Hover

Explanation

The variables are defined globally within the :root CSS pseudo-class which matches the root element of a tree representing the document. In HTML, :root represents the <html> element and is identical to the selector html, except that its specificity is higher.

Browser support

87.6%

✅ No caveats.

Etched textvisual

Creates an effect where text appears to be "etched" or engraved into the background.

HTML

<p class="etched-text">I appear etched into the background.</p>
 

CSS

.etched-text {
   text-shadow: 0 2px white;
   font-size: 1.5rem;
   font-weight: bold;
   color: #b8bec5;
 }
-

Demo

I appear etched into the background.

Explanation

text-shadow: 0 2px white creates a white shadow offset 0px horizontally and 2px vertically from the origin position.

The background must be darker than the shadow for the effect to work.

The text color should be slightly faded to make it look like it's engraved/carved out of the background.

Browser support

98.1%

✅ No caveats.

Evenly distributed childrenlayout

Evenly distributes child elements within a parent element.

HTML

<div class="evenly-distributed-children">
+

Demo

I appear etched into the background.

Explanation

text-shadow: 0 2px white creates a white shadow offset 0px horizontally and 2px vertically from the origin position.

The background must be darker than the shadow for the effect to work.

The text color should be slightly faded to make it look like it's engraved/carved out of the background.

Browser support

95.5%

✅ No caveats.

Evenly distributed childrenlayout

Evenly distributes child elements within a parent element.

HTML

<div class="evenly-distributed-children">
   <p>Item1</p>
   <p>Item2</p>
   <p>Item3</p>
@@ -270,7 +270,7 @@ li::before {
   display: flex;
   justify-content: space-between;
 }
-

Demo

Item1

Item2

Item3

Explanation

  1. display: flex enables flexbox.
  2. justify-content: space-between evenly distributes child elements horizontally. The first item is positioned at the left edge, while the last item is positioned at the right edge.

Alternatively, use justify-content: space-around to distribute the children with space around them, rather than between them.

Browser support

98.1%

⚠️ Needs prefixes for full support.

New

Fit image in containerlayoutvisual

Changes the fit and position of an image within its container while preserving its aspect ratio. Previously only possible using a background image and the background-size property.

HTML

<img class="image image-contain" src="https://picsum.photos/600/200">
+

Demo

Item1

Item2

Item3

Explanation

  1. display: flex enables flexbox.
  2. justify-content: space-between evenly distributes child elements horizontally. The first item is positioned at the left edge, while the last item is positioned at the right edge.

Alternatively, use justify-content: space-around to distribute the children with space around them, rather than between them.

Browser support

95.5%

⚠️ Needs prefixes for full support.

Fit image in containerlayoutvisual

Changes the fit and position of an image within its container while preserving its aspect ratio. Previously only possible using a background image and the background-size property.

HTML

<img class="image image-contain" src="https://picsum.photos/600/200">
 <img class="image image-cover" src="https://picsum.photos/600/200">
 

CSS

.image {
   background: #34495e;
@@ -286,7 +286,7 @@ li::before {
   object-fit: cover;
   object-position: right top;
 }
-

Demo

Explanation

  • object-fit: contain fits the entire image within the container while preserving its aspect ratio.
  • object-fit: cover fills the container with the image while preserving its aspect ratio.
  • object-position: [x] [y] positions the image within the container.

Browser support

92.9%

✅ No caveats.

Flexbox centeringlayout

Horizontally and vertically centers a child element within a parent element using flexbox.

HTML

<div class="flexbox-centering">
+

Demo

Explanation

  • object-fit: contain fits the entire image within the container while preserving its aspect ratio.
  • object-fit: cover fills the container with the image while preserving its aspect ratio.
  • object-position: [x] [y] positions the image within the container.

Browser support

91.5%

✅ No caveats.

Flexbox centeringlayout

Horizontally and vertically centers a child element within a parent element using flexbox.

HTML

<div class="flexbox-centering">
   <div class="child">Centered content.</div>
 </div>
 

CSS

.flexbox-centering {
@@ -295,13 +295,13 @@ li::before {
   align-items: center;
   height: 100px;
 }
-

Demo

Centered content.

Explanation

  1. display: flex enables flexbox.
  2. justify-content: center centers the child horizontally.
  3. align-items: center centers the child vertically.

Browser support

98.1%

⚠️ Needs prefixes for full support.

Gradient textvisual

Gives text a gradient color.

HTML

<p class="gradient-text">Gradient text</p>
+

Demo

Centered content.

Explanation

  1. display: flex enables flexbox.
  2. justify-content: center centers the child horizontally.
  3. align-items: center centers the child vertically.

Browser support

95.5%

⚠️ Needs prefixes for full support.

Gradient textvisual

Gives text a gradient color.

HTML

<p class="gradient-text">Gradient text</p>
 

CSS

.gradient-text {
   background: -webkit-linear-gradient(pink, red);
   -webkit-text-fill-color: transparent;
   -webkit-background-clip: text;
 }
-

Demo

Gradient text

Explanation

  1. background: -webkit-linear-gradient(...) gives the text element a gradient background.
  2. webkit-text-fill-color: transparent fills the text with a transparent color.
  3. webkit-background-clip: text clips the background with the text, filling the text with the gradient background as the color.

Browser support

91.5%

⚠️ Uses non-standard properties.

Grid centeringlayout

Horizontally and vertically centers a child element within a parent element using grid.

HTML

<div class="grid-centering">
+

Demo

Gradient text

Explanation

  1. background: -webkit-linear-gradient(...) gives the text element a gradient background.
  2. webkit-text-fill-color: transparent fills the text with a transparent color.
  3. webkit-background-clip: text clips the background with the text, filling the text with the gradient background as the color.

Browser support

90.1%

⚠️ Uses non-standard properties.

Grid centeringlayout

Horizontally and vertically centers a child element within a parent element using grid.

HTML

<div class="grid-centering">
   <div class="child">Centered content.</div>
 </div>
 

CSS

.grid-centering {
@@ -310,7 +310,7 @@ li::before {
   align-items: center;
   height: 100px;
 }
-

Demo

Centered content.

Explanation

  1. display: grid enables grid.
  2. justify-content: center centers the child horizontally.
  3. align-items: center centers the child vertically.

Browser support

87.6%

✅ No caveats.

Hairline bordervisual

Gives an element a border equal to 1 native device pixel in width, which can look very sharp and crisp.

HTML

<div class="hairline-border">text</div>
+

Demo

Centered content.

Explanation

  1. display: grid enables grid.
  2. justify-content: center centers the child horizontally.
  3. align-items: center centers the child vertically.

Browser support

88.3%

✅ No caveats.

Hairline bordervisual

Gives an element a border equal to 1 native device pixel in width, which can look very sharp and crisp.

HTML

<div class="hairline-border">text</div>
 

CSS

.hairline-border {
   box-shadow: 0 0 0 1px;
 }
@@ -329,7 +329,7 @@ li::before {
     box-shadow: 0 0 0 0.25px;
   }
 }
-

Demo

text

Explanation

  1. box-shadow, when only using spread, adds a pseudo-border which can use subpixels*.
  2. Use @media (min-resolution: ...) to check the device pixel ratio (1dppx equals 96 DPI), setting the spread of the box-shadow equal to 1 / dppx.

Browser Support

95.5%

⚠️ Needs alternate syntax and JavaScript user agent checking for full support.


*Chrome does not support subpixel values on border. Safari does not support subpixel values on box-shadow. Firefox supports subpixel values on both.

Height transitionanimation

Transitions an element's height from 0 to auto when its height is unknown.

HTML

<div class="trigger">
+

Demo

text

Explanation

  1. box-shadow, when only using spread, adds a pseudo-border which can use subpixels*.
  2. Use @media (min-resolution: ...) to check the device pixel ratio (1dppx equals 96 DPI), setting the spread of the box-shadow equal to 1 / dppx.

Browser Support

93.7%

⚠️ Needs alternate syntax and JavaScript user agent checking for full support.


*Chrome does not support subpixel values on border. Safari does not support subpixel values on box-shadow. Firefox supports subpixel values on both.

Height transitionanimation

Transitions an element's height from 0 to auto when its height is unknown.

HTML

<div class="trigger">
   Hover me to see a height transition.
   <div class="el">content</div>
 </div>
@@ -344,7 +344,7 @@ li::before {
 

JavaScript

var el = document.querySelector('.el')
 var height = el.scrollHeight
 el.style.setProperty('--max-height', height + 'px')
-

Demo

Hover me to see a height transition.
content

Explanation

CSS
  1. transition: max-height: 0.5s cubic-bezier(...) specifies that changes to max-height should be transitioned over 0.5 seconds, using an ease-out-quint timing function.
  2. overflow: hidden prevents the contents of the hidden element from overflowing its container.
  3. max-height: 0 specifies that the element has no height initially.
  4. .target:hover > .el specifies that when the parent is hovered over, target a child .el within it and use the --max-height variable which was defined by JavaScript.
JavaScript
  1. el.scrollHeight is the height of the element including overflow, which will change dynamically based on the content of the element.
  2. el.style.setProperty(...) sets the --max-height CSS variable which is used to specify the max-height of the element the target is hovered over, allowing it to transition smoothly from 0 to auto.

Browser Support

88.0%

Requires JavaScript
⚠️ Causes reflow on each animation frame, which will be laggy if there are a large number of elements beneath the element that is transitioning in height.

Hover underline animationanimation

Creates an animated underline effect when the text is hovered over.

Credit: https://flatuicolors.com/

HTML

<p class="hover-underline-animation">Hover this text to see the effect!</p>
+

Demo

Hover me to see a height transition.
content

Explanation

CSS
  1. transition: max-height: 0.5s cubic-bezier(...) specifies that changes to max-height should be transitioned over 0.5 seconds, using an ease-out-quint timing function.
  2. overflow: hidden prevents the contents of the hidden element from overflowing its container.
  3. max-height: 0 specifies that the element has no height initially.
  4. .target:hover > .el specifies that when the parent is hovered over, target a child .el within it and use the --max-height variable which was defined by JavaScript.
JavaScript
  1. el.scrollHeight is the height of the element including overflow, which will change dynamically based on the content of the element.
  2. el.style.setProperty(...) sets the --max-height CSS variable which is used to specify the max-height of the element the target is hovered over, allowing it to transition smoothly from 0 to auto.

Browser Support

87.6%

Requires JavaScript
⚠️ Causes reflow on each animation frame, which will be laggy if there are a large number of elements beneath the element that is transitioning in height.

Hover underline animationanimation

Creates an animated underline effect when the text is hovered over.

Credit: https://flatuicolors.com/

HTML

<p class="hover-underline-animation">Hover this text to see the effect!</p>
 

CSS

.hover-underline-animation {
   display: inline-block;
   position: relative;
@@ -366,7 +366,7 @@ el.style.setProperty('--max-height', height + 'px')
   transform: scaleX(1);
   transform-origin: bottom left;
 }
-

Demo

Hover this text to see the effect!

Explanation

  1. display: inline-block makes the block p an inline-block to prevent the underline from spanning the entire parent width rather than just the content (text).
  2. position: relative on the element establishes a Cartesian positioning context for pseudo-elements.
  3. ::after defines a pseudo-element.
  4. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
  5. width: 100% ensures the pseudo-element spans the entire width of the text block.
  6. transform: scaleX(0) initially scales the pseudo element to 0 so it has no width and is not visible.
  7. bottom: 0 and left: 0 position it to the bottom left of the block.
  8. transition: transform 0.25s ease-out means changes to transform will be transitioned over 0.25 seconds with an ease-out timing function.
  9. transform-origin: bottom right means the transform anchor point is positioned at the bottom right of the block.
  10. :hover::after then uses scaleX(1) to transition the width to 100%, then changes the transform-origin to bottom left so that the anchor point is reversed, allowing it transition out in the other direction when hovered off.

Browser support

95.4%

✅ No caveats.

New

Last item with remaining available heightlayout

Take advantage of available viewport space by giving the last element the remaining available space in current viewport, even when resizing the window.

HTML

<div class="container">
+

Demo

Hover this text to see the effect!

Explanation

  1. display: inline-block makes the block p an inline-block to prevent the underline from spanning the entire parent width rather than just the content (text).
  2. position: relative on the element establishes a Cartesian positioning context for pseudo-elements.
  3. ::after defines a pseudo-element.
  4. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
  5. width: 100% ensures the pseudo-element spans the entire width of the text block.
  6. transform: scaleX(0) initially scales the pseudo element to 0 so it has no width and is not visible.
  7. bottom: 0 and left: 0 position it to the bottom left of the block.
  8. transition: transform 0.25s ease-out means changes to transform will be transitioned over 0.25 seconds with an ease-out timing function.
  9. transform-origin: bottom right means the transform anchor point is positioned at the bottom right of the block.
  10. :hover::after then uses scaleX(1) to transition the width to 100%, then changes the transform-origin to bottom left so that the anchor point is reversed, allowing it transition out in the other direction when hovered off.

Browser support

93.5%

✅ No caveats.

Last item with remaining available heightlayout

Take advantage of available viewport space by giving the last element the remaining available space in current viewport, even when resizing the window.

HTML

<div class="container">
   <div>Div 1</div>
   <div>Div 2</div>
   <div>Div 3</div>
@@ -385,7 +385,7 @@ body {
   background-color: tomato;
   flex: 1;
 }
-

Demo

Div 1
Div 2
Div 3

Explanation

  1. height: 100% set the height of container as viewport height.
  2. display: flex enables flexbox.
  3. flex-direction: column set the direction of flex items' order from top to down.
  4. flex-grow: 1 the flexbox will apply remaining available space of container to last child element.

The parent must have a viewport height. flex-grow: 1 could be applied to the first or second element, which will have all available space.

Browser support

98.1%

⚠️ Needs prefixes for full support.

Mouse cursor gradient trackingvisualinteractivity

A hover effect where the gradient follows the mouse cursor.

Credit: Tobias Reich

HTML

<button class="mouse-cursor-gradient-tracking">
+

Demo

Div 1
Div 2
Div 3

Explanation

  1. height: 100% set the height of container as viewport height.
  2. display: flex enables flexbox.
  3. flex-direction: column set the direction of flex items' order from top to down.
  4. flex-grow: 1 the flexbox will apply remaining available space of container to last child element.

The parent must have a viewport height. flex-grow: 1 could be applied to the first or second element, which will have all available space.

Browser support

95.5%

⚠️ Needs prefixes for full support.

Mouse cursor gradient trackingvisualinteractivity

A hover effect where the gradient follows the mouse cursor.

Credit: Tobias Reich

HTML

<button class="mouse-cursor-gradient-tracking">
   <span>Hover me</span>
 </button>
 

CSS

.mouse-cursor-gradient-tracking {
@@ -424,7 +424,7 @@ btn.onmousemove = function(e) {
   btn.style.setProperty('--x', x + 'px')
   btn.style.setProperty('--y', y + 'px')
 }
-

Demo

Explanation

TODO

Browser support

88.0%

Requires JavaScript
⚠️ Requires JavaScript.

:not selectorvisual

The :not psuedo selector is useful for styling a group of elements, while leaving the last (or specified) element unstyled.

HTML

<ul class="css-not-selector-shortcut">
+

Demo

Explanation

TODO

Browser support

87.6%

Requires JavaScript
⚠️ Requires JavaScript.

:not selectorvisual

The :not psuedo selector is useful for styling a group of elements, while leaving the last (or specified) element unstyled.

HTML

<ul class="css-not-selector-shortcut">
   <li>One</li>
   <li>Two</li>
   <li>Three</li>
@@ -444,7 +444,7 @@ li {
 li:not(:last-child) {
   border-right: 2px solid #d2d5e4;
 }
-

Demo

  • One
  • Two
  • Three
  • Four

Explanation

li:not(:last-child) specifies that the styles should apply to all li elements except the :last-child.

Browser support

98.4%

✅ No caveats.

Offscreenlayoutvisual

A bulletproof way to completely hide an element visually and positionally in the DOM while still allowing it to be accessed by JavaScript and readable by screen readers. This method is very useful for accessibility ( ADA) development when more context is needed for visually-impaired users. As an alternative to display: none which is not readable by screen readers or visibility: hidden which takes up physical space in the DOM.

HTML

<a class="button" href="http://pantswebsite.com">
+

Demo

  • One
  • Two
  • Three
  • Four

Explanation

li:not(:last-child) specifies that the styles should apply to all li elements except the :last-child.

Browser support

95.9%

✅ No caveats.

Offscreenlayoutvisual

A bulletproof way to completely hide an element visually and positionally in the DOM while still allowing it to be accessed by JavaScript and readable by screen readers. This method is very useful for accessibility (ADA) development when more context is needed for visually-impaired users. As an alternative to display: none which is not readable by screen readers or visibility: hidden which takes up physical space in the DOM.

HTML

<a class="button" href="http://pantswebsite.com">
   Learn More
   <span class="offscreen"> about pants</span>
 </a>
@@ -458,7 +458,7 @@ li:not(:last-child) {
   position: absolute;
   width: 1px;
 }
-

Demo

Explanation

  1. Remove all borders.
  2. Use clip to indicate that no part of the element should be shown.
  3. Make the height and width of the element 1px.
  4. Negate the elements height and width using margin: -1px.
  5. Hide the element's overflow.
  6. Remove all padding.
  7. Position the element absolutely so that it does not take up space in the DOM.

Browser support

99+%

✅ No caveats.

(Although clip technically has been depreciated, the newer clip-path currently has very limited browser support.)

Overflow scroll gradientvisual

Adds a fading gradient to an overflowing element to better indicate there is more content to be scrolled.

HTML

<div class="overflow-scroll-gradient">
+

Demo

Explanation

  1. Remove all borders.
  2. Use clip to indicate that no part of the element should be shown.
  3. Make the height and width of the element 1px.
  4. Negate the elements height and width using margin: -1px.
  5. Hide the element's overflow.
  6. Remove all padding.
  7. Position the element absolutely so that it does not take up space in the DOM.

Browser support

99+%

✅ No caveats.

(Although clip technically has been depreciated, the newer clip-path currently has very limited browser support.)

Overflow scroll gradientvisual

Adds a fading gradient to an overflowing element to better indicate there is more content to be scrolled.

HTML

<div class="overflow-scroll-gradient">
   <div class="overflow-scroll-gradient__scroller">
     Lorem ipsum dolor sit amet consectetur adipisicing elit. <br>
     Iure id exercitationem nulla qui repellat laborum vitae, <br>
@@ -493,7 +493,7 @@ li:not(:last-child) {
   padding: 15px;
   line-height: 1.2;
 }
-

Demo

Lorem ipsum dolor sit amet consectetur adipisicing elit.
Iure id exercitationem nulla qui repellat laborum vitae,
molestias tempora velit natus. Quas, assumenda nisi.
Quisquam enim qui iure, consequatur velit sit?
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Iure id exercitationem nulla qui repellat laborum vitae,
molestias tempora velit natus. Quas, assumenda nisi.
Quisquam enim qui iure, consequatur velit sit?

Explanation

  1. position: relative on the parent establishes a Cartesian positioning context for pseudo-elements.
  2. ::after defines a pseudo element.
  3. background-image: linear-gradient(...) adds a linear gradient that fades from transparent to white (top to bottom).
  4. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
  5. width: 240px matches the size of the scrolling element (which is a child of the parent that has the pseudo element).
  6. height: 25px is the height of the fading gradient pseudo-element, which should be kept relatively small.
  7. bottom: 0 positions the pseudo-element at the bottom of the parent.
  8. pointer-events: none specifies that the pseudo-element cannot be a target of mouse events, allowing text behind it to still be selectable/interactive.

Browser support

95.4%

✅ No caveats.

Popout menuinteractivity

Reveals an interactive popout menu on hover and focus.

HTML

<div class="reference" tabindex="0">
+

Demo

Lorem ipsum dolor sit amet consectetur adipisicing elit.
Iure id exercitationem nulla qui repellat laborum vitae,
molestias tempora velit natus. Quas, assumenda nisi.
Quisquam enim qui iure, consequatur velit sit?
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Iure id exercitationem nulla qui repellat laborum vitae,
molestias tempora velit natus. Quas, assumenda nisi.
Quisquam enim qui iure, consequatur velit sit?

Explanation

  1. position: relative on the parent establishes a Cartesian positioning context for pseudo-elements.
  2. ::after defines a pseudo element.
  3. background-image: linear-gradient(...) adds a linear gradient that fades from transparent to white (top to bottom).
  4. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
  5. width: 240px matches the size of the scrolling element (which is a child of the parent that has the pseudo element).
  6. height: 25px is the height of the fading gradient pseudo-element, which should be kept relatively small.
  7. bottom: 0 positions the pseudo-element at the bottom of the parent.
  8. pointer-events: none specifies that the pseudo-element cannot be a target of mouse events, allowing text behind it to still be selectable/interactive.

Browser support

93.5%

✅ No caveats.

Popout menuinteractivity

Reveals an interactive popout menu on hover and focus.

HTML

<div class="reference" tabindex="0">
   <div class="popout-menu">
     Popout menu
   </div>
@@ -534,14 +534,14 @@ li:not(:last-child) {
   background-color: rgba(0, 150, 255, 0.3);
   text-shadow: none;
 }
-

Demo

Pretty text underline without clipping descending letters.

Explanation

  1. text-shadow uses 4 values with offsets that cover a 4x4 px area to ensure the underline has a "thick" shadow that covers the line where descenders clip it. Use a color that matches the background. For a larger font, use a larger px size. Additional values can create an even thicker shadow, and subpixel values can also be used.
  2. background-image: linear-gradient(...) creates a 90deg gradient using the text color (currentColor).
  3. The background-* properties size the gradient as 100% of the width of the block and 1px in height at the bottom and disables repetition, which creates a 1px underline beneath the text.
  4. The ::selection pseudo selector rule ensures the text shadow does not interfere with text selection.

Browser support

95.4%

✅ No caveats.

Reset all stylesvisual

Resets all styles to default values with one property. This will not affect direction and unicode-bidi properties.

HTML

<div class="reset-all-styles">
+

Demo

Pretty text underline without clipping descending letters.

Explanation

  1. text-shadow uses 4 values with offsets that cover a 4x4 px area to ensure the underline has a "thick" shadow that covers the line where descenders clip it. Use a color that matches the background. For a larger font, use a larger px size. Additional values can create an even thicker shadow, and subpixel values can also be used.
  2. background-image: linear-gradient(...) creates a 90deg gradient using the text color (currentColor).
  3. The background-* properties size the gradient as 100% of the width of the block and 1px in height at the bottom and disables repetition, which creates a 1px underline beneath the text.
  4. The ::selection pseudo selector rule ensures the text shadow does not interfere with text selection.

Browser support

93.5%

✅ No caveats.

Reset all stylesvisual

Resets all styles to default values with one property. This will not affect direction and unicode-bidi properties.

HTML

<div class="reset-all-styles">
   <h5>Title</h5>
   <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui iure, consequatur velit sit?</p>
 </div>
 

CSS

.reset-all-styles {
   all: initial;
 }
-

Demo

Title

Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui iure, consequatur velit sit?

Explanation

The all property allows you to reset all styles (inherited or not) to default values.

Browser support

88.3%

⚠️ MS Edge status is under consideration.

Shape separatorvisual

Uses an SVG shape to separate two different blocks to create more a interesting visual appearance compared to standard horizontal separation.

HTML

<div class="shape-separator"></div>
+

Demo

Title

Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui iure, consequatur velit sit?

Explanation

The all property allows you to reset all styles (inherited or not) to default values.

Browser support

87.2%

⚠️ MS Edge status is under consideration.

Shape separatorvisual

Uses an SVG shape to separate two different blocks to create more a interesting visual appearance compared to standard horizontal separation.

HTML

<div class="shape-separator"></div>
 

CSS

.shape-separator {
   position: relative;
   height: 48px;
@@ -555,7 +555,7 @@ li:not(:last-child) {
   height: 12px;
   bottom: 0;
 }
-

Demo

Explanation

  1. position: relative on the element establishes a Cartesian positioning context for pseudo elements.
  2. ::after defines a pseudo element.
  3. background-image: url(...) adds the SVG shape (a 24x12 triangle) as the background image of the pseudo element, which repeats by default. It must be the same color as the block that is being separated. For other shapes, we can use the URL-encoder for SVG.
  4. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
  5. width: 100% ensures the element stretches the entire width of its parent.
  6. height: 12px is the same height as the shape.
  7. bottom: 0 positions the pseudo element at the bottom of the parent.

Browser support

98.3%

✅ No caveats.

Sibling fadeinteractivity

Fades out the siblings of a hovered item.

HTML

<div class="sibling-fade">
+

Demo

Explanation

  1. position: relative on the element establishes a Cartesian positioning context for pseudo elements.
  2. ::after defines a pseudo element.
  3. background-image: url(...) adds the SVG shape (a 24x12 triangle) as the background image of the pseudo element, which repeats by default. It must be the same color as the block that is being separated. For other shapes, we can use the URL-encoder for SVG.
  4. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
  5. width: 100% ensures the element stretches the entire width of its parent.
  6. height: 12px is the same height as the shape.
  7. bottom: 0 positions the pseudo element at the bottom of the parent.

Browser support

95.7%

✅ No caveats.

Sibling fadeinteractivity

Fades out the siblings of a hovered item.

HTML

<div class="sibling-fade">
   <span>Item 1</span>
   <span>Item 2</span>
   <span>Item 3</span>
@@ -570,19 +570,12 @@ li:not(:last-child) {
 .sibling-fade:hover span:not(:hover) {
   opacity: 0.5;
 }
-

Demo

Item 1 Item 2 Item 3 Item 4 Item 5 Item 6

Explanation

  1. transition: opacity 0.2s specifies that changes to opacity will be transitioned over 0.2 seconds.
  2. .sibling-fade:hover span:not(:hover) specifies that when the parent is hovered, select any span children that are not currently being hovered and change their opacity to 0.5.

Browser support

95.4%

✅ No caveats.

System font stackvisual

Uses the native font of the operating system to get close to a native app feel.

HTML

<p class="system-font-stack">This text uses the system font.</p>
+

Demo

Item 1 Item 2 Item 3 Item 4 Item 5 Item 6

Explanation

  1. transition: opacity 0.2s specifies that changes to opacity will be transitioned over 0.2 seconds.
  2. .sibling-fade:hover span:not(:hover) specifies that when the parent is hovered, select any span children that are not currently being hovered and change their opacity to 0.5.

Browser support

93.5%

✅ No caveats.

System font stackvisual

Uses the native font of the operating system to get close to a native app feel.

HTML

<p class="system-font-stack">This text uses the system font.</p>
 

CSS

.system-font-stack {
   font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu,
     Cantarell, 'Helvetica Neue', Helvetica, Arial, sans-serif;
 }
-

Demo

This text uses the system font.

Explanation

The browser looks for each successive font, preferring the first one if possible, and falls back to the next if it cannot find the font (on the system or defined in CSS).

  1. -apple-system is San Francisco, used on iOS and macOS (not Chrome however)
  2. BlinkMacSystemFont is San Francisco, used on macOS Chrome
  3. Segoe UI is used on Windows 10
  4. Roboto is used on Android
  5. Oxygen-Sans is used on GNU+Linux
  6. Ubuntu is used on Linux
  7. "Helvetica Neue" and Helvetica is used on macOS 10.10 and below (wrapped in quotes because it has a space)
  8. Arial is a font widely supported by all operating systems
  9. sans-serif is the fallback sans-serif font if none of the other fonts are supported

Browser support

99+%

✅ No caveats.

Text decoration wavyvisual

Creates a Text decoration wavy.

HTML

<a href="#">I'm a link</a>
-

CSS

a {
-  text-decoration: underline wavy orange;
-}
-a:hover {
-  text-decoration: underline wavy orangered;
-}
-

Demo

Explanation

wavy draws a wavy line.

wavy is a value of text-decoration-style CSS property that sets the style of the lines specified by text-decoration-line.

text-decoration is a shorthand property for the various text decoration properties: text-decoration-color, text-decoration-style andtext-decoration-line are used.

Browser support

83.1%

✅ No caveats.

New

Toggle switchvisualinteractivity

Creates a toggle switch with CSS only.

HTML

<input type="checkbox" id="toggle" class="offscreen" />
+

Demo

This text uses the system font.

Explanation

The browser looks for each successive font, preferring the first one if possible, and falls back to the next if it cannot find the font (on the system or defined in CSS).

  1. -apple-system is San Francisco, used on iOS and macOS (not Chrome however)
  2. BlinkMacSystemFont is San Francisco, used on macOS Chrome
  3. Segoe UI is used on Windows 10
  4. Roboto is used on Android
  5. Oxygen-Sans is used on GNU+Linux
  6. Ubuntu is used on Linux
  7. "Helvetica Neue" and Helvetica is used on macOS 10.10 and below (wrapped in quotes because it has a space)
  8. Arial is a font widely supported by all operating systems
  9. sans-serif is the fallback sans-serif font if none of the other fonts are supported

Browser support

99+%

✅ No caveats.

Toggle switchvisualinteractivity

Creates a toggle switch with CSS only.

HTML

<input type="checkbox" id="toggle" class="offscreen" />
 <label for="toggle" class="switch"></label>
 

CSS

.switch {
   position: relative;
@@ -614,7 +607,7 @@ input[type='checkbox']:checked + .switch {
   position: absolute;
   left: -9999px;
 }
-

Demo

Explanation

This effect is styling only the <label> element to look like a toggle switch, and hiding the actual <input> checkbox by positioning it offscreen. When clicking the label associated with the <input> element, it sets the <input> checkbox into the :checked state.

  1. The for attribute associates the <label> with the appropriate <input> checkbox element by its id.
  2. .switch::after defines a pseudo-element for the <label> to create the circular knob.
  3. input[type='checkbox']:checked + .switch::after targets the <label>'s pseudo-element's style when the checkbox is checked.
  4. transform: translateX(20px) moves the pseudo-element (knob) 20px to the right when the checkbox is checked.
  5. background-color: #7983ff; sets the background-color of the switch to a different color when the checkbox is checked.
  6. .offscreen moves the <input> checkbox element, which does not comprise any part of the actual toggle switch, out of the flow of document and positions it far away from the view, but does not hide it so it is accessible via keyboard and screen readers.
  7. transition: all 0.3s specifies all property changes will be transitioned over 0.3 seconds, therefore transitioning the <label>'s background-color and the pseudo-element's transform property when the checkbox is checked.

Browser support

95.5%

⚠️ Requires prefixes for full support.

Transform centeringlayout

Vertically and horizontally centers a child element within its parent element using position: absolute and transform: translate() (as an alternative to flexbox or display: table). Similar to flexbox, this method does not require you to know the height or width of your parent or child so it is ideal for responsive applications.

HTML

<div class="parent">
+

Demo

Explanation

This effect is styling only the <label> element to look like a toggle switch, and hiding the actual <input> checkbox by positioning it offscreen. When clicking the label associated with the <input> element, it sets the <input> checkbox into the :checked state.

  1. The for attribute associates the <label> with the appropriate <input> checkbox element by its id.
  2. .switch::after defines a pseudo-element for the <label> to create the circular knob.
  3. input[type='checkbox']:checked + .switch::after targets the <label>'s pseudo-element's style when the checkbox is checked.
  4. transform: translateX(20px) moves the pseudo-element (knob) 20px to the right when the checkbox is checked.
  5. background-color: #7983ff; sets the background-color of the switch to a different color when the checkbox is checked.
  6. .offscreen moves the <input> checkbox element, which does not comprise any part of the actual toggle switch, out of the flow of document and positions it far away from the view, but does not hide it so it is accessible via keyboard and screen readers.
  7. transition: all 0.3s specifies all property changes will be transitioned over 0.3 seconds, therefore transitioning the <label>'s background-color and the pseudo-element's transform property when the checkbox is checked.

Browser support

93.7%

⚠️ Requires prefixes for full support.

Transform centeringlayout

Vertically and horizontally centers a child element within its parent element using position: absolute and transform: translate() (as an alternative to flexbox or display: table). Similar to flexbox, this method does not require you to know the height or width of your parent or child so it is ideal for responsive applications.

HTML

<div class="parent">
   <div class="child">Centered content</div>
 </div>
 

CSS

.parent {
@@ -630,7 +623,7 @@ input[type='checkbox']:checked + .switch {
   transform: translate(-50%, -50%);
   text-align: center;
 }
-

Demo

Centered content

Explanation

  1. position: absolute on the child element allows it to be positioned based on its containing block.
  2. left: 50% and top: 50% offsets the child 50% from the left and top edge of its containing block.
  3. transform: translate(-50%, -50%) allows the height and width of the child element to be negated so that it is vertically and horizontally centered.

Note: Fixed height and width on parent element is for the demo only.

Browser support

99+%

⚠️ Requires prefix for full support.

Trianglevisual

Creates a triangle shape with pure CSS.

HTML

<div class="triangle"></div>
+

Demo

Centered content

Explanation

  1. position: absolute on the child element allows it to be positioned based on its containing block.
  2. left: 50% and top: 50% offsets the child 50% from the left and top edge of its containing block.
  3. transform: translate(-50%, -50%) allows the height and width of the child element to be negated so that it is vertically and horizontally centered.

Note: Fixed height and width on parent element is for the demo only.

Browser support

99+%

⚠️ Requires prefix for full support.

Trianglevisual

Creates a triangle shape with pure CSS.

HTML

<div class="triangle"></div>
 

CSS

.triangle {
   width: 0;
   height: 0;
@@ -638,14 +631,14 @@ input[type='checkbox']:checked + .switch {
   border-left: 20px solid transparent;
   border-right: 20px solid transparent;
 }
-

Demo

Explanation

View this link for a detailed explanation.

The color of the border is the color of the triangle. The side the triangle tip points corresponds to the opposite border-* property. For example, a color on border-top means the arrow points downward.

Experiment with the px values to change the proportion of the triangle.

Browser support

99+%

✅ No caveats.

Truncate textlayout

If the text is longer than one line, it will be truncated and end with an ellipsis .

HTML

<p class="truncate-text">If I exceed one line's width, I will be truncated.</p>
+

Demo

Explanation

View this link for a detailed explanation.

The color of the border is the color of the triangle. The side the triangle tip points corresponds to the opposite border-* property. For example, a color on border-top means the arrow points downward.

Experiment with the px values to change the proportion of the triangle.

Browser support

99+%

✅ No caveats.

Truncate textlayout

If the text is longer than one line, it will be truncated and end with an ellipsis .

HTML

<p class="truncate-text">If I exceed one line's width, I will be truncated.</p>
 

CSS

.truncate-text {
   overflow: hidden;
   white-space: nowrap;
   text-overflow: ellipsis;
   width: 200px;
 }
-

Demo

If I exceed one line's width, I will be truncated.

Explanation

  1. overflow: hidden prevents the text from overflowing its dimensions (for a block, 100% width and auto height).
  2. white-space: nowrap prevents the text from exceeding one line in height.
  3. text-overflow: ellipsis makes it so that if the text exceeds its dimensions, it will end with an ellipsis.
  4. width: 200px; ensures the element has a dimension, to know when to get ellipsis

Browser support

98.4%

⚠️ Only works for single line elements.

New

Zebra striped listvisual

Creates a striped list with alternating background colors, which is useful for differentiating siblings that have content spread across a wide row.

HTML

<ul>
+

Demo

If I exceed one line's width, I will be truncated.

Explanation

  1. overflow: hidden prevents the text from overflowing its dimensions (for a block, 100% width and auto height).
  2. white-space: nowrap prevents the text from exceeding one line in height.
  3. text-overflow: ellipsis makes it so that if the text exceeds its dimensions, it will end with an ellipsis.
  4. width: 200px; ensures the element has a dimension, to know when to get ellipsis

Browser support

95.8%

⚠️ Only works for single line elements.

Zebra striped listvisual

Creates a striped list with alternating background colors, which is useful for differentiating siblings that have content spread across a wide row.

HTML

<ul>
   <li>Item 01</li>
   <li>Item 02</li>
   <li>Item 03</li>
@@ -655,4 +648,4 @@ input[type='checkbox']:checked + .switch {
 

CSS

li:nth-child(odd) {
   background-color: #eee;
 }
-

Demo

  • Item 01
  • Item 02
  • Item 03
  • Item 04
  • Item 05

Explanation

  1. Use the :nth-child(odd) or :nth-child(even) pseudo-class to apply a different background color to elements that match based on their position in a group of siblings.

Note that you can use it to apply different styles to other HTML elements like div, tr, p, ol, etc.

Browser support

98.4%

✅ No caveats.

https://caniuse.com/#feat=css-sel3

\ No newline at end of file +

Demo

  • Item 01
  • Item 02
  • Item 03
  • Item 04
  • Item 05

Explanation

  1. Use the :nth-child(odd) or :nth-child(even) pseudo-class to apply a different background color to elements that match based on their position in a group of siblings.

Note that you can use it to apply different styles to other HTML elements like div, tr, p, ol, etc.

Browser support

95.9%

✅ No caveats.

https://caniuse.com/#feat=css-sel3

\ No newline at end of file diff --git a/docs/js.6f9801cd.css b/docs/js.52a52df6.css similarity index 52% rename from docs/js.6f9801cd.css rename to docs/js.52a52df6.css index 803655cb6..54083c3c3 100644 --- a/docs/js.6f9801cd.css +++ b/docs/js.52a52df6.css @@ -1,4 +1,4 @@ -/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.15}body{margin:0}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}code[class*=language-],pre[class*=language-]{-moz-hyphens:none;-moz-tab-size:4;-ms-hyphens:none;-o-tab-size:4;-webkit-hyphens:none;-webkit-overflow-scrolling:touch;background:none;color:#d7ecff;font-family:Operator Mono,Roboto Mono,Menlo,Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1rem;hyphens:none;line-height:2;margin:0;tab-size:4;text-align:left;white-space:pre;word-break:normal;word-spacing:normal;word-wrap:normal}code[class*=language-]::-moz-selection,code[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection{background:#b3d4fc;text-shadow:none}code[class*=language-]::selection,code[class*=language-] ::selection,pre[class*=language-]::selection,pre[class*=language-] ::selection{background:#b3d4fc;text-shadow:none}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{overflow:auto;padding:.75rem 1.25rem}pre.is-option{margin:0;padding:0}:not(pre)>code[class*=language-],pre[class*=language-]{background:linear-gradient(-30deg,#273149,#1c273f);border-radius:.25rem}:not(pre)>code[class*=language-]{border-radius:.3em;padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8ca2d3}.token.attr-name,.token.selector{color:#c7f683}.token.punctuation{color:#5ac8e3}.namespace{opacity:.7}.token.tag{color:#2cefd8}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol{color:#85b4ff}.language-css .token.string,.token.attr-value,.token.builtin,.token.char,.token.inserted,.token.string,.token.url{color:#ffd694}.style .token.string,.token.entity,.token.operator{color:#ff9bbe}.token.atrule,.token.important,.token.keyword{color:#b7adff}.token.function{color:#25d0e5}.token.regex,.token.variable{color:#00a8d4}.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}html{box-sizing:border-box;font-size:.95rem}*,:after,:before{box-sizing:inherit}body{background:#f2f3f8;color:#324b64;font-family:-apple-system,BlinkMacSystemFont,Roboto,Segoe UI,Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.5}a{color:#157bda;overflow-wrap:break-word;text-decoration:none;word-wrap:break-word}a:hover{color:#0090ff}hr{border:0;border-top:1px solid rgba(0,32,128,.1)}ol,ul{padding-left:1.25rem}.container{margin:0 auto;max-width:64rem;padding:0 2%}.main>.container{padding:0}@media (min-width:579px){.main>.container{padding:0 2%}}@media (min-width:768px){html{font-size:1rem}}@media (min-width:992px){.content-wrapper{margin-left:20%}}@media (min-width:1400px){.content-wrapper{margin-left:275px}} +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}code[class*=language-],pre[class*=language-]{color:#d7ecff;background:none;font-family:Operator Mono,Roboto Mono,Menlo,Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:2;font-size:1rem;-webkit-overflow-scrolling:touch;margin:0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-]::-moz-selection,code[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-]::selection,code[class*=language-] ::selection,pre[class*=language-]::selection,pre[class*=language-] ::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{overflow:auto;padding:.75rem 1.25rem}pre.is-option{margin:0;padding:0}:not(pre)>code[class*=language-],pre[class*=language-]{background:linear-gradient(-30deg,#273149,#1c273f);border-radius:.25rem}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8ca2d3}.token.attr-name,.token.selector{color:#c7f683}.token.punctuation{color:#5ac8e3}.namespace{opacity:.7}.token.tag{color:#2cefd8}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol{color:#85b4ff}.language-css .token.string,.token.attr-value,.token.builtin,.token.char,.token.inserted,.token.string,.token.url{color:#ffd694}.style .token.string,.token.entity,.token.operator{color:#ff9bbe}.token.atrule,.token.important,.token.keyword{color:#b7adff}.token.function{color:#25d0e5}.token.regex,.token.variable{color:#00a8d4}.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}html{font-size:.95rem;box-sizing:border-box}*,:after,:before{box-sizing:inherit}body{font-family:-apple-system,BlinkMacSystemFont,Roboto,Segoe UI,Helvetica Neue,Helvetica,Arial,sans-serif;background:#f2f3f8;color:#324b64;line-height:1.5}a{color:#157bda;text-decoration:none;word-wrap:break-word;overflow-wrap:break-word}a:hover{color:#0090ff}hr{border:0;border-top:1px solid rgba(0,32,128,.1)}ol,ul{padding-left:1.25rem}.container{max-width:64rem;padding:0 2%;margin:0 auto}.main>.container{padding:0}@media (min-width:579px){.main>.container{padding:0 2%}}@media (min-width:768px){html{font-size:1rem}}@media (min-width:992px){.content-wrapper{margin-left:20%}}@media (min-width:1400px){.content-wrapper{margin-left:275px}} /*! * Hamburgers @@ -6,4 +6,4 @@ * @author Jonathan Suh @jonsuh * @site https://jonsuh.com/hamburgers * @link https://github.com/jonsuh/hamburgers - */.hamburger{background-color:transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font:inherit;margin:0;outline:0;overflow:visible;padding:1rem;text-transform:none;transition-duration:.15s;transition-property:opacity,filter;transition-timing-function:linear}.hamburger:hover{opacity:.7}.hamburger-box{display:inline-block;height:20px;position:relative;width:40px}.hamburger-inner{display:block;top:50%}.hamburger-inner,.hamburger-inner:after,.hamburger-inner:before{background-color:#e3f5ff;border-radius:4px;height:2px;position:absolute;transition-duration:.15s;transition-property:transform;transition-timing-function:ease;width:36px}.hamburger-inner:after,.hamburger-inner:before{content:"";display:block}.hamburger-inner:before{top:-10px}.hamburger-inner:after{bottom:-10px}.hamburger--3dx .hamburger-box{perspective:80px}.hamburger--3dx .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dx .hamburger-inner:after,.hamburger--3dx .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dx.is-active .hamburger-inner{background-color:transparent;transform:rotateY(180deg)}.hamburger--3dx.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dx.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dx-r .hamburger-box{perspective:80px}.hamburger--3dx-r .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dx-r .hamburger-inner:after,.hamburger--3dx-r .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dx-r.is-active .hamburger-inner{background-color:transparent;transform:rotateY(-180deg)}.hamburger--3dx-r.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dx-r.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dy .hamburger-box{perspective:80px}.hamburger--3dy .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dy .hamburger-inner:after,.hamburger--3dy .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dy.is-active .hamburger-inner{background-color:transparent;transform:rotateX(-180deg)}.hamburger--3dy.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dy.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dy-r .hamburger-box{perspective:80px}.hamburger--3dy-r .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dy-r .hamburger-inner:after,.hamburger--3dy-r .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dy-r.is-active .hamburger-inner{background-color:transparent;transform:rotateX(180deg)}.hamburger--3dy-r.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dy-r.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dxy .hamburger-box{perspective:80px}.hamburger--3dxy .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dxy .hamburger-inner:after,.hamburger--3dxy .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dxy.is-active .hamburger-inner{background-color:transparent;transform:rotateX(180deg) rotateY(180deg)}.hamburger--3dxy.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dxy.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dxy-r .hamburger-box{perspective:80px}.hamburger--3dxy-r .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dxy-r .hamburger-inner:after,.hamburger--3dxy-r .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dxy-r.is-active .hamburger-inner{background-color:transparent;transform:rotateX(180deg) rotateY(180deg) rotate(-180deg)}.hamburger--3dxy-r.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dxy-r.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--arrow.is-active .hamburger-inner:before{transform:translate3d(-8px,0,0) rotate(-45deg) scaleX(.7)}.hamburger--arrow.is-active .hamburger-inner:after{transform:translate3d(-8px,0,0) rotate(45deg) scaleX(.7)}.hamburger--arrow-r.is-active .hamburger-inner:before{transform:translate3d(8px,0,0) rotate(45deg) scaleX(.7)}.hamburger--arrow-r.is-active .hamburger-inner:after{transform:translate3d(8px,0,0) rotate(-45deg) scaleX(.7)}.hamburger--arrowalt .hamburger-inner:before{transition:top .1s ease .1s,transform .1s cubic-bezier(.165,.84,.44,1)}.hamburger--arrowalt .hamburger-inner:after{transition:bottom .1s ease .1s,transform .1s cubic-bezier(.165,.84,.44,1)}.hamburger--arrowalt.is-active .hamburger-inner:before{top:0;transform:translate3d(-8px,-10px,0) rotate(-45deg) scaleX(.7);transition:top .1s ease,transform .1s cubic-bezier(.895,.03,.685,.22) .1s}.hamburger--arrowalt.is-active .hamburger-inner:after{bottom:0;transform:translate3d(-8px,10px,0) rotate(45deg) scaleX(.7);transition:bottom .1s ease,transform .1s cubic-bezier(.895,.03,.685,.22) .1s}.hamburger--arrowalt-r .hamburger-inner:before{transition:top .1s ease .1s,transform .1s cubic-bezier(.165,.84,.44,1)}.hamburger--arrowalt-r .hamburger-inner:after{transition:bottom .1s ease .1s,transform .1s cubic-bezier(.165,.84,.44,1)}.hamburger--arrowalt-r.is-active .hamburger-inner:before{top:0;transform:translate3d(8px,-10px,0) rotate(45deg) scaleX(.7);transition:top .1s ease,transform .1s cubic-bezier(.895,.03,.685,.22) .1s}.hamburger--arrowalt-r.is-active .hamburger-inner:after{bottom:0;transform:translate3d(8px,10px,0) rotate(-45deg) scaleX(.7);transition:bottom .1s ease,transform .1s cubic-bezier(.895,.03,.685,.22) .1s}.hamburger--arrowturn.is-active .hamburger-inner{transform:rotate(-180deg)}.hamburger--arrowturn.is-active .hamburger-inner:before{transform:translate3d(8px,0,0) rotate(45deg) scaleX(.7)}.hamburger--arrowturn.is-active .hamburger-inner:after{transform:translate3d(8px,0,0) rotate(-45deg) scaleX(.7)}.hamburger--arrowturn-r.is-active .hamburger-inner{transform:rotate(-180deg)}.hamburger--arrowturn-r.is-active .hamburger-inner:before{transform:translate3d(-8px,0,0) rotate(-45deg) scaleX(.7)}.hamburger--arrowturn-r.is-active .hamburger-inner:after{transform:translate3d(-8px,0,0) rotate(45deg) scaleX(.7)}.hamburger--boring .hamburger-inner,.hamburger--boring .hamburger-inner:after,.hamburger--boring .hamburger-inner:before{transition-property:none}.hamburger--boring.is-active .hamburger-inner{transform:rotate(45deg)}.hamburger--boring.is-active .hamburger-inner:before{opacity:0;top:0}.hamburger--boring.is-active .hamburger-inner:after{bottom:0;transform:rotate(-90deg)}.hamburger--collapse .hamburger-inner{bottom:0;top:auto;transition-delay:.13s;transition-duration:.13s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--collapse .hamburger-inner:after{top:-20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,opacity .1s linear}.hamburger--collapse .hamburger-inner:before{transition:top .12s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--collapse.is-active .hamburger-inner{transform:translate3d(0,-10px,0) rotate(-45deg);transition-delay:.22s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--collapse.is-active .hamburger-inner:after{opacity:0;top:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),opacity .1s linear .22s}.hamburger--collapse.is-active .hamburger-inner:before{top:0;transform:rotate(-90deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .16s,transform .13s cubic-bezier(.215,.61,.355,1) .25s}.hamburger--collapse-r .hamburger-inner{bottom:0;top:auto;transition-delay:.13s;transition-duration:.13s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--collapse-r .hamburger-inner:after{top:-20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,opacity .1s linear}.hamburger--collapse-r .hamburger-inner:before{transition:top .12s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--collapse-r.is-active .hamburger-inner{transform:translate3d(0,-10px,0) rotate(45deg);transition-delay:.22s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--collapse-r.is-active .hamburger-inner:after{opacity:0;top:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),opacity .1s linear .22s}.hamburger--collapse-r.is-active .hamburger-inner:before{top:0;transform:rotate(90deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .16s,transform .13s cubic-bezier(.215,.61,.355,1) .25s}.hamburger--elastic .hamburger-inner{top:2px;transition-duration:.275s;transition-timing-function:cubic-bezier(.68,-.55,.265,1.55)}.hamburger--elastic .hamburger-inner:before{top:10px;transition:opacity .125s ease .275s}.hamburger--elastic .hamburger-inner:after{top:20px;transition:transform .275s cubic-bezier(.68,-.55,.265,1.55)}.hamburger--elastic.is-active .hamburger-inner{transform:translate3d(0,10px,0) rotate(135deg);transition-delay:75ms}.hamburger--elastic.is-active .hamburger-inner:before{opacity:0;transition-delay:0s}.hamburger--elastic.is-active .hamburger-inner:after{transform:translate3d(0,-20px,0) rotate(-270deg);transition-delay:75ms}.hamburger--elastic-r .hamburger-inner{top:2px;transition-duration:.275s;transition-timing-function:cubic-bezier(.68,-.55,.265,1.55)}.hamburger--elastic-r .hamburger-inner:before{top:10px;transition:opacity .125s ease .275s}.hamburger--elastic-r .hamburger-inner:after{top:20px;transition:transform .275s cubic-bezier(.68,-.55,.265,1.55)}.hamburger--elastic-r.is-active .hamburger-inner{transform:translate3d(0,10px,0) rotate(-135deg);transition-delay:75ms}.hamburger--elastic-r.is-active .hamburger-inner:before{opacity:0;transition-delay:0s}.hamburger--elastic-r.is-active .hamburger-inner:after{transform:translate3d(0,-20px,0) rotate(270deg);transition-delay:75ms}.hamburger--emphatic{overflow:hidden}.hamburger--emphatic .hamburger-inner{transition:background-color .125s ease-in .175s}.hamburger--emphatic .hamburger-inner:before{left:0;transition:transform .125s cubic-bezier(.6,.04,.98,.335),top .05s linear .125s,left .125s ease-in .175s}.hamburger--emphatic .hamburger-inner:after{right:0;top:10px;transition:transform .125s cubic-bezier(.6,.04,.98,.335),top .05s linear .125s,right .125s ease-in .175s}.hamburger--emphatic.is-active .hamburger-inner{background-color:transparent;transition-delay:0s;transition-timing-function:ease-out}.hamburger--emphatic.is-active .hamburger-inner:before{left:-80px;top:-80px;transform:translate3d(80px,80px,0) rotate(45deg);transition:left .125s ease-out,top .05s linear .125s,transform .125s cubic-bezier(.075,.82,.165,1) .175s}.hamburger--emphatic.is-active .hamburger-inner:after{right:-80px;top:-80px;transform:translate3d(-80px,80px,0) rotate(-45deg);transition:right .125s ease-out,top .05s linear .125s,transform .125s cubic-bezier(.075,.82,.165,1) .175s}.hamburger--emphatic-r{overflow:hidden}.hamburger--emphatic-r .hamburger-inner{transition:background-color .125s ease-in .175s}.hamburger--emphatic-r .hamburger-inner:before{left:0;transition:transform .125s cubic-bezier(.6,.04,.98,.335),top .05s linear .125s,left .125s ease-in .175s}.hamburger--emphatic-r .hamburger-inner:after{right:0;top:10px;transition:transform .125s cubic-bezier(.6,.04,.98,.335),top .05s linear .125s,right .125s ease-in .175s}.hamburger--emphatic-r.is-active .hamburger-inner{background-color:transparent;transition-delay:0s;transition-timing-function:ease-out}.hamburger--emphatic-r.is-active .hamburger-inner:before{left:-80px;top:80px;transform:translate3d(80px,-80px,0) rotate(-45deg);transition:left .125s ease-out,top .05s linear .125s,transform .125s cubic-bezier(.075,.82,.165,1) .175s}.hamburger--emphatic-r.is-active .hamburger-inner:after{right:-80px;top:80px;transform:translate3d(-80px,-80px,0) rotate(45deg);transition:right .125s ease-out,top .05s linear .125s,transform .125s cubic-bezier(.075,.82,.165,1) .175s}.hamburger--minus .hamburger-inner:after,.hamburger--minus .hamburger-inner:before{transition:bottom .08s ease-out 0s,top .08s ease-out 0s,opacity 0s linear}.hamburger--minus.is-active .hamburger-inner:after,.hamburger--minus.is-active .hamburger-inner:before{opacity:0;transition:bottom .08s ease-out,top .08s ease-out,opacity 0s linear .08s}.hamburger--minus.is-active .hamburger-inner:before{top:0}.hamburger--minus.is-active .hamburger-inner:after{bottom:0}.hamburger--slider .hamburger-inner{top:2px}.hamburger--slider .hamburger-inner:before{top:10px;transition-duration:.15s;transition-property:transform,opacity;transition-timing-function:ease}.hamburger--slider .hamburger-inner:after{top:20px}.hamburger--slider.is-active .hamburger-inner{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--slider.is-active .hamburger-inner:before{opacity:0;transform:rotate(-45deg) translate3d(-5.71429px,-6px,0)}.hamburger--slider.is-active .hamburger-inner:after{transform:translate3d(0,-20px,0) rotate(-90deg)}.hamburger--slider-r .hamburger-inner{top:2px}.hamburger--slider-r .hamburger-inner:before{top:10px;transition-duration:.15s;transition-property:transform,opacity;transition-timing-function:ease}.hamburger--slider-r .hamburger-inner:after{top:20px}.hamburger--slider-r.is-active .hamburger-inner{transform:translate3d(0,10px,0) rotate(-45deg)}.hamburger--slider-r.is-active .hamburger-inner:before{opacity:0;transform:rotate(45deg) translate3d(5.71429px,-6px,0)}.hamburger--slider-r.is-active .hamburger-inner:after{transform:translate3d(0,-20px,0) rotate(90deg)}.hamburger--spin .hamburger-inner{transition-duration:.22s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--spin .hamburger-inner:before{transition:top .1s ease-in .25s,opacity .1s ease-in}.hamburger--spin .hamburger-inner:after{transition:bottom .1s ease-in .25s,transform .22s cubic-bezier(.55,.055,.675,.19)}.hamburger--spin.is-active .hamburger-inner{transform:rotate(225deg);transition-delay:.12s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--spin.is-active .hamburger-inner:before{opacity:0;top:0;transition:top .1s ease-out,opacity .1s ease-out .12s}.hamburger--spin.is-active .hamburger-inner:after{bottom:0;transform:rotate(-90deg);transition:bottom .1s ease-out,transform .22s cubic-bezier(.215,.61,.355,1) .12s}.hamburger--spin-r .hamburger-inner{transition-duration:.22s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--spin-r .hamburger-inner:before{transition:top .1s ease-in .25s,opacity .1s ease-in}.hamburger--spin-r .hamburger-inner:after{transition:bottom .1s ease-in .25s,transform .22s cubic-bezier(.55,.055,.675,.19)}.hamburger--spin-r.is-active .hamburger-inner{transform:rotate(-225deg);transition-delay:.12s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--spin-r.is-active .hamburger-inner:before{opacity:0;top:0;transition:top .1s ease-out,opacity .1s ease-out .12s}.hamburger--spin-r.is-active .hamburger-inner:after{bottom:0;transform:rotate(90deg);transition:bottom .1s ease-out,transform .22s cubic-bezier(.215,.61,.355,1) .12s}.hamburger--spring .hamburger-inner{top:2px;transition:background-color 0s linear .13s}.hamburger--spring .hamburger-inner:before{top:10px;transition:top .1s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--spring .hamburger-inner:after{top:20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--spring.is-active .hamburger-inner{background-color:transparent;transition-delay:.22s}.hamburger--spring.is-active .hamburger-inner:before{top:0;transform:translate3d(0,10px,0) rotate(45deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .15s,transform .13s cubic-bezier(.215,.61,.355,1) .22s}.hamburger--spring.is-active .hamburger-inner:after{top:0;transform:translate3d(0,10px,0) rotate(-45deg);transition:top .2s cubic-bezier(.33333,0,.66667,.33333),transform .13s cubic-bezier(.215,.61,.355,1) .22s}.hamburger--spring-r .hamburger-inner{bottom:0;top:auto;transition-delay:0s;transition-duration:.13s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--spring-r .hamburger-inner:after{top:-20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,opacity 0s linear}.hamburger--spring-r .hamburger-inner:before{transition:top .1s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--spring-r.is-active .hamburger-inner{transform:translate3d(0,-10px,0) rotate(-45deg);transition-delay:.22s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--spring-r.is-active .hamburger-inner:after{opacity:0;top:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),opacity 0s linear .22s}.hamburger--spring-r.is-active .hamburger-inner:before{top:0;transform:rotate(90deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .15s,transform .13s cubic-bezier(.215,.61,.355,1) .22s}.hamburger--stand .hamburger-inner{transition:transform 75ms cubic-bezier(.55,.055,.675,.19) .15s,background-color 0s linear 75ms}.hamburger--stand .hamburger-inner:before{transition:top 75ms ease-in 75ms,transform 75ms cubic-bezier(.55,.055,.675,.19) 0s}.hamburger--stand .hamburger-inner:after{transition:bottom 75ms ease-in 75ms,transform 75ms cubic-bezier(.55,.055,.675,.19) 0s}.hamburger--stand.is-active .hamburger-inner{background-color:transparent;transform:rotate(90deg);transition:transform 75ms cubic-bezier(.215,.61,.355,1) 0s,background-color 0s linear .15s}.hamburger--stand.is-active .hamburger-inner:before{top:0;transform:rotate(-45deg);transition:top 75ms ease-out .1s,transform 75ms cubic-bezier(.215,.61,.355,1) .15s}.hamburger--stand.is-active .hamburger-inner:after{bottom:0;transform:rotate(45deg);transition:bottom 75ms ease-out .1s,transform 75ms cubic-bezier(.215,.61,.355,1) .15s}.hamburger--stand-r .hamburger-inner{transition:transform 75ms cubic-bezier(.55,.055,.675,.19) .15s,background-color 0s linear 75ms}.hamburger--stand-r .hamburger-inner:before{transition:top 75ms ease-in 75ms,transform 75ms cubic-bezier(.55,.055,.675,.19) 0s}.hamburger--stand-r .hamburger-inner:after{transition:bottom 75ms ease-in 75ms,transform 75ms cubic-bezier(.55,.055,.675,.19) 0s}.hamburger--stand-r.is-active .hamburger-inner{background-color:transparent;transform:rotate(-90deg);transition:transform 75ms cubic-bezier(.215,.61,.355,1) 0s,background-color 0s linear .15s}.hamburger--stand-r.is-active .hamburger-inner:before{top:0;transform:rotate(-45deg);transition:top 75ms ease-out .1s,transform 75ms cubic-bezier(.215,.61,.355,1) .15s}.hamburger--stand-r.is-active .hamburger-inner:after{bottom:0;transform:rotate(45deg);transition:bottom 75ms ease-out .1s,transform 75ms cubic-bezier(.215,.61,.355,1) .15s}.hamburger--squeeze .hamburger-inner{transition-duration:75ms;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--squeeze .hamburger-inner:before{transition:top 75ms ease .12s,opacity 75ms ease}.hamburger--squeeze .hamburger-inner:after{transition:bottom 75ms ease .12s,transform 75ms cubic-bezier(.55,.055,.675,.19)}.hamburger--squeeze.is-active .hamburger-inner{transform:rotate(45deg);transition-delay:.12s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--squeeze.is-active .hamburger-inner:before{opacity:0;top:0;transition:top 75ms ease,opacity 75ms ease .12s}.hamburger--squeeze.is-active .hamburger-inner:after{bottom:0;transform:rotate(-90deg);transition:bottom 75ms ease,transform 75ms cubic-bezier(.215,.61,.355,1) .12s}.hamburger--vortex .hamburger-inner{transition-duration:.2s;transition-timing-function:cubic-bezier(.19,1,.22,1)}.hamburger--vortex .hamburger-inner:after,.hamburger--vortex .hamburger-inner:before{transition-delay:.1s;transition-duration:0s;transition-timing-function:linear}.hamburger--vortex .hamburger-inner:before{transition-property:top,opacity}.hamburger--vortex .hamburger-inner:after{transition-property:bottom,transform}.hamburger--vortex.is-active .hamburger-inner{transform:rotate(765deg);transition-timing-function:cubic-bezier(.19,1,.22,1)}.hamburger--vortex.is-active .hamburger-inner:after,.hamburger--vortex.is-active .hamburger-inner:before{transition-delay:0s}.hamburger--vortex.is-active .hamburger-inner:before{opacity:0;top:0}.hamburger--vortex.is-active .hamburger-inner:after{bottom:0;transform:rotate(90deg)}.hamburger--vortex-r .hamburger-inner{transition-duration:.2s;transition-timing-function:cubic-bezier(.19,1,.22,1)}.hamburger--vortex-r .hamburger-inner:after,.hamburger--vortex-r .hamburger-inner:before{transition-delay:.1s;transition-duration:0s;transition-timing-function:linear}.hamburger--vortex-r .hamburger-inner:before{transition-property:top,opacity}.hamburger--vortex-r .hamburger-inner:after{transition-property:bottom,transform}.hamburger--vortex-r.is-active .hamburger-inner{transform:rotate(-765deg);transition-timing-function:cubic-bezier(.19,1,.22,1)}.hamburger--vortex-r.is-active .hamburger-inner:after,.hamburger--vortex-r.is-active .hamburger-inner:before{transition-delay:0s}.hamburger--vortex-r.is-active .hamburger-inner:before{opacity:0;top:0}.hamburger--vortex-r.is-active .hamburger-inner:after{bottom:0;transform:rotate(-90deg)}.sidebar{background:#273149;box-shadow:0 .25rem .5rem -.1rem rgba(0,32,128,.2);height:44px;position:fixed;width:100%;z-index:2}.sidebar__menu{border:none;font-weight:700;left:0;outline:0;padding:.75rem 1rem;position:absolute;text-align:left;text-transform:uppercase;top:0}.sidebar__menu-icon{height:24px}.sidebar__links{-webkit-overflow-scrolling:touch;background:#273149;box-shadow:0 .25rem .5rem -.1rem rgba(0,32,128,.2);margin-top:44px;max-height:378px;opacity:0;overflow-y:auto;padding-bottom:1rem;transform:rotateX(-90deg);transform-origin:0 0;transition:transform .6s cubic-bezier(.165,.84,.44,1);visibility:hidden}.sidebar__links.is-active{opacity:1;transform:rotateX(0);visibility:visible}.sidebar__link{border-left:2px solid #576a85;color:#e3f5ff;display:block;font-size:.95rem;font-weight:500;margin-right:-.75rem;padding:.75rem 1.5rem .75rem .75rem;transition:all .1s ease-out}.sidebar__link:hover{background:hsla(0,0%,100%,.1);border-color:pink;color:#88f4ff}.sidebar__section{padding:0 .75rem}.sidebar__section-heading{color:#e3f5ff;margin-bottom:.5rem;text-transform:capitalize}.sidebar__new{margin-right:.25rem;vertical-align:middle;width:1.25rem}@media (min-width:992px){.sidebar{background:linear-gradient(-30deg,#273149,#1c273f);bottom:0;box-shadow:.4rem .4rem .8rem rgba(0,32,64,.1);color:#fff;height:100%;left:0;overflow-y:auto;top:0;width:20%}}@media (min-width:992px) and (min-width:1400px){.sidebar{width:275px}}@media (min-width:992px){.sidebar__links{background:none;box-shadow:none;margin-top:0;max-height:none;opacity:1;transform:rotateX(0);visibility:visible}.sidebar__menu{display:none}}html:not(.macOS) .sidebar::-webkit-scrollbar-track{background-color:rgba(0,0,0,.6)}html:not(.macOS) .sidebar::-webkit-scrollbar{background-color:#505b76;width:10px}html:not(.macOS) .sidebar::-webkit-scrollbar-thumb{background-color:#505b76}.header{background:#5b67ff;background:linear-gradient(25deg,#95e2ff,#5f79ff,#8ed5ff);color:#fff;margin-bottom:2rem;overflow:hidden;padding:5rem 1rem 4rem;position:relative;text-align:center;z-index:1}.header:before{content:"";height:150%;left:0;opacity:.1;position:absolute;top:0;width:150%;z-index:-1}.header:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M12 0l12 12H0z' fill='%23f2f3f8'/%3E%3C/svg%3E");background-size:24px 24px;bottom:-7px;content:"";height:24px;left:0;position:absolute;width:100%;z-index:3}.header__content{position:relative;z-index:3}.header__logo{height:146px;user-select:none}.header__heading{font-size:3rem;font-weight:300;line-height:1.2;margin:1rem 0}.header__description{font-size:1.5rem;font-weight:300;letter-spacing:.4px;margin:0 auto 2rem;max-width:600px}.header__css{font-size:4rem;font-weight:700}.header__github-button-wrapper{height:28px}.header__github-button{color:#fff}.header__leaves{width:250px}#header__blob,.header__leaves{position:absolute;user-select:none}#header__blob{left:-25px;top:50px;width:240px}#header__leaves1{right:-100px;top:-50px}#header__leaves2{bottom:-100px;left:-250px;transform:rotate(235deg);width:400px;z-index:2}@media (min-width:1150px){#header__leaves2{left:-100px;transform:rotate(180deg)}#header__blob{left:50px;top:5px}}@media (min-width:579px){.header{padding:6rem 0 5rem}.header__heading{font-size:3.75rem}}@media (min-width:992px){.header{padding:2.5rem 0 5rem}}.snippet{background:#fff;border-radius:.25rem;box-shadow:0 .4rem .8rem -.1rem rgba(0,32,128,.1),0 0 0 1px #f0f2f7;font-size:1.1rem;margin-bottom:1.5rem;padding:2rem 5%;position:relative}.snippet h3{border-bottom:1px solid rgba(0,32,128,.1);font-size:2rem;line-height:1.3;margin-bottom:1.25rem;margin-top:0;padding:.5rem 0}.snippet h3 span:not(.snippet__tag){margin-right:.75rem}.snippet code:not([class*=lang]){background:#fcfaff;border:1px solid #e2ddff;border-radius:.15rem;color:#4b00da;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:.9rem;margin:0 .1rem;padding:.2rem .4rem}.snippet ol{margin-top:.5rem}.snippet ol>li{margin-bottom:.5rem}.snippet>p{margin-top:.5rem}.snippet h4{display:inline-block;font-size:1.1rem;line-height:2;margin:1rem 0 .5rem}.snippet h4[data-type]{background:#333;background:#fff;background-repeat:no-repeat;border:1px solid #c6d6ea;border-bottom-color:#b3c9e3;border-radius:3px;box-shadow:0 .25rem .5rem -.1rem rgba(0,32,64,.15);font-size:.9rem;padding:0 .5rem;text-transform:uppercase}.snippet h4[data-type=HTML]{background-image:linear-gradient(135deg,#ff4c9f,#ff7b74);border:none;color:#fff}.snippet h4[data-type=CSS]{background-image:linear-gradient(135deg,#7983ff,#5f9de9);border:none;color:#fff}.snippet h4[data-type=JavaScript]{background-image:linear-gradient(135deg,#ffb000,#f58818);border:none;color:#fff}.snippet__browser-support{display:inline-block;font-size:2rem;font-weight:200;line-height:1;margin:.5rem 0}.snippet__subheading.is-html{color:#e22f70}.snippet__subheading.is-css{color:#0a91d4}.snippet__subheading.is-explanation{color:#4b00da}.snippet__support-note{color:#9fa5b5;font-weight:700}.snippet__requires-javascript{background:red;background:linear-gradient(145deg,#ff003b,#ff4b39);color:#fff;font-size:.9rem;font-weight:700;padding:.25rem .5rem;position:absolute;right:0;top:1rem;transform:rotate(20deg)}.snippet__new{left:50%;position:absolute;top:-1rem;transform:translateX(-50%);width:3rem}.snippet-demo{background:#f5f6f9;border-radius:.25rem;padding:.75rem 1.25rem}.snippet-demo.is-distinct{background:linear-gradient(135deg,#ff4c9f,#ff7b74)}@media (min-width:768px){.snippet__requires-javascript{right:-.5rem}}.back-to-top-button{align-items:center;background:#fff;border:1px solid rgba(0,32,128,.1);border-radius:50%;bottom:2rem;box-shadow:0 .4rem .8rem -.1rem rgba(0,32,128,.15);color:inherit;cursor:pointer;display:flex;font-weight:700;height:4rem;justify-content:center;opacity:0;outline:0;position:fixed;right:2rem;transition:all .2s ease-out;user-select:none;visibility:hidden;width:4rem;z-index:1}.back-to-top-button:focus,.back-to-top-button:hover{box-shadow:0 .8rem 1.6rem -.2rem rgba(0,32,128,.15);color:#35a8ff;transform:scale(1.1)}.back-to-top-button:focus{box-shadow:0 .8rem 1.6rem -.2rem rgba(0,32,128,.15),0 0 2px 2px #35a8ff;outline-style:none}.back-to-top-button.is-visible{opacity:1;visibility:visible}.back-to-top-button .feather{height:2rem;width:2rem}.tags{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;margin-bottom:1rem;padding:0 1rem}.tags,.tags__tag{position:relative}.tags__tag{border:1px solid #c8cbf2;border-radius:2px;color:#8385aa;display:inline-block;font-size:.75rem;font-weight:700;line-height:2;margin:0 .1rem;outline:0;padding:0 .5rem;text-transform:uppercase;top:-1px;transition:all .1s ease-out;vertical-align:middle;white-space:nowrap}.tags__tag.is-large{border-radius:.2rem;font-size:.95rem}.tags__tag.is-large .feather{height:18px;top:-2px;width:18px}.tags__tag .feather{height:14px;margin-right:.25rem;position:relative;top:-1px;vertical-align:middle;width:14px}.tags button.tags__tag{background:#fff;cursor:pointer;margin-bottom:1rem;margin-right:1rem;user-select:none}.tags button.tags__tag:hover{background:#8385aa;border-color:#8385aa;color:#fff}.tags button.tags__tag.focus-visible:focus{box-shadow:0 0 0 .25rem rgba(131,133,170,.5)}.tags button.tags__tag:active{background:#666894;border-color:#666894;box-shadow:inset 0 .1rem .1rem .1rem rgba(0,0,0,.2)}.tags button.tags__tag.is-active{background:#7983ff;border-color:#7983ff;color:#fff}.tags button.tags__tag.is-active.focus-visible:focus{box-shadow:0 0 0 .25rem rgba(121,131,255,.5)}.btn{border:1px solid #c8cbf2;border-radius:2px;color:#8385aa;display:inline-block;font-size:.75rem;font-weight:700;line-height:2;margin-right:.5rem;outline:0;padding:0 .5rem;position:relative;text-transform:uppercase;top:-1px;transition:all .1s ease-out;vertical-align:middle;white-space:nowrap}.btn.is-large{border-radius:.2rem;font-size:.95rem}.btn.is-large .feather{height:18px;top:-2px;width:18px}.btn .feather{height:14px;margin-right:.25rem;position:relative;top:-1px;vertical-align:middle;width:14px}button.btn{background:#fff;cursor:pointer;margin-bottom:1rem;margin-right:1rem;user-select:none}button.btn:hover{background:#8385aa;border-color:#8385aa;color:#fff}button.btn.focus-visible:focus{box-shadow:0 0 0 .25rem rgba(131,133,170,.5)}button.btn:active{background:#666894;border-color:#666894;box-shadow:inset 0 .1rem .1rem .1rem rgba(0,0,0,.2)}button.btn.is-active{background:#7983ff;border-color:#7983ff;color:#fff}button.btn.is-active.focus-visible:focus{box-shadow:0 0 0 .25rem rgba(121,131,255,.5)}button.btn.codepen-btn{margin-top:.5rem} \ No newline at end of file + */.hamburger{padding:1rem;display:inline-block;cursor:pointer;transition-property:opacity,filter;transition-duration:.15s;transition-timing-function:linear;font:inherit;color:inherit;text-transform:none;background-color:transparent;border:0;margin:0;overflow:visible;outline:0}.hamburger:hover{opacity:.7}.hamburger-box{width:40px;height:20px;display:inline-block;position:relative}.hamburger-inner{display:block;top:50%}.hamburger-inner,.hamburger-inner:after,.hamburger-inner:before{width:36px;height:2px;background-color:#e3f5ff;border-radius:4px;position:absolute;transition-property:transform;transition-duration:.15s;transition-timing-function:ease}.hamburger-inner:after,.hamburger-inner:before{content:"";display:block}.hamburger-inner:before{top:-10px}.hamburger-inner:after{bottom:-10px}.hamburger--3dx .hamburger-box{perspective:80px}.hamburger--3dx .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dx .hamburger-inner:after,.hamburger--3dx .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dx.is-active .hamburger-inner{background-color:transparent;transform:rotateY(180deg)}.hamburger--3dx.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dx.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dx-r .hamburger-box{perspective:80px}.hamburger--3dx-r .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dx-r .hamburger-inner:after,.hamburger--3dx-r .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dx-r.is-active .hamburger-inner{background-color:transparent;transform:rotateY(-180deg)}.hamburger--3dx-r.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dx-r.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dy .hamburger-box{perspective:80px}.hamburger--3dy .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dy .hamburger-inner:after,.hamburger--3dy .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dy.is-active .hamburger-inner{background-color:transparent;transform:rotateX(-180deg)}.hamburger--3dy.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dy.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dy-r .hamburger-box{perspective:80px}.hamburger--3dy-r .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dy-r .hamburger-inner:after,.hamburger--3dy-r .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dy-r.is-active .hamburger-inner{background-color:transparent;transform:rotateX(180deg)}.hamburger--3dy-r.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dy-r.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dxy .hamburger-box{perspective:80px}.hamburger--3dxy .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dxy .hamburger-inner:after,.hamburger--3dxy .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dxy.is-active .hamburger-inner{background-color:transparent;transform:rotateX(180deg) rotateY(180deg)}.hamburger--3dxy.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dxy.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--3dxy-r .hamburger-box{perspective:80px}.hamburger--3dxy-r .hamburger-inner{transition:transform .15s cubic-bezier(.645,.045,.355,1),background-color 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dxy-r .hamburger-inner:after,.hamburger--3dxy-r .hamburger-inner:before{transition:transform 0s cubic-bezier(.645,.045,.355,1) .1s}.hamburger--3dxy-r.is-active .hamburger-inner{background-color:transparent;transform:rotateX(180deg) rotateY(180deg) rotate(-180deg)}.hamburger--3dxy-r.is-active .hamburger-inner:before{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--3dxy-r.is-active .hamburger-inner:after{transform:translate3d(0,-10px,0) rotate(-45deg)}.hamburger--arrow.is-active .hamburger-inner:before{transform:translate3d(-8px,0,0) rotate(-45deg) scaleX(.7)}.hamburger--arrow.is-active .hamburger-inner:after{transform:translate3d(-8px,0,0) rotate(45deg) scaleX(.7)}.hamburger--arrow-r.is-active .hamburger-inner:before{transform:translate3d(8px,0,0) rotate(45deg) scaleX(.7)}.hamburger--arrow-r.is-active .hamburger-inner:after{transform:translate3d(8px,0,0) rotate(-45deg) scaleX(.7)}.hamburger--arrowalt .hamburger-inner:before{transition:top .1s ease .1s,transform .1s cubic-bezier(.165,.84,.44,1)}.hamburger--arrowalt .hamburger-inner:after{transition:bottom .1s ease .1s,transform .1s cubic-bezier(.165,.84,.44,1)}.hamburger--arrowalt.is-active .hamburger-inner:before{top:0;transform:translate3d(-8px,-10px,0) rotate(-45deg) scaleX(.7);transition:top .1s ease,transform .1s cubic-bezier(.895,.03,.685,.22) .1s}.hamburger--arrowalt.is-active .hamburger-inner:after{bottom:0;transform:translate3d(-8px,10px,0) rotate(45deg) scaleX(.7);transition:bottom .1s ease,transform .1s cubic-bezier(.895,.03,.685,.22) .1s}.hamburger--arrowalt-r .hamburger-inner:before{transition:top .1s ease .1s,transform .1s cubic-bezier(.165,.84,.44,1)}.hamburger--arrowalt-r .hamburger-inner:after{transition:bottom .1s ease .1s,transform .1s cubic-bezier(.165,.84,.44,1)}.hamburger--arrowalt-r.is-active .hamburger-inner:before{top:0;transform:translate3d(8px,-10px,0) rotate(45deg) scaleX(.7);transition:top .1s ease,transform .1s cubic-bezier(.895,.03,.685,.22) .1s}.hamburger--arrowalt-r.is-active .hamburger-inner:after{bottom:0;transform:translate3d(8px,10px,0) rotate(-45deg) scaleX(.7);transition:bottom .1s ease,transform .1s cubic-bezier(.895,.03,.685,.22) .1s}.hamburger--arrowturn.is-active .hamburger-inner{transform:rotate(-180deg)}.hamburger--arrowturn.is-active .hamburger-inner:before{transform:translate3d(8px,0,0) rotate(45deg) scaleX(.7)}.hamburger--arrowturn.is-active .hamburger-inner:after{transform:translate3d(8px,0,0) rotate(-45deg) scaleX(.7)}.hamburger--arrowturn-r.is-active .hamburger-inner{transform:rotate(-180deg)}.hamburger--arrowturn-r.is-active .hamburger-inner:before{transform:translate3d(-8px,0,0) rotate(-45deg) scaleX(.7)}.hamburger--arrowturn-r.is-active .hamburger-inner:after{transform:translate3d(-8px,0,0) rotate(45deg) scaleX(.7)}.hamburger--boring .hamburger-inner,.hamburger--boring .hamburger-inner:after,.hamburger--boring .hamburger-inner:before{transition-property:none}.hamburger--boring.is-active .hamburger-inner{transform:rotate(45deg)}.hamburger--boring.is-active .hamburger-inner:before{top:0;opacity:0}.hamburger--boring.is-active .hamburger-inner:after{bottom:0;transform:rotate(-90deg)}.hamburger--collapse .hamburger-inner{top:auto;bottom:0;transition-duration:.13s;transition-delay:.13s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--collapse .hamburger-inner:after{top:-20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,opacity .1s linear}.hamburger--collapse .hamburger-inner:before{transition:top .12s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--collapse.is-active .hamburger-inner{transform:translate3d(0,-10px,0) rotate(-45deg);transition-delay:.22s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--collapse.is-active .hamburger-inner:after{top:0;opacity:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),opacity .1s linear .22s}.hamburger--collapse.is-active .hamburger-inner:before{top:0;transform:rotate(-90deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .16s,transform .13s cubic-bezier(.215,.61,.355,1) .25s}.hamburger--collapse-r .hamburger-inner{top:auto;bottom:0;transition-duration:.13s;transition-delay:.13s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--collapse-r .hamburger-inner:after{top:-20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,opacity .1s linear}.hamburger--collapse-r .hamburger-inner:before{transition:top .12s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--collapse-r.is-active .hamburger-inner{transform:translate3d(0,-10px,0) rotate(45deg);transition-delay:.22s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--collapse-r.is-active .hamburger-inner:after{top:0;opacity:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),opacity .1s linear .22s}.hamburger--collapse-r.is-active .hamburger-inner:before{top:0;transform:rotate(90deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .16s,transform .13s cubic-bezier(.215,.61,.355,1) .25s}.hamburger--elastic .hamburger-inner{top:2px;transition-duration:.275s;transition-timing-function:cubic-bezier(.68,-.55,.265,1.55)}.hamburger--elastic .hamburger-inner:before{top:10px;transition:opacity .125s ease .275s}.hamburger--elastic .hamburger-inner:after{top:20px;transition:transform .275s cubic-bezier(.68,-.55,.265,1.55)}.hamburger--elastic.is-active .hamburger-inner{transform:translate3d(0,10px,0) rotate(135deg);transition-delay:75ms}.hamburger--elastic.is-active .hamburger-inner:before{transition-delay:0s;opacity:0}.hamburger--elastic.is-active .hamburger-inner:after{transform:translate3d(0,-20px,0) rotate(-270deg);transition-delay:75ms}.hamburger--elastic-r .hamburger-inner{top:2px;transition-duration:.275s;transition-timing-function:cubic-bezier(.68,-.55,.265,1.55)}.hamburger--elastic-r .hamburger-inner:before{top:10px;transition:opacity .125s ease .275s}.hamburger--elastic-r .hamburger-inner:after{top:20px;transition:transform .275s cubic-bezier(.68,-.55,.265,1.55)}.hamburger--elastic-r.is-active .hamburger-inner{transform:translate3d(0,10px,0) rotate(-135deg);transition-delay:75ms}.hamburger--elastic-r.is-active .hamburger-inner:before{transition-delay:0s;opacity:0}.hamburger--elastic-r.is-active .hamburger-inner:after{transform:translate3d(0,-20px,0) rotate(270deg);transition-delay:75ms}.hamburger--emphatic{overflow:hidden}.hamburger--emphatic .hamburger-inner{transition:background-color .125s ease-in .175s}.hamburger--emphatic .hamburger-inner:before{left:0;transition:transform .125s cubic-bezier(.6,.04,.98,.335),top .05s linear .125s,left .125s ease-in .175s}.hamburger--emphatic .hamburger-inner:after{top:10px;right:0;transition:transform .125s cubic-bezier(.6,.04,.98,.335),top .05s linear .125s,right .125s ease-in .175s}.hamburger--emphatic.is-active .hamburger-inner{transition-delay:0s;transition-timing-function:ease-out;background-color:transparent}.hamburger--emphatic.is-active .hamburger-inner:before{left:-80px;top:-80px;transform:translate3d(80px,80px,0) rotate(45deg);transition:left .125s ease-out,top .05s linear .125s,transform .125s cubic-bezier(.075,.82,.165,1) .175s}.hamburger--emphatic.is-active .hamburger-inner:after{right:-80px;top:-80px;transform:translate3d(-80px,80px,0) rotate(-45deg);transition:right .125s ease-out,top .05s linear .125s,transform .125s cubic-bezier(.075,.82,.165,1) .175s}.hamburger--emphatic-r{overflow:hidden}.hamburger--emphatic-r .hamburger-inner{transition:background-color .125s ease-in .175s}.hamburger--emphatic-r .hamburger-inner:before{left:0;transition:transform .125s cubic-bezier(.6,.04,.98,.335),top .05s linear .125s,left .125s ease-in .175s}.hamburger--emphatic-r .hamburger-inner:after{top:10px;right:0;transition:transform .125s cubic-bezier(.6,.04,.98,.335),top .05s linear .125s,right .125s ease-in .175s}.hamburger--emphatic-r.is-active .hamburger-inner{transition-delay:0s;transition-timing-function:ease-out;background-color:transparent}.hamburger--emphatic-r.is-active .hamburger-inner:before{left:-80px;top:80px;transform:translate3d(80px,-80px,0) rotate(-45deg);transition:left .125s ease-out,top .05s linear .125s,transform .125s cubic-bezier(.075,.82,.165,1) .175s}.hamburger--emphatic-r.is-active .hamburger-inner:after{right:-80px;top:80px;transform:translate3d(-80px,-80px,0) rotate(45deg);transition:right .125s ease-out,top .05s linear .125s,transform .125s cubic-bezier(.075,.82,.165,1) .175s}.hamburger--minus .hamburger-inner:after,.hamburger--minus .hamburger-inner:before{transition:bottom .08s ease-out 0s,top .08s ease-out 0s,opacity 0s linear}.hamburger--minus.is-active .hamburger-inner:after,.hamburger--minus.is-active .hamburger-inner:before{opacity:0;transition:bottom .08s ease-out,top .08s ease-out,opacity 0s linear .08s}.hamburger--minus.is-active .hamburger-inner:before{top:0}.hamburger--minus.is-active .hamburger-inner:after{bottom:0}.hamburger--slider .hamburger-inner{top:2px}.hamburger--slider .hamburger-inner:before{top:10px;transition-property:transform,opacity;transition-timing-function:ease;transition-duration:.15s}.hamburger--slider .hamburger-inner:after{top:20px}.hamburger--slider.is-active .hamburger-inner{transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--slider.is-active .hamburger-inner:before{transform:rotate(-45deg) translate3d(-5.71429px,-6px,0);opacity:0}.hamburger--slider.is-active .hamburger-inner:after{transform:translate3d(0,-20px,0) rotate(-90deg)}.hamburger--slider-r .hamburger-inner{top:2px}.hamburger--slider-r .hamburger-inner:before{top:10px;transition-property:transform,opacity;transition-timing-function:ease;transition-duration:.15s}.hamburger--slider-r .hamburger-inner:after{top:20px}.hamburger--slider-r.is-active .hamburger-inner{transform:translate3d(0,10px,0) rotate(-45deg)}.hamburger--slider-r.is-active .hamburger-inner:before{transform:rotate(45deg) translate3d(5.71429px,-6px,0);opacity:0}.hamburger--slider-r.is-active .hamburger-inner:after{transform:translate3d(0,-20px,0) rotate(90deg)}.hamburger--spin .hamburger-inner{transition-duration:.22s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--spin .hamburger-inner:before{transition:top .1s ease-in .25s,opacity .1s ease-in}.hamburger--spin .hamburger-inner:after{transition:bottom .1s ease-in .25s,transform .22s cubic-bezier(.55,.055,.675,.19)}.hamburger--spin.is-active .hamburger-inner{transform:rotate(225deg);transition-delay:.12s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--spin.is-active .hamburger-inner:before{top:0;opacity:0;transition:top .1s ease-out,opacity .1s ease-out .12s}.hamburger--spin.is-active .hamburger-inner:after{bottom:0;transform:rotate(-90deg);transition:bottom .1s ease-out,transform .22s cubic-bezier(.215,.61,.355,1) .12s}.hamburger--spin-r .hamburger-inner{transition-duration:.22s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--spin-r .hamburger-inner:before{transition:top .1s ease-in .25s,opacity .1s ease-in}.hamburger--spin-r .hamburger-inner:after{transition:bottom .1s ease-in .25s,transform .22s cubic-bezier(.55,.055,.675,.19)}.hamburger--spin-r.is-active .hamburger-inner{transform:rotate(-225deg);transition-delay:.12s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--spin-r.is-active .hamburger-inner:before{top:0;opacity:0;transition:top .1s ease-out,opacity .1s ease-out .12s}.hamburger--spin-r.is-active .hamburger-inner:after{bottom:0;transform:rotate(90deg);transition:bottom .1s ease-out,transform .22s cubic-bezier(.215,.61,.355,1) .12s}.hamburger--spring .hamburger-inner{top:2px;transition:background-color 0s linear .13s}.hamburger--spring .hamburger-inner:before{top:10px;transition:top .1s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--spring .hamburger-inner:after{top:20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--spring.is-active .hamburger-inner{transition-delay:.22s;background-color:transparent}.hamburger--spring.is-active .hamburger-inner:before{top:0;transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .15s,transform .13s cubic-bezier(.215,.61,.355,1) .22s;transform:translate3d(0,10px,0) rotate(45deg)}.hamburger--spring.is-active .hamburger-inner:after{top:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),transform .13s cubic-bezier(.215,.61,.355,1) .22s;transform:translate3d(0,10px,0) rotate(-45deg)}.hamburger--spring-r .hamburger-inner{top:auto;bottom:0;transition-duration:.13s;transition-delay:0s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--spring-r .hamburger-inner:after{top:-20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,opacity 0s linear}.hamburger--spring-r .hamburger-inner:before{transition:top .1s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.hamburger--spring-r.is-active .hamburger-inner{transform:translate3d(0,-10px,0) rotate(-45deg);transition-delay:.22s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--spring-r.is-active .hamburger-inner:after{top:0;opacity:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),opacity 0s linear .22s}.hamburger--spring-r.is-active .hamburger-inner:before{top:0;transform:rotate(90deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .15s,transform .13s cubic-bezier(.215,.61,.355,1) .22s}.hamburger--stand .hamburger-inner{transition:transform 75ms cubic-bezier(.55,.055,.675,.19) .15s,background-color 0s linear 75ms}.hamburger--stand .hamburger-inner:before{transition:top 75ms ease-in 75ms,transform 75ms cubic-bezier(.55,.055,.675,.19) 0s}.hamburger--stand .hamburger-inner:after{transition:bottom 75ms ease-in 75ms,transform 75ms cubic-bezier(.55,.055,.675,.19) 0s}.hamburger--stand.is-active .hamburger-inner{transform:rotate(90deg);background-color:transparent;transition:transform 75ms cubic-bezier(.215,.61,.355,1) 0s,background-color 0s linear .15s}.hamburger--stand.is-active .hamburger-inner:before{top:0;transform:rotate(-45deg);transition:top 75ms ease-out .1s,transform 75ms cubic-bezier(.215,.61,.355,1) .15s}.hamburger--stand.is-active .hamburger-inner:after{bottom:0;transform:rotate(45deg);transition:bottom 75ms ease-out .1s,transform 75ms cubic-bezier(.215,.61,.355,1) .15s}.hamburger--stand-r .hamburger-inner{transition:transform 75ms cubic-bezier(.55,.055,.675,.19) .15s,background-color 0s linear 75ms}.hamburger--stand-r .hamburger-inner:before{transition:top 75ms ease-in 75ms,transform 75ms cubic-bezier(.55,.055,.675,.19) 0s}.hamburger--stand-r .hamburger-inner:after{transition:bottom 75ms ease-in 75ms,transform 75ms cubic-bezier(.55,.055,.675,.19) 0s}.hamburger--stand-r.is-active .hamburger-inner{transform:rotate(-90deg);background-color:transparent;transition:transform 75ms cubic-bezier(.215,.61,.355,1) 0s,background-color 0s linear .15s}.hamburger--stand-r.is-active .hamburger-inner:before{top:0;transform:rotate(-45deg);transition:top 75ms ease-out .1s,transform 75ms cubic-bezier(.215,.61,.355,1) .15s}.hamburger--stand-r.is-active .hamburger-inner:after{bottom:0;transform:rotate(45deg);transition:bottom 75ms ease-out .1s,transform 75ms cubic-bezier(.215,.61,.355,1) .15s}.hamburger--squeeze .hamburger-inner{transition-duration:75ms;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--squeeze .hamburger-inner:before{transition:top 75ms ease .12s,opacity 75ms ease}.hamburger--squeeze .hamburger-inner:after{transition:bottom 75ms ease .12s,transform 75ms cubic-bezier(.55,.055,.675,.19)}.hamburger--squeeze.is-active .hamburger-inner{transform:rotate(45deg);transition-delay:.12s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--squeeze.is-active .hamburger-inner:before{top:0;opacity:0;transition:top 75ms ease,opacity 75ms ease .12s}.hamburger--squeeze.is-active .hamburger-inner:after{bottom:0;transform:rotate(-90deg);transition:bottom 75ms ease,transform 75ms cubic-bezier(.215,.61,.355,1) .12s}.hamburger--vortex .hamburger-inner{transition-duration:.2s;transition-timing-function:cubic-bezier(.19,1,.22,1)}.hamburger--vortex .hamburger-inner:after,.hamburger--vortex .hamburger-inner:before{transition-duration:0s;transition-delay:.1s;transition-timing-function:linear}.hamburger--vortex .hamburger-inner:before{transition-property:top,opacity}.hamburger--vortex .hamburger-inner:after{transition-property:bottom,transform}.hamburger--vortex.is-active .hamburger-inner{transform:rotate(765deg);transition-timing-function:cubic-bezier(.19,1,.22,1)}.hamburger--vortex.is-active .hamburger-inner:after,.hamburger--vortex.is-active .hamburger-inner:before{transition-delay:0s}.hamburger--vortex.is-active .hamburger-inner:before{top:0;opacity:0}.hamburger--vortex.is-active .hamburger-inner:after{bottom:0;transform:rotate(90deg)}.hamburger--vortex-r .hamburger-inner{transition-duration:.2s;transition-timing-function:cubic-bezier(.19,1,.22,1)}.hamburger--vortex-r .hamburger-inner:after,.hamburger--vortex-r .hamburger-inner:before{transition-duration:0s;transition-delay:.1s;transition-timing-function:linear}.hamburger--vortex-r .hamburger-inner:before{transition-property:top,opacity}.hamburger--vortex-r .hamburger-inner:after{transition-property:bottom,transform}.hamburger--vortex-r.is-active .hamburger-inner{transform:rotate(-765deg);transition-timing-function:cubic-bezier(.19,1,.22,1)}.hamburger--vortex-r.is-active .hamburger-inner:after,.hamburger--vortex-r.is-active .hamburger-inner:before{transition-delay:0s}.hamburger--vortex-r.is-active .hamburger-inner:before{top:0;opacity:0}.hamburger--vortex-r.is-active .hamburger-inner:after{bottom:0;transform:rotate(-90deg)}.sidebar{background:#273149;position:fixed;z-index:2;width:100%;height:44px;box-shadow:0 .25rem .5rem -.1rem rgba(0,32,128,.2)}.sidebar__menu{position:absolute;font-weight:700;border:none;text-align:left;text-transform:uppercase;left:0;top:0;padding:.75rem 1rem;outline:0}.sidebar__menu-icon{height:24px}.sidebar__links{background:#273149;transition:transform .6s cubic-bezier(.165,.84,.44,1);transform-origin:0 0;transform:rotateX(-90deg);visibility:hidden;opacity:0;overflow-y:auto;-webkit-overflow-scrolling:touch;max-height:378px;margin-top:44px;box-shadow:0 .25rem .5rem -.1rem rgba(0,32,128,.2);padding-bottom:1rem}.sidebar__links.is-active{transform:rotateX(0);visibility:visible;opacity:1}.sidebar__link{display:block;color:#e3f5ff;padding:.75rem 1.5rem .75rem .75rem;margin-right:-.75rem;transition:all .1s ease-out;border-left:2px solid #576a85;font-weight:500;font-size:.95rem}.sidebar__link:hover{color:#88f4ff;background:hsla(0,0%,100%,.1);border-color:pink}.sidebar__section{padding:0 .75rem}.sidebar__section-heading{text-transform:capitalize;color:#e3f5ff;margin-bottom:.5rem}.sidebar__new{width:1.25rem;vertical-align:middle;margin-right:.25rem}@media (min-width:992px){.sidebar{left:0;top:0;bottom:0;width:20%;height:100%;background:linear-gradient(-30deg,#273149,#1c273f);box-shadow:.4rem .4rem .8rem rgba(0,32,64,.1);overflow-y:auto;color:#fff}}@media (min-width:992px) and (min-width:1400px){.sidebar{width:275px}}@media (min-width:992px){.sidebar__links{background:none;box-shadow:none;visibility:visible;opacity:1;transform:rotateX(0);margin-top:0;max-height:none}.sidebar__menu{display:none}}html:not(.macOS) .sidebar::-webkit-scrollbar-track{background-color:rgba(0,0,0,.6)}html:not(.macOS) .sidebar::-webkit-scrollbar{width:10px;background-color:#505b76}html:not(.macOS) .sidebar::-webkit-scrollbar-thumb{background-color:#505b76}.header{position:relative;padding:5rem 1rem 4rem;background:#5b67ff;background:linear-gradient(25deg,#95e2ff,#5f79ff,#8ed5ff);color:#fff;margin-bottom:2rem;text-align:center;overflow:hidden;z-index:1}.header:before{width:150%;height:150%;top:0;opacity:.1;z-index:-1}.header:after,.header:before{content:"";position:absolute;left:0}.header:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M12 0l12 12H0z' fill='%23f2f3f8'/%3E%3C/svg%3E");background-size:24px 24px;width:100%;height:24px;bottom:-7px;z-index:3}.header__content{position:relative;z-index:3}.header__logo{height:146px;user-select:none}.header__heading{font-weight:300;font-size:3rem;margin:1rem 0;line-height:1.2}.header__description{font-size:1.5rem;max-width:600px;margin:0 auto 2rem;font-weight:300;letter-spacing:.4px}.header__css{font-size:4rem;font-weight:700}.header__github-button-wrapper{height:28px}.header__github-button{color:#fff}.header__leaves{width:250px}#header__blob,.header__leaves{position:absolute;user-select:none}#header__blob{width:240px;left:-25px;top:50px}#header__leaves1{right:-100px;top:-50px}#header__leaves2{left:-250px;bottom:-100px;transform:rotate(235deg);z-index:2;width:400px}@media (min-width:1150px){#header__leaves2{left:-100px;transform:rotate(180deg)}#header__blob{left:50px;top:5px}}@media (min-width:579px){.header{padding:6rem 0 5rem}.header__heading{font-size:3.75rem}}@media (min-width:992px){.header{padding:2.5rem 0 5rem}}.snippet{position:relative;background:#fff;padding:2rem 5%;box-shadow:0 .4rem .8rem -.1rem rgba(0,32,128,.1),0 0 0 1px #f0f2f7;border-radius:.25rem;font-size:1.1rem;margin-bottom:1.5rem}.snippet h3{font-size:2rem;padding:.5rem 0;border-bottom:1px solid rgba(0,32,128,.1);margin-bottom:1.25rem;margin-top:0;line-height:1.3}.snippet h3 span:not(.snippet__tag){margin-right:.75rem}.snippet code:not([class*=lang]){background:#fcfaff;border:1px solid #e2ddff;color:#4b00da;border-radius:.15rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:.9rem;padding:.2rem .4rem;margin:0 .1rem}.snippet ol{margin-top:.5rem}.snippet ol>li{margin-bottom:.5rem}.snippet>p{margin-top:.5rem}.snippet h4{display:inline-block;margin:1rem 0 .5rem;font-size:1.1rem;line-height:2}.snippet h4[data-type]{background:#333;padding:0 .5rem;border-radius:3px;font-size:.9rem;text-transform:uppercase;border:1px solid #c6d6ea;border-bottom-color:#b3c9e3;background:#fff;box-shadow:0 .25rem .5rem -.1rem rgba(0,32,64,.15);background-repeat:no-repeat}.snippet h4[data-type=HTML]{color:#fff;border:none;background-image:linear-gradient(135deg,#ff4c9f,#ff7b74)}.snippet h4[data-type=CSS]{color:#fff;border:none;background-image:linear-gradient(135deg,#7983ff,#5f9de9)}.snippet h4[data-type=JavaScript]{color:#fff;border:none;background-image:linear-gradient(135deg,#ffb000,#f58818)}.snippet__browser-support{display:inline-block;font-size:2rem;font-weight:200;line-height:1;margin:.5rem 0}.snippet__subheading.is-html{color:#e22f70}.snippet__subheading.is-css{color:#0a91d4}.snippet__subheading.is-explanation{color:#4b00da}.snippet__support-note{color:#9fa5b5;font-weight:700}.snippet__requires-javascript{position:absolute;background:red;background:linear-gradient(145deg,#ff003b,#ff4b39);color:#fff;padding:.25rem .5rem;font-size:.9rem;transform:rotate(20deg);font-weight:700;top:1rem;right:0}.snippet__new{position:absolute;top:-1rem;left:50%;transform:translateX(-50%);width:3rem}.snippet-demo{background:#f5f6f9;border-radius:.25rem;padding:.75rem 1.25rem}.snippet-demo.is-distinct{background:linear-gradient(135deg,#ff4c9f,#ff7b74)}@media (min-width:768px){.snippet__requires-javascript{right:-.5rem}}.back-to-top-button{display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:700;background:#fff;width:4rem;height:4rem;position:fixed;right:2rem;bottom:2rem;border-radius:50%;user-select:none;box-shadow:0 .4rem .8rem -.1rem rgba(0,32,128,.15);transition:all .2s ease-out;visibility:hidden;opacity:0;z-index:1;border:1px solid rgba(0,32,128,.1);outline:0;color:inherit}.back-to-top-button:focus,.back-to-top-button:hover{transform:scale(1.1);box-shadow:0 .8rem 1.6rem -.2rem rgba(0,32,128,.15);color:#35a8ff}.back-to-top-button:focus{box-shadow:0 .8rem 1.6rem -.2rem rgba(0,32,128,.15),0 0 2px 2px #35a8ff;outline-style:none}.back-to-top-button.is-visible{visibility:visible;opacity:1}.back-to-top-button .feather{width:2rem;height:2rem}.tags{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;margin-bottom:1rem;padding:0 1rem}.tags,.tags__tag{position:relative}.tags__tag{display:inline-block;top:-1px;font-weight:700;font-size:.75rem;text-transform:uppercase;color:#8385aa;white-space:nowrap;border:1px solid #c8cbf2;border-radius:2px;vertical-align:middle;line-height:2;padding:0 .5rem;margin:0 .1rem;transition:all .1s ease-out;outline:0}.tags__tag.is-large{font-size:.95rem;border-radius:.2rem}.tags__tag.is-large .feather{top:-2px;width:18px;height:18px}.tags__tag .feather{vertical-align:middle;margin-right:.25rem;position:relative;top:-1px;width:14px;height:14px}.tags button.tags__tag{user-select:none;cursor:pointer;margin-bottom:1rem;margin-right:1rem;background:#fff}.tags button.tags__tag:hover{background:#8385aa;border-color:#8385aa;color:#fff}.tags button.tags__tag.focus-visible:focus{box-shadow:0 0 0 .25rem rgba(131,133,170,.5)}.tags button.tags__tag:active{box-shadow:inset 0 .1rem .1rem .1rem rgba(0,0,0,.2);background:#666894;border-color:#666894}.tags button.tags__tag.is-active{background:#7983ff;border-color:#7983ff;color:#fff}.tags button.tags__tag.is-active.focus-visible:focus{box-shadow:0 0 0 .25rem rgba(121,131,255,.5)}.btn{display:inline-block;position:relative;top:-1px;font-weight:700;font-size:.75rem;text-transform:uppercase;color:#8385aa;white-space:nowrap;border:1px solid #c8cbf2;border-radius:2px;vertical-align:middle;line-height:2;padding:0 .5rem;margin-right:.5rem;transition:all .1s ease-out;outline:0}.btn.is-large{font-size:.95rem;border-radius:.2rem}.btn.is-large .feather{top:-2px;width:18px;height:18px}.btn .feather{vertical-align:middle;margin-right:.25rem;position:relative;top:-1px;width:14px;height:14px}button.btn{user-select:none;cursor:pointer;margin-bottom:1rem;margin-right:1rem;background:#fff}button.btn:hover{background:#8385aa;border-color:#8385aa;color:#fff}button.btn.focus-visible:focus{box-shadow:0 0 0 .25rem rgba(131,133,170,.5)}button.btn:active{box-shadow:inset 0 .1rem .1rem .1rem rgba(0,0,0,.2);background:#666894;border-color:#666894}button.btn.is-active{background:#7983ff;border-color:#7983ff;color:#fff}button.btn.is-active.focus-visible:focus{box-shadow:0 0 0 .25rem rgba(121,131,255,.5)}button.btn.codepen-btn{margin-top:.5rem} \ No newline at end of file diff --git a/docs/js.5edae55e.js b/docs/js.5edae55e.js deleted file mode 100644 index 9d5b7f7b6..000000000 --- a/docs/js.5edae55e.js +++ /dev/null @@ -1,32 +0,0 @@ -parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;fe.length)return;if(!(w instanceof o)){p.lastIndex=0;var x=1;if(!(C=p.exec(w))&&f&&v!=t.length-1){if(p.lastIndex=k,!(C=p.exec(e)))break;for(var F=C.index+(h?C[1].length:0),S=C.index+C[0].length,A=v,j=k,P=t.length;A=(j+=t[A].length)&&(++v,k=j);if(t[v]instanceof o||t[A-1].greedy)continue;x=A-v,w=e.slice(k,j),C.index-=k}if(C){h&&(m=C[1].length);S=(F=C.index+m)+(C=C[0].slice(m)).length;var C,N=w.slice(0,F),O=w.slice(S),E=[v,x];N&&(++v,k+=N.length,E.push(N));var $=new o(u,d?n.tokenize(C,d):C,y,C,f);if(E.push($),O&&E.push(O),Array.prototype.splice.apply(t,E),1!=x&&n.matchGrammar(e,t,a,v,k,!0,u),s)break}else if(s)break}}}}},tokenize:function(e,t,a){var r=[e],i=t.rest;if(i){for(var s in i)t[s]=i[s];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,i=0;r=a[i++];)r(t)}}},r=n.Token=function(e,t,a,n,r){this.type=e,this.content=t,this.alias=a,this.length=0|(n||"").length,this.greedy=!!r};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(a){return r.stringify(a,t,e)}).join("");var i={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var s="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,s)}n.hooks.run("wrap",i);var l=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(l?" "+l:"")+">"+i.content+""},!t.document)return t.addEventListener?(n.disableWorkerMessageHandler||t.addEventListener("message",function(e){var a=JSON.parse(e.data),r=a.language,i=a.code,s=a.immediateClose;t.postMessage(n.highlight(i,n.languages[r],r)),s&&t.close()},!1),t.Prism):t.Prism;var i=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return i&&(n.filename=i.src,n.manual||i.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),t.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=a),void 0!==e&&(e.Prism=a),a.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),a.languages.xml=a.languages.markup,a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},a.languages.css.atrule.inside.rest=a.util.clone(a.languages.css),a.languages.markup&&(a.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:a.languages.css,alias:"language-css",greedy:!0}}),a.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:a.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:a.languages.css}},alias:"language-css"}},a.languages.markup.tag)),a.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},a.languages.javascript=a.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|\d*\.?\d+(?:[Ee][+-]?\d+)?|NaN|Infinity)\b/,function:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),a.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"}}),a.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}}}),a.languages.markup&&a.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:a.languages.javascript,alias:"language-javascript",greedy:!0}}),a.languages.js=a.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(t){for(var n,r=t.getAttribute("data-src"),i=t,s=/\blang(?:uage)?-(?!\*)(\w+)\b/i;i&&!s.test(i.className);)i=i.parentNode;if(i&&(n=(t.className.match(s)||[,""])[1]),!n){var l=(r.match(/\.(\w+)$/)||[,""])[1];n=e[l]||l}var o=document.createElement("code");o.className="language-"+n,t.textContent="",o.textContent="Loading…",t.appendChild(o);var u=new XMLHttpRequest;u.open("GET",r,!0),u.onreadystatechange=function(){4==u.readyState&&(u.status<400&&u.responseText?(o.textContent=u.responseText,a.highlightElement(o)):u.status>=400?o.textContent="✖ Error "+u.status+" while fetching file: "+u.statusText:o.textContent="✖ Error: File does not exist or is empty")},u.send(null)})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight)); -},{}],"2Os9":[function(require,module,exports) { -var define; -var global = arguments[3]; -var e,n=arguments[3];!function(n,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof e&&e.amd?e([],i):"object"==typeof exports?exports.feather=i():n.feather=i()}("undefined"!=typeof self?self:this,function(){return function(e){var n={};function i(t){if(n[t])return n[t].exports;var l=n[t]={i:t,l:!1,exports:{}};return e[t].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=e,i.c=n,i.d=function(e,n,t){i.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,"a",n),n},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},i.p="",i(i.s=49)}([function(e,n,i){var t=i(36)("wks"),l=i(15),r=i(1).Symbol,o="function"==typeof r;(e.exports=function(e){return t[e]||(t[e]=o&&r[e]||(o?r:l)("Symbol."+e))}).store=t},function(e,n){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(e,n){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,n,i){var t=i(1),l=i(7),r=i(8),o=i(10),a=i(11),c=function(e,n,i){var y,p,h,x,s=e&c.F,u=e&c.G,f=e&c.S,d=e&c.P,v=e&c.B,g=u?t:f?t[n]||(t[n]={}):(t[n]||{}).prototype,m=u?l:l[n]||(l[n]={}),M=m.prototype||(m.prototype={});for(y in u&&(i=n),i)h=((p=!s&&g&&void 0!==g[y])?g:i)[y],x=v&&p?a(h,t):d&&"function"==typeof h?a(Function.call,h):h,g&&o(g,y,h,e&c.U),m[y]!=h&&r(m,y,x),d&&M[y]!=h&&(M[y]=h)};t.core=l,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,n,i){var t=i(9),l=i(29),r=i(31),o=Object.defineProperty;n.f=i(5)?Object.defineProperty:function(e,n,i){if(t(e),n=r(n,!0),t(i),l)try{return o(e,n,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[n]=i.value),e}},function(e,n,i){e.exports=!i(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,n){var i={}.hasOwnProperty;e.exports=function(e,n){return i.call(e,n)}},function(e,n){var i=e.exports={version:"2.5.3"};"number"==typeof __e&&(__e=i)},function(e,n,i){var t=i(4),l=i(14);e.exports=i(5)?function(e,n,i){return t.f(e,n,l(1,i))}:function(e,n,i){return e[n]=i,e}},function(e,n,i){var t=i(2);e.exports=function(e){if(!t(e))throw TypeError(e+" is not an object!");return e}},function(e,n,i){var t=i(1),l=i(8),r=i(6),o=i(15)("src"),a=Function.toString,c=(""+a).split("toString");i(7).inspectSource=function(e){return a.call(e)},(e.exports=function(e,n,i,a){var y="function"==typeof i;y&&(r(i,"name")||l(i,"name",n)),e[n]!==i&&(y&&(r(i,o)||l(i,o,e[n]?""+e[n]:c.join(String(n)))),e===t?e[n]=i:a?e[n]?e[n]=i:l(e,n,i):(delete e[n],l(e,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||a.call(this)})},function(e,n,i){var t=i(32);e.exports=function(e,n,i){if(t(e),void 0===n)return e;switch(i){case 1:return function(i){return e.call(n,i)};case 2:return function(i,t){return e.call(n,i,t)};case 3:return function(i,t,l){return e.call(n,i,t,l)}}return function(){return e.apply(n,arguments)}}},function(e,n){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,n){e.exports={}},function(e,n){e.exports=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}},function(e,n){var i=0,t=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+t).toString(36))}},function(e,n,i){var t=i(34),l=i(19);e.exports=function(e){return t(l(e))}},function(e,n,i){var t=i(11),l=i(38),r=i(39),o=i(9),a=i(22),c=i(40),y={},p={};(n=e.exports=function(e,n,i,h,x){var s,u,f,d,v=x?function(){return e}:c(e),g=t(i,h,n?2:1),m=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(r(v)){for(s=a(e.length);s>m;m++)if((d=n?g(o(u=e[m])[0],u[1]):g(e[m]))===y||d===p)return d}else for(f=v.call(e);!(u=f.next()).done;)if((d=l(f,g,u.value,n))===y||d===p)return d}).BREAK=y,n.RETURN=p},function(e,n){var i=Math.ceil,t=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?t:i)(e)}},function(e,n){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,n,i){"use strict";var t=i(52),l=i(3),r=i(10),o=i(8),a=i(6),c=i(13),y=i(53),p=i(24),h=i(59),x=i(0)("iterator"),s=!([].keys&&"next"in[].keys()),u=function(){return this};e.exports=function(e,n,i,f,d,v,g){y(i,n,f);var m,M,w,b=function(e){if(!s&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new i(this,e)}}return function(){return new i(this,e)}},A=n+" Iterator",_="values"==d,z=!1,k=e.prototype,S=k[x]||k["@@iterator"]||d&&k[d],H=!s&&S||b(d),V=d?_?b("entries"):H:void 0,O="Array"==n&&k.entries||S;if(O&&(w=h(O.call(new e)))!==Object.prototype&&w.next&&(p(w,A,!0),t||a(w,x)||o(w,x,u)),_&&S&&"values"!==S.name&&(z=!0,H=function(){return S.call(this)}),t&&!g||!s&&!z&&k[x]||o(k,x,H),c[n]=H,c[A]=u,d)if(m={values:_?H:b("values"),keys:v?H:b("keys"),entries:V},g)for(M in m)M in k||r(k,M,m[M]);else l(l.P+l.F*(s||z),n,m);return m}},function(e,n,i){var t=i(55),l=i(37);e.exports=Object.keys||function(e){return t(e,l)}},function(e,n,i){var t=i(18),l=Math.min;e.exports=function(e){return e>0?l(t(e),9007199254740991):0}},function(e,n,i){var t=i(36)("keys"),l=i(15);e.exports=function(e){return t[e]||(t[e]=l(e))}},function(e,n,i){var t=i(4).f,l=i(6),r=i(0)("toStringTag");e.exports=function(e,n,i){e&&!l(e=i?e:e.prototype,r)&&t(e,r,{configurable:!0,value:n})}},function(e,n,i){var t=i(19);e.exports=function(e){return Object(t(e))}},function(e,n,i){var t=i(35),l=i(0)("toStringTag"),r="Arguments"==t(function(){return arguments}());e.exports=function(e){var n,i,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,n){try{return e[n]}catch(e){}}(n=Object(e),l))?i:r?t(n):"Object"==(o=t(n))&&"function"==typeof n.callee?"Arguments":o}},function(e,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=o(i(86)),l=o(i(88)),r=o(i(89));function o(e){return e&&e.__esModule?e:{default:e}}n.default=Object.keys(l.default).map(function(e){return new t.default(e,l.default[e],r.default[e])}).reduce(function(e,n){return e[n.name]=n,e},{})},function(e,n,i){"use strict";var t=i(51)(!0);i(20)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,n=this._t,i=this._i;return i>=n.length?{value:void 0,done:!0}:(e=t(n,i),this._i+=e.length,{value:e,done:!1})})},function(e,n,i){e.exports=!i(5)&&!i(12)(function(){return 7!=Object.defineProperty(i(30)("div"),"a",{get:function(){return 7}}).a})},function(e,n,i){var t=i(2),l=i(1).document,r=t(l)&&t(l.createElement);e.exports=function(e){return r?l.createElement(e):{}}},function(e,n,i){var t=i(2);e.exports=function(e,n){if(!t(e))return e;var i,l;if(n&&"function"==typeof(i=e.toString)&&!t(l=i.call(e)))return l;if("function"==typeof(i=e.valueOf)&&!t(l=i.call(e)))return l;if(!n&&"function"==typeof(i=e.toString)&&!t(l=i.call(e)))return l;throw TypeError("Can't convert object to primitive value")}},function(e,n){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,n,i){var t=i(9),l=i(54),r=i(37),o=i(23)("IE_PROTO"),a=function(){},c=function(){var e,n=i(30)("iframe"),t=r.length;for(n.style.display="none",i(58).appendChild(n),n.src="javascript:",(e=n.contentWindow.document).open(),e.write(" - + @@ -112,20 +70,7 @@
- +

Bouncing loaderanimation

Creates a bouncing loader animation.

@@ -168,47 +113,41 @@
- +

Explanation

Note: 1rem is usually 16px.

  1. -

    @keyframes defines an animation that has two states, where the element changes opacity and is translated up on the 2D plane using transform: translate3d(). Using a single axis translation on transform: translate3d() improves the performance of the animation.

    +

    @keyframes defines an animation that has two states, where the element changes opacity and is translated up on the 2D plane using transform: translate3d(). Using a single axis translation on transform: translate3d() improves the performance of the animation.

  2. -

    .bouncing-loader is the parent container of the bouncing circles and uses display: flex and justify-content: center to position them in the center.

    +

    .bouncing-loader is the parent container of the bouncing circles and uses display: flex + and justify-content: center to position them in the center.

  3. -

    .bouncing-loader > div, targets the three child divs of the parent to be styled. The divs are given a width and height of 1rem, using border-radius: 50% to turn them from - squares to circles.

    +

    .bouncing-loader > div, targets the three child divs of the parent to be styled. The divs are given a width and height of 1rem, using border-radius: 50% to turn them from squares to circles.

  4. -

    margin: 3rem 0.2rem specifies that each circle has a top/bottom margin of 3rem and left/right margin of 0.2rem so that they do not directly touch each other, giving them some breathing room.

    +

    margin: 3rem 0.2rem specifies that each circle has a top/bottom margin of 3rem and left/right margin + of 0.2rem so that they do not directly touch each other, giving them some breathing room.

  5. animation is a shorthand property for the various animation properties: animation-name, animation-duration, animation-iteration-count, animation-direction are used.

    @@ -223,14 +162,12 @@

    Browser support

    - 95.3% + 93.4%

    ✅ No caveats.

    @@ -267,28 +204,23 @@
    border-box
    content-box
    - +

    Explanation

    1. box-sizing: border-box makes the addition of padding or borders not affect an element's width or height.
    2. @@ -297,14 +229,12 @@

      Browser support

      - 98.4% + 95.9%

      ✅ No caveats.

      @@ -324,46 +254,43 @@
      - -

      If you want to align a background-image from right and bottom wasn't possible with just straight length values. So now it's possible using calc():

      + +

      If you want to align a background-image from right and bottom wasn't possible with just straight length values. + So now it's possible using calc():

      Background-image in the right/bottom
      + height: 280px; + display: flex; + align-items: center; + justify-content: center; + color: #fff; + background: #222 url('https://image.ibb.co/fUL9nS/wolf.png') no-repeat; + background-position: calc(100% - 20px) calc(100% - 40px); +} +

      Explanation

      1. It allows addition, subtraction, multiplication and division.
      2. Can use different units (pixel and percent together, for example) for each value in your expression.
      3. It is permitted to nest calc() functions.
      4. -
      5. It can be used in any property that <length>, <frequency>, <angle>, <time>, <number>, <color>, or <integer> is allowed, like width, height, font-size, top, left, etc.
      6. +
      7. It can be used in any property that <length>, <frequency>, <angle>, <time>, <number>, <color>, or <integer> is allowed, like width, height, font-size, top, left, etc.

      Browser support

      - 94.9% + 93.0%

      ✅ No caveats.

      @@ -384,28 +311,25 @@
      - +

      Explanation

      border-radius: 50% curves the borders of an element to create a circle.

      -

      Since a circle has the same radius at any given point, the width and height must be the same. Differing values will create an ellipse.

      +

      Since a circle has the same radius at any given point, the width and height must be the same. Differing + values will create an ellipse.

      Browser support

      - 95.5% + 93.7%

      ✅ No caveats.

      @@ -437,21 +361,19 @@
      float c
      - +

      Explanation

      1. .clearfix::after defines a pseudo-element.
      2. content: '' allows the pseudo-element to affect layout.
      3. -
      4. clear: both indicates that the left, right or both sides of the element cannot be adjacent to earlier floated elements within the same block formatting context.
      5. +
      6. clear: both indicates that the left, right or both sides of the element cannot be adjacent + to earlier floated elements within the same block formatting context.

      Browser support

      @@ -465,7 +387,8 @@

      Constant width to height ratiolayout

      -

      Given an element of variable width, it will ensure its height remains proportionate in a responsive fashion (i.e., its width to height ratio remains constant).

      +

      Given an element of variable width, it will ensure its height remains proportionate in a responsive fashion + (i.e., its width to height ratio remains constant).

      HTML

      <div class="constant-width-to-height-ratio"></div>
       

      CSS

      .constant-width-to-height-ratio {
      @@ -487,26 +410,22 @@
                   
      - +

      Explanation

      -

      padding-top on the ::before pseudo-element causes the height of the element to equal a percentage of its width. 100% therefore means the element's height will always be 100% of the width, - creating a responsive square. -

      +

      padding-top on the ::before pseudo-element causes the height of the element to equal a percentage of + its width. 100% therefore means the element's height will always be 100% of the width, creating a responsive + square.

      This method also allows content to be placed inside the element normally.

      Browser support

      @@ -557,15 +476,12 @@ li::before {
      - +

      Explanation

      You can create a ordered list using any type of HTML.

        @@ -576,28 +492,24 @@ li::before {

        counter-increment Used in element that will be countable. Once counter-reset initialized, a counter's value can be increased or decreased.

      1. -

        counter(name, style) Displays the value of a section counter. Generally used in a content property. This function can receive two parameters, the first as the name of the counter and the second one can be decimal or upper-roman (decimal by default).

        +

        counter(name, style) Displays the value of a section counter. Generally used in a content property. This function can receive two parameters, the first as the name of the counter and the second one can be decimal or upper-roman (decimal by default).

      2. -

        counters(counter, string, style) Displays the value of a section counter. Generally used in a content property. This function can receive three parameters, the first as the name of the counter, the second one - you can include a string which comes after the counter and the third one can be decimal or upper-roman (decimal by default).

        +

        counters(counter, string, style) Displays the value of a section counter. Generally used in a content property. This function can receive three parameters, the first as the name of the counter, the second one you can include a string which comes after the counter and the third one can be decimal or upper-roman (decimal by default).

      3. -

        A CSS counter can be especially useful for making outlined lists, because a new instance of the counter is automatically created in child elements. Using the counters() function, separating text can be inserted between different - levels of nested counters.

        +

        A CSS counter can be especially useful for making outlined lists, because a new instance of the counter is automatically created in child elements. Using the counters() function, separating text can be inserted between different levels of nested counters.

      Browser support

      - 98.4% + 95.9%

      ✅ No caveats.

      @@ -635,52 +547,43 @@ li::before {

      - Lorem ipsum dolor sit amet consectetur adipisicing elit. -
      Iure id exercitationem nulla qui repellat laborum vitae, -
      molestias tempora velit natus. Quas, assumenda nisi. -
      Quisquam enim qui iure, consequatur velit sit? + Lorem ipsum dolor sit amet consectetur adipisicing elit.
      + Iure id exercitationem nulla qui repellat laborum vitae,
      + molestias tempora velit natus. Quas, assumenda nisi.
      + Quisquam enim qui iure, consequatur velit sit?

      - +

      Explanation

      1. ::-webkit-scrollbar targets the whole scrollbar element.
      2. ::-webkit-scrollbar-track targets only the scrollbar track.
      3. ::-webkit-scrollbar-thumb targets the scrollbar thumb.
      -

      There are many other pseudo-elements that you can use to style scrollbars. For more info, visit the - WebKit Blog.

      +

      There are many other pseudo-elements that you can use to style scrollbars. For more info, visit the WebKit Blog.

      Browser support

      - 88.0% + 86.7%

      ⚠️ Scrollbar styling doesn't appear to be on any standards track.

      @@ -703,30 +606,25 @@ li::before {

      Select some of this text.

      - +

      Explanation

      ::selection defines a pseudo selector on an element to style text within it when selected. Note that if you don't combine any other selector your style will be applied at document root level, to any selectable element.

      Browser support

      - 84.9% + 82.5%

      ⚠️ Requires prefixes for full support and is not actually in any specification.

      @@ -754,21 +652,18 @@ in any specification.

      CSS is awesome!

      - +

      Explanation

      The variables are defined globally within the :root CSS pseudo-class which matches the root element of a tree representing the document. Variables can also be scoped to a selector if defined within the block.

      Declare a variable with --variable-name:.

      @@ -776,14 +671,12 @@ in any specification.

      Browser support

      - 88.0% + 87.6%

      ✅ No caveats.

      @@ -803,25 +696,21 @@ in any specification.

      You can select me.

      You can't select me!

      - +

      Explanation

      user-select: none specifies that the text cannot be selected.

      Browser support

      - 87.2% + 89.2%

      ⚠️ Requires prefixes for full support. ⚠️ This is not a secure method to prevent users from copying content.

      @@ -859,23 +748,19 @@ in any specification.

      - +

      Explanation

      1. display: table on '.center' allows the element to behave like a <table> HTML element.
      2. @@ -893,9 +778,7 @@ in any specification.

        ✅ No caveats.

        @@ -927,41 +810,33 @@ in any specification.

        - +

        Explanation

        -

        Use a semi-transparent border for the whole element, except one side that will serve as the loading indicator for the donut. Use animation to rotate the element.

        +

        Use a semi-transparent border for the whole element, except one side that will + serve as the loading indicator for the donut. Use animation to rotate the element.

        Browser support

        - 95.3% + 93.4%

        ⚠️ Requires prefixes for full support.

        @@ -994,26 +869,23 @@ in any specification.

        - +

        Explanation

        1. position: relative on the element establishes a Cartesian positioning context for psuedo-elements.
        2. @@ -1030,21 +902,20 @@ in any specification.

          Browser support

          - 91.7% + 90.2%

          ⚠️ Requires prefixes for full support.

          Easing variablesanimation

          -

          Variables that can be reused for transition-timing-function properties, more powerful than the built-in ease, ease-in, ease-out and ease-in-out.

          +

          Variables that can be reused for transition-timing-function properties, more + powerful than the built-in ease, ease-in, ease-out and ease-in-out.

          HTML

          <div class="easing-variables">Hover</div>
           

          CSS

          :root {
          @@ -1087,57 +958,50 @@ in any specification.

          Hover
          - +

          Explanation

          -

          The variables are defined globally within the :root CSS pseudo-class which matches the root element of a tree representing the document. In HTML, :root represents the <html> element and is identical - to the selector html, except that its specificity is higher.

          +

          The variables are defined globally within the :root CSS pseudo-class which matches the root element of a tree representing the document. In HTML, :root represents the <html> element and is identical to the selector html, except that its specificity is higher.

          Browser support

          - 88.0% + 87.6%

          ✅ No caveats.

          @@ -1158,29 +1022,27 @@ in any specification.

          I appear etched into the background.

          - +

          Explanation

          -

          text-shadow: 0 2px white creates a white shadow offset 0px horizontally and 2px vertically from the origin position.

          +

          text-shadow: 0 2px white creates a white shadow offset 0px horizontally and 2px vertically + from the origin position.

          The background must be darker than the shadow for the effect to work.

          -

          The text color should be slightly faded to make it look like it's engraved/carved out of the background.

          +

          The text color should be slightly faded to make it look like it's engraved/carved out + of the background.

          Browser support

          - 98.1% + 95.5%

          ✅ No caveats.

          @@ -1207,12 +1069,10 @@ in any specification.

          Item3

          - +

          Explanation

          1. display: flex enables flexbox.
          2. @@ -1222,20 +1082,17 @@ in any specification.

            Browser support

            - 98.1% + 95.5%

            ⚠️ Needs prefixes for full support.

            - New

            Fit image in containerlayoutvisual

            Changes the fit and position of an image within its container while preserving its aspect ratio. Previously only possible using a background image and the background-size property.

            HTML

            <img class="image image-contain" src="https://picsum.photos/600/200">
            @@ -1257,26 +1114,20 @@ in any specification.

            }

            Demo

            -
            - - -
            - +
            +
            +

            Explanation

            - +

            Explanation

            1. display: flex enables flexbox.
            2. @@ -1337,14 +1184,12 @@ in any specification.

              Browser support

              - 98.1% + 95.5%

              ⚠️ Needs prefixes for full support.

              @@ -1364,30 +1209,27 @@ in any specification.

              Gradient text

              - +

              Explanation

              1. background: -webkit-linear-gradient(...) gives the text element a gradient background.
              2. webkit-text-fill-color: transparent fills the text with a transparent color.
              3. -
              4. webkit-background-clip: text clips the background with the text, filling the text with the gradient background as the color.
              5. +
              6. webkit-background-clip: text clips the background with the text, filling the text with + the gradient background as the color.

              Browser support

              - 91.5% + 90.1%

              ⚠️ Uses non-standard properties.

              @@ -1412,14 +1254,12 @@ in any specification.

              Centered content.
              - +

              Explanation

              1. display: grid enables grid.
              2. @@ -1429,21 +1269,20 @@ in any specification.

                Browser support

                - 87.6% + 88.3%

                ✅ No caveats.

                Hairline bordervisual

                -

                Gives an element a border equal to 1 native device pixel in width, which can look very sharp and crisp.

                +

                Gives an element a border equal to 1 native device pixel in width, which can look + very sharp and crisp.

                HTML

                <div class="hairline-border">text</div>
                 

                CSS

                .hairline-border {
                @@ -1469,45 +1308,34 @@ in any specification.

                text
                - +

                Explanation

                1. box-shadow, when only using spread, adds a pseudo-border which can use subpixels*.
                2. -
                3. Use @media (min-resolution: ...) to check the device pixel ratio (1dppx equals 96 DPI), setting the spread of the box-shadow equal to 1 / dppx.
                4. +
                5. Use @media (min-resolution: ...) to check the device pixel ratio (1dppx equals 96 DPI), + setting the spread of the box-shadow equal to 1 / dppx.

                Browser Support

                - 95.5% + 93.7%

                ⚠️ Needs alternate syntax and JavaScript user agent checking for full support.


                *Chrome does not support subpixel values on border. Safari does not support subpixel values on box-shadow. Firefox supports subpixel values on both.

                @@ -1542,40 +1370,37 @@ el.style.setProperty('--max-height', height + 'px')
                content
                - - + +

                Explanation

                CSS
                1. transition: max-height: 0.5s cubic-bezier(...) specifies that changes to max-height should be transitioned over 0.5 seconds, using an ease-out-quint timing function.
                2. overflow: hidden prevents the contents of the hidden element from overflowing its container.
                3. max-height: 0 specifies that the element has no height initially.
                4. -
                5. .target:hover > .el specifies that when the parent is hovered over, target a child .el within it and use the --max-height variable which was defined by JavaScript.
                6. +
                7. .target:hover > .el specifies that when the parent is hovered over, target a child .el within + it and use the --max-height variable which was defined by JavaScript.
                JavaScript
                  -
                1. el.scrollHeight is the height of the element including overflow, which will change dynamically based on the content of the element.
                2. +
                3. el.scrollHeight is the height of the element including overflow, which will change dynamically + based on the content of the element.
                4. el.style.setProperty(...) sets the --max-height CSS variable which is used to specify the max-height of the element the target is hovered over, allowing it to transition smoothly from 0 to auto.

                Browser Support

                - 88.0% + 87.6%

                @@ -1586,12 +1411,8 @@ el.style.setProperty('--max-height', height + 'px')

                @@ -1599,11 +1420,7 @@ el.style.setProperty('--max-height', height + 'px')

                Hover underline animationanimation

                Creates an animated underline effect when the text is hovered over.

                -

                - Credit: - https://flatuicolors.com/ - -

                +

                Credit: https://flatuicolors.com/

                HTML

                <p class="hover-underline-animation">Hover this text to see the effect!</p>
                 

                CSS

                .hover-underline-animation {
                @@ -1632,63 +1449,57 @@ el.style.setProperty('--max-height', height + 'px')
                             

                Hover this text to see the effect!

                - +

                Explanation

                  -
                1. display: inline-block makes the block p an inline-block to prevent the underline from spanning the entire parent width rather than just the content (text).
                2. +
                3. display: inline-block makes the block p an inline-block to prevent the underline from + spanning the entire parent width rather than just the content (text).
                4. position: relative on the element establishes a Cartesian positioning context for pseudo-elements.
                5. ::after defines a pseudo-element.
                6. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
                7. width: 100% ensures the pseudo-element spans the entire width of the text block.
                8. transform: scaleX(0) initially scales the pseudo element to 0 so it has no width and is not visible.
                9. bottom: 0 and left: 0 position it to the bottom left of the block.
                10. -
                11. transition: transform 0.25s ease-out means changes to transform will be transitioned over 0.25 seconds with an ease-out timing function.
                12. +
                13. transition: transform 0.25s ease-out means changes to transform will be transitioned over 0.25 seconds + with an ease-out timing function.
                14. transform-origin: bottom right means the transform anchor point is positioned at the bottom right of the block.
                15. -
                16. :hover::after then uses scaleX(1) to transition the width to 100%, then changes the transform-origin to bottom left so that the anchor point is reversed, allowing it transition out in the - other direction when hovered off.
                17. +
                18. :hover::after then uses scaleX(1) to transition the width to 100%, then changes the transform-origin + to bottom left so that the anchor point is reversed, allowing it transition out in the other direction when + hovered off.

                Browser support

                - 95.4% + 93.5%

                ✅ No caveats.

                - New

                Last item with remaining available heightlayout

                Take advantage of available viewport space by giving the last element the remaining available space in current viewport, even when resizing the window.

                HTML

                <div class="container">
                @@ -1720,22 +1531,18 @@ body {
                                 
                Div 3
                - +

                Explanation

                1. height: 100% set the height of container as viewport height.
                2. @@ -1747,14 +1554,12 @@ body {

                  Browser support

                  - 98.1% + 95.5%

                  ⚠️ Needs prefixes for full support.

                  @@ -1764,11 +1569,7 @@ body {

                  Mouse cursor gradient trackingvisualinteractivity

                  A hover effect where the gradient follows the mouse cursor.

                  -

                  - Credit: - Tobias Reich - -

                  +

                  Credit: Tobias Reich

                  HTML

                  <button class="mouse-cursor-gradient-tracking">
                     <span>Hover me</span>
                   </button>
                  @@ -1812,59 +1613,50 @@ btn.onmousemove = function(e) {
                   }
                   

                  Demo

                  -
                  - -
                  - - +
                  + +

                  Explanation

                  TODO

                  Browser support

                  - 88.0% + 87.6%

                  @@ -1872,9 +1664,7 @@ btn.onmousemove = function(e) { ⚠️ Requires JavaScript.

                  @@ -1913,45 +1703,36 @@ li:not(:last-child) {
                3. Four
                4. - +

                  Explanation

                  -

                  li:not(:last-child) specifies that the styles should apply to all li elements except the :last-child.

                  +

                  li:not(:last-child) specifies that the styles should apply to all li elements except + the :last-child.

                  Browser support

                  - 98.4% + 95.9%

                  ✅ No caveats.

                  Offscreenlayoutvisual

                  -

                  A bulletproof way to completely hide an element visually and positionally in the DOM while still allowing it to be accessed by JavaScript and readable by screen readers. This method is very useful for accessibility ( - ADA) development when more context is needed for visually-impaired users. As an alternative to display: none which is not readable by screen readers or visibility: hidden which takes up physical space in the - DOM.

                  +

                  A bulletproof way to completely hide an element visually and positionally in the DOM while still allowing it to be accessed by JavaScript and readable by screen readers. This method is very useful for accessibility (ADA) development when more context is needed for visually-impaired users. As an alternative to display: none which is not readable by screen readers or visibility: hidden which takes up physical space in the DOM.

                  HTML

                  <a class="button" href="http://pantswebsite.com">
                     Learn More
                     <span class="offscreen"> about pants</span>
                  @@ -1969,24 +1750,20 @@ li:not(:last-child) {
                   }
                   

                  Demo

                  -
                  - + - +
                  +

                  Explanation

                  1. Remove all borders.
                  2. @@ -2006,9 +1783,7 @@ li:not(:last-child) {

                    ✅ No caveats.

                    (Although clip technically has been depreciated, the newer clip-path currently has very limited browser support.)

                    @@ -2057,47 +1832,45 @@ li:not(:last-child) {
                    - Lorem ipsum dolor sit amet consectetur adipisicing elit. -
                    Iure id exercitationem nulla qui repellat laborum vitae, -
                    molestias tempora velit natus. Quas, assumenda nisi. -
                    Quisquam enim qui iure, consequatur velit sit? -
                    Lorem ipsum dolor sit amet consectetur adipisicing elit. -
                    Iure id exercitationem nulla qui repellat laborum vitae, -
                    molestias tempora velit natus. Quas, assumenda nisi. -
                    Quisquam enim qui iure, consequatur velit sit? + Lorem ipsum dolor sit amet consectetur adipisicing elit.
                    + Iure id exercitationem nulla qui repellat laborum vitae,
                    + molestias tempora velit natus. Quas, assumenda nisi.
                    + Quisquam enim qui iure, consequatur velit sit?
                    + Lorem ipsum dolor sit amet consectetur adipisicing elit.
                    + Iure id exercitationem nulla qui repellat laborum vitae,
                    + molestias tempora velit natus. Quas, assumenda nisi.
                    + Quisquam enim qui iure, consequatur velit sit?
                    - +

                    Explanation

                    1. position: relative on the parent establishes a Cartesian positioning context for pseudo-elements.
                    2. ::after defines a pseudo element.
                    3. -
                    4. background-image: linear-gradient(...) adds a linear gradient that fades from transparent to white (top to bottom).
                    5. +
                    6. background-image: linear-gradient(...) adds a linear gradient that fades from transparent to white + (top to bottom).
                    7. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
                    8. -
                    9. width: 240px matches the size of the scrolling element (which is a child of the parent that has the pseudo element).
                    10. +
                    11. width: 240px matches the size of the scrolling element (which is a child of the parent that has + the pseudo element).
                    12. height: 25px is the height of the fading gradient pseudo-element, which should be kept relatively small.
                    13. bottom: 0 positions the pseudo-element at the bottom of the parent.
                    14. pointer-events: none specifies that the pseudo-element cannot be a target of mouse events, allowing text behind it to still be selectable/interactive.
                    15. @@ -2105,14 +1878,12 @@ li:not(:last-child) {

                      Browser support

                      - 95.4% + 93.5%

                      ✅ No caveats.

                      @@ -2154,35 +1925,30 @@ li:not(:last-child) {
                  - +

                  Explanation

                  1. position: relative on the reference parent establishes a Cartesian positioning context for its child.
                  2. position: absolute takes the popout menu out of the flow of the document and positions it in relation to the parent.
                  3. left: 100% moves the the popout menu 100% of its parent's width from the left.
                  4. visibility: hidden hides the popout menu initially and allows for transitions (unlike display: none).
                  5. -
                  6. .reference:hover > .popout-menu means that when .reference is hovered over, select immediate children with a class of .popout-menu and change their visibility to visible, - which shows the popout.
                  7. +
                  8. .reference:hover > .popout-menu means that when .reference is hovered over, select immediate children with a class of .popout-menu and change their visibility to visible, which shows the popout.
                  9. .reference:focus > .popout-menu means that when .reference is focused, the popout would be shown.
                  10. .reference:focus-within > .popout-menu ensures that the popout is shown when the focus is within the reference.
                  @@ -2198,8 +1964,8 @@ li:not(:last-child) {

                  Pretty text underlinevisual

                  -

                  A nicer alternative to text-decoration: underline or <u></u> where descenders do not clip the underline. Natively implemented as text-decoration-skip-ink: auto but it has less control over - the underline.

                  +

                  A nicer alternative to text-decoration: underline or <u></u> where descenders do not clip the underline. + Natively implemented as text-decoration-skip-ink: auto but it has less control over the underline.

                  HTML

                  <p class="pretty-text-underline">Pretty text underline without clipping descending letters.</p>
                   

                  CSS

                  .pretty-text-underline {
                  @@ -2223,47 +1989,44 @@ li:not(:last-child) {
                               

                  Pretty text underline without clipping descending letters.

                  - +

                  Explanation

                    -
                  1. text-shadow uses 4 values with offsets that cover a 4x4 px area to ensure the underline has a "thick" shadow that covers the line where descenders clip it. Use a color that matches the background. For a larger font, use a larger - px size. Additional values can create an even thicker shadow, and subpixel values can also be used.
                  2. -
                  3. background-image: linear-gradient(...) creates a 90deg gradient using the text color (currentColor).
                  4. -
                  5. The background-* properties size the gradient as 100% of the width of the block and 1px in height at the bottom and disables repetition, which creates a 1px underline beneath the text.
                  6. -
                  7. The ::selection pseudo selector rule ensures the text shadow does not interfere with text selection. -
                  8. +
                  9. text-shadow uses 4 values with offsets that cover a 4x4 px area to ensure the underline + has a "thick" shadow that covers the line where descenders clip it. Use a color + that matches the background. For a larger font, use a larger px size. Additional values + can create an even thicker shadow, and subpixel values can also be used.
                  10. +
                  11. background-image: linear-gradient(...) creates a 90deg gradient using the + text color (currentColor).
                  12. +
                  13. The background-* properties size the gradient as 100% of the width of the block and 1px + in height at the bottom and disables repetition, which creates a 1px underline beneath + the text.
                  14. +
                  15. The ::selection pseudo selector rule ensures the text shadow does not interfere with text + selection.

                  Browser support

                  - 95.4% + 93.5%

                  ✅ No caveats.

                  @@ -2287,24 +2050,20 @@ li:not(:last-child) {

                  Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui iure, consequatur velit sit?

                  - +

                  Explanation

                  The all property allows you to reset all styles (inherited or not) to default values.

                  Browser support

                  - 88.3% + 87.2%

                  ⚠️ MS Edge status is under consideration.

                  @@ -2332,28 +2091,23 @@ li:not(:last-child) {
                  - +

                  Explanation

                  1. position: relative on the element establishes a Cartesian positioning context for pseudo elements.
                  2. ::after defines a pseudo element.
                  3. -
                  4. background-image: url(...) adds the SVG shape (a 24x12 triangle) as the background image of the pseudo element, which repeats by default. It must be the same color as the block that is being separated. For other shapes, we can - use - the URL-encoder for SVG.
                  5. +
                  6. background-image: url(...) adds the SVG shape (a 24x12 triangle) as the background image of the pseudo element, which repeats by default. It must be the same color as the block that is being separated. For other shapes, we can use the URL-encoder for SVG.
                  7. position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
                  8. width: 100% ensures the element stretches the entire width of its parent.
                  9. height: 12px is the same height as the shape.
                  10. @@ -2362,14 +2116,12 @@ li:not(:last-child) {

                    Browser support

                    - 98.3% + 95.7%

                    ✅ No caveats.

                    @@ -2405,34 +2157,28 @@ li:not(:last-child) { Item 6 - +

                    Explanation

                    1. transition: opacity 0.2s specifies that changes to opacity will be transitioned over 0.2 seconds.
                    2. -
                    3. .sibling-fade:hover span:not(:hover) specifies that when the parent is hovered, select any span children that are not currently being hovered and change their opacity to 0.5.
                    4. +
                    5. .sibling-fade:hover span:not(:hover) specifies that when the parent is hovered, select any span children + that are not currently being hovered and change their opacity to 0.5.

                    Browser support

                    - 95.4% + 93.5%

                    ✅ No caveats.

                    @@ -2451,13 +2197,12 @@ li:not(:last-child) {

                    This text uses the system font.

                    - +

                    Explanation

                    -

                    The browser looks for each successive font, preferring the first one if possible, and falls back to the next if it cannot find the font (on the system or defined in CSS).

                    +

                    The browser looks for each successive font, preferring the first one if possible, and + falls back to the next if it cannot find the font (on the system or defined in CSS).

                    1. -apple-system is San Francisco, used on iOS and macOS (not Chrome however)
                    2. BlinkMacSystemFont is San Francisco, used on macOS Chrome
                    3. @@ -2480,50 +2225,6 @@ li:not(:last-child) {
                      -

                      Text decoration wavyvisual

                      -

                      Creates a Text decoration wavy.

                      -

                      HTML

                      <a href="#">I'm a link</a>
                      -
                      -

                      CSS

                      a {
                      -  text-decoration: underline wavy orange;
                      -}
                      -a:hover {
                      -  text-decoration: underline wavy orangered;
                      -}
                      -
                      -

                      Demo

                      - - -

                      Explanation

                      -

                      wavy draws a wavy line.

                      -

                      wavy is a value of text-decoration-style CSS property that sets the style of the lines specified by text-decoration-line.

                      -

                      text-decoration is a shorthand property for the various text decoration properties: text-decoration-color, text-decoration-style andtext-decoration-line are used.

                      -

                      Browser support

                      -
                      -
                      - 83.1% -
                      -
                      -

                      ✅ No caveats.

                      - - - -
                      -
                      - New

                      Toggle switchvisualinteractivity

                      Creates a toggle switch with CSS only.

                      HTML

                      <input type="checkbox" id="toggle" class="offscreen" />
                      @@ -2561,10 +2262,8 @@ input[type='checkbox']:checked + .switch {
                       }
                       

                      Demo

                      -
                      - - -
                      +
                      +

                      Explanation

                      -

                      This effect is styling only the <label> element to look like a toggle switch, and hiding the actual <input> checkbox by positioning it offscreen. When clicking the label associated with the <input> element, it sets the <input> checkbox into the :checked state.

                      +

                      This effect is styling only the <label> element to look like a toggle switch, and hiding the actual <input> checkbox by positioning it offscreen. When clicking the label associated with the <input> element, it sets the <input> checkbox into the :checked state.

                      1. The for attribute associates the <label> with the appropriate <input> checkbox element by its id.
                      2. .switch::after defines a pseudo-element for the <label> to create the circular knob.
                      3. input[type='checkbox']:checked + .switch::after targets the <label>'s pseudo-element's style when the checkbox is checked.
                      4. transform: translateX(20px) moves the pseudo-element (knob) 20px to the right when the checkbox is checked.
                      5. background-color: #7983ff; sets the background-color of the switch to a different color when the checkbox is checked.
                      6. -
                      7. .offscreen moves the <input> checkbox element, which does not comprise any part of the actual toggle switch, out of the flow of document and positions it far away from the view, but does not hide it so it - is accessible via keyboard and screen readers.
                      8. -
                      9. transition: all 0.3s specifies all property changes will be transitioned over 0.3 seconds, therefore transitioning the <label>'s background-color and the pseudo-element's transform property when the checkbox is checked.
                      10. +
                      11. .offscreen moves the <input> checkbox element, which does not comprise any part of the actual toggle switch, out of the flow of document and positions it far away from the view, but does not hide it so it is accessible via keyboard and screen readers.
                      12. +
                      13. transition: all 0.3s specifies all property changes will be transitioned over 0.3 seconds, therefore transitioning the <label>'s background-color and the pseudo-element's transform property when the checkbox is checked.

                      Browser support

                      - 95.5% + 93.7%

                      ⚠️ Requires prefixes for full support.

                      @@ -2628,8 +2324,7 @@ input[type='checkbox']:checked + .switch {

                      Transform centeringlayout

                      -

                      Vertically and horizontally centers a child element within its parent element using position: absolute and transform: translate() (as an alternative to flexbox or display: table). Similar - to flexbox, this method does not require you to know the height or width of your parent or child so it is ideal for responsive applications.

                      +

                      Vertically and horizontally centers a child element within its parent element using position: absolute and transform: translate() (as an alternative to flexbox or display: table). Similar to flexbox, this method does not require you to know the height or width of your parent or child so it is ideal for responsive applications.

                      HTML

                      <div class="parent">
                         <div class="child">Centered content</div>
                       </div>
                      @@ -2684,9 +2379,7 @@ input[type='checkbox']:checked + .switch {
                                   

                      ⚠️ Requires prefix for full support.

                      @@ -2718,10 +2411,10 @@ input[type='checkbox']:checked + .switch { }

                      Explanation

                      -

                      - View this link for a detailed explanation. -

                      -

                      The color of the border is the color of the triangle. The side the triangle tip points corresponds to the opposite border-* property. For example, a color on border-top means the arrow points downward.

                      +

                      View this link for a detailed explanation.

                      +

                      The color of the border is the color of the triangle. The side the triangle tip points + corresponds to the opposite border-* property. For example, a color on border-top + means the arrow points downward.

                      Experiment with the px values to change the proportion of the triangle.

                      Browser support

                      @@ -2759,28 +2452,27 @@ input[type='checkbox']:checked + .switch {

                      Explanation

                        -
                      1. overflow: hidden prevents the text from overflowing its dimensions (for a block, 100% width and auto height).
                      2. +
                      3. overflow: hidden prevents the text from overflowing its dimensions + (for a block, 100% width and auto height).
                      4. white-space: nowrap prevents the text from exceeding one line in height.
                      5. -
                      6. text-overflow: ellipsis makes it so that if the text exceeds its dimensions, it will end with an ellipsis.
                      7. +
                      8. text-overflow: ellipsis makes it so that if the text exceeds its dimensions, it + will end with an ellipsis.
                      9. width: 200px; ensures the element has a dimension, to know when to get ellipsis

                      Browser support

                      - 98.4% + 95.8%

                      ⚠️ Only works for single line elements.

                      - New

                      Zebra striped listvisual

                      Creates a striped list with alternating background colors, which is useful for differentiating siblings that have content spread across a wide row.

                      HTML

                      <ul>
                      @@ -2818,13 +2510,11 @@ input[type='checkbox']:checked + .switch {
                                   

                      Browser support

                      - 98.4% + 95.9%

                      ✅ No caveats.

                      -

                      - https://caniuse.com/#feat=css-sel3 -

                      +

                      https://caniuse.com/#feat=css-sel3

                      diff --git a/package.json b/package.json index c00384f9f..9533263bc 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "devDependencies": { "babel-cli": "^6.26.0", + "babel-core": "^6.26.3", "babel-preset-env": "^1.6.1", "babel-preset-stage-2": "^6.24.1", "caniuse-db": "^1.0.30000813", diff --git a/snippets/custom-scrollbar.md b/snippets/custom-scrollbar.md index 8793dad65..522e9e77e 100644 --- a/snippets/custom-scrollbar.md +++ b/snippets/custom-scrollbar.md @@ -7,9 +7,9 @@ Customizes the scrollbar style for the document and elements with scrollable ove ```html

                      - Lorem ipsum dolor sit amet consectetur adipisicing elit.
                      - Iure id exercitationem nulla qui repellat laborum vitae,
                      - molestias tempora velit natus. Quas, assumenda nisi.
                      + Lorem ipsum dolor sit amet consectetur adipisicing elit.
                      + Iure id exercitationem nulla qui repellat laborum vitae,
                      + molestias tempora velit natus. Quas, assumenda nisi.
                      Quisquam enim qui iure, consequatur velit sit?

                      diff --git a/snippets/display-table-centering.md b/snippets/display-table-centering.md index 916d9dd7b..194d501dd 100644 --- a/snippets/display-table-centering.md +++ b/snippets/display-table-centering.md @@ -6,9 +6,7 @@ Vertically and horizontally centers a child element within its parent element us ```html
                      -
                      - Centered content -
                      +
                      Centered content
                      ``` diff --git a/snippets/fit-image-in-container.md b/snippets/fit-image-in-container.md index a822c0bb4..fd4e01129 100644 --- a/snippets/fit-image-in-container.md +++ b/snippets/fit-image-in-container.md @@ -5,8 +5,8 @@ Changes the fit and position of an image within its container while preserving i #### HTML ```html - - + + ``` #### CSS diff --git a/snippets/flexbox-centering.md b/snippets/flexbox-centering.md index 2efc00dbb..c652932f5 100644 --- a/snippets/flexbox-centering.md +++ b/snippets/flexbox-centering.md @@ -5,9 +5,7 @@ Horizontally and vertically centers a child element within a parent element usin #### HTML ```html -
                      -
                      Centered content.
                      -
                      +
                      Centered content.
                      ``` #### CSS diff --git a/snippets/grid-centering.md b/snippets/grid-centering.md index 01d9630c5..f9e39103c 100644 --- a/snippets/grid-centering.md +++ b/snippets/grid-centering.md @@ -5,9 +5,7 @@ Horizontally and vertically centers a child element within a parent element usin #### HTML ```html -
                      -
                      Centered content.
                      -
                      +
                      Centered content.
                      ``` #### CSS diff --git a/snippets/mouse-cursor-gradient-tracking.md b/snippets/mouse-cursor-gradient-tracking.md index 519857142..ca700b3df 100644 --- a/snippets/mouse-cursor-gradient-tracking.md +++ b/snippets/mouse-cursor-gradient-tracking.md @@ -7,9 +7,7 @@ A hover effect where the gradient follows the mouse cursor. #### HTML ```html - + ``` #### CSS diff --git a/snippets/offscreen.md b/snippets/offscreen.md index d14a4cc50..2465e34fa 100644 --- a/snippets/offscreen.md +++ b/snippets/offscreen.md @@ -6,8 +6,7 @@ A bulletproof way to completely hide an element visually and positionally in the ```html - Learn More - about pants + Learn More about pants ``` diff --git a/snippets/overflow-scroll-gradient.md b/snippets/overflow-scroll-gradient.md index d6243d750..49c1f989a 100644 --- a/snippets/overflow-scroll-gradient.md +++ b/snippets/overflow-scroll-gradient.md @@ -7,13 +7,13 @@ Adds a fading gradient to an overflowing element to better indicate there is mor ```html
                      - Lorem ipsum dolor sit amet consectetur adipisicing elit.
                      - Iure id exercitationem nulla qui repellat laborum vitae,
                      - molestias tempora velit natus. Quas, assumenda nisi.
                      - Quisquam enim qui iure, consequatur velit sit?
                      - Lorem ipsum dolor sit amet consectetur adipisicing elit.
                      - Iure id exercitationem nulla qui repellat laborum vitae,
                      - molestias tempora velit natus. Quas, assumenda nisi.
                      + Lorem ipsum dolor sit amet consectetur adipisicing elit.
                      + Iure id exercitationem nulla qui repellat laborum vitae,
                      + molestias tempora velit natus. Quas, assumenda nisi.
                      + Quisquam enim qui iure, consequatur velit sit?
                      + Lorem ipsum dolor sit amet consectetur adipisicing elit.
                      + Iure id exercitationem nulla qui repellat laborum vitae,
                      + molestias tempora velit natus. Quas, assumenda nisi.
                      Quisquam enim qui iure, consequatur velit sit?
                      diff --git a/snippets/popout-menu.md b/snippets/popout-menu.md index 4108b29b9..3adee714a 100644 --- a/snippets/popout-menu.md +++ b/snippets/popout-menu.md @@ -5,11 +5,7 @@ Reveals an interactive popout menu on hover and focus. #### HTML ```html -
                      -
                      - Popout menu -
                      -
                      +
                      Popout menu
                      ``` #### CSS diff --git a/snippets/reset-all-styles.md b/snippets/reset-all-styles.md index 26c942b2b..a3bb94bb0 100644 --- a/snippets/reset-all-styles.md +++ b/snippets/reset-all-styles.md @@ -7,7 +7,11 @@ Resets all styles to default values with one property. This will not affect `dir ```html
                      Title
                      -

                      Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui iure, consequatur velit sit?

                      +

                      + Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui + repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui + iure, consequatur velit sit? +

                      ``` diff --git a/snippets/sibling-fade.md b/snippets/sibling-fade.md index 77c6f112a..02d514764 100644 --- a/snippets/sibling-fade.md +++ b/snippets/sibling-fade.md @@ -6,12 +6,8 @@ Fades out the siblings of a hovered item. ```html
                      - Item 1 - Item 2 - Item 3 - Item 4 - Item 5 - Item 6 + Item 1 Item 2 Item 3 Item 4 + Item 5 Item 6
                      ``` diff --git a/snippets/toggle-switch.md b/snippets/toggle-switch.md index d25a05db2..b7e6da786 100644 --- a/snippets/toggle-switch.md +++ b/snippets/toggle-switch.md @@ -5,8 +5,7 @@ Creates a toggle switch with CSS only. #### HTML ```html - - + ``` #### CSS diff --git a/snippets/transform-centering.md b/snippets/transform-centering.md index 7c33b501d..befc8e6f7 100644 --- a/snippets/transform-centering.md +++ b/snippets/transform-centering.md @@ -5,9 +5,7 @@ Vertically and horizontally centers a child element within its parent element us #### HTML ```html -
                      -
                      Centered content
                      -
                      +
                      Centered content
                      ``` #### CSS diff --git a/src/js/deps/utils.js b/src/js/deps/utils.js index ffc4939ac..b25071001 100644 --- a/src/js/deps/utils.js +++ b/src/js/deps/utils.js @@ -30,8 +30,8 @@ export const createEventHub = () => ({ window.EventHub = createEventHub() /* -* Make iOS behave normally. -*/ + * Make iOS behave normally. + */ if (/iPhone|iPad|iPod/.test(navigator.platform) && !window.MSStream) { document.body.style.cursor = 'pointer' } @@ -41,11 +41,11 @@ if (/Mac/.test(navigator.platform)) { } /* -* A small utility to fix the letter kerning on macOS Chrome and Firefox when using the system font -* (San Francisco). It is now fixed in the text rendering engine in FF 58 and Chrome 64. -* UPDATE: It appears the applied fix doesn't work when the font is in italics. New fix has been added. -* Must be applied to all browsers for now. -*/ + * A small utility to fix the letter kerning on macOS Chrome and Firefox when using the system font + * (San Francisco). It is now fixed in the text rendering engine in FF 58 and Chrome 64. + * UPDATE: It appears the applied fix doesn't work when the font is in italics. New fix has been added. + * Must be applied to all browsers for now. + */ ;(() => { const ua = navigator.userAgent