Updated snippet cards (WIP)

This commit is contained in:
Angelos Chalaris
2019-08-23 13:48:48 +03:00
parent 6990b61e44
commit d12e35a5c8
55 changed files with 456 additions and 501 deletions

View File

@ -1,6 +1,6 @@
---
title: Bouncing loader
tags: animation,intermediate
tags: animation
---
Creates a bouncing loader animation.

View File

@ -1,6 +1,6 @@
---
title: Box-sizing reset
tags: layout,intermediate
tags: layout
---
Resets the box-model so that `width`s and `height`s are not affected by their `border`s or `padding`.

View File

@ -1,6 +1,6 @@
---
title: Button border animation
tags: animation,intermediate
tags: animation
---
Creates a border animation on hover.

View File

@ -1,6 +1,6 @@
---
title: Calc()
tags: other,intermediate
tags: 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.

View File

@ -1,6 +1,6 @@
---
title: Circle
tags: visual,intermediate
tags: visual
---
Creates a circle shape with pure CSS.

View File

@ -1,6 +1,6 @@
---
title: Clearfix
tags: layout,intermediate
tags: layout
---
Ensures that an element self-clears its children.

View File

@ -1,6 +1,6 @@
---
title: Constant width to height ratio
tags: layout,intermediate
tags: layout
---
Given an element of variable width, it will ensure its height remains proportionate in a responsive fashion

View File

@ -1,6 +1,6 @@
---
title: Counter
tags: visual, other,intermediate
tags: visual, other
---
Counters are, in essence, variables maintained by CSS whose values may be incremented by CSS rules to track how many times they're used.

View File

@ -1,6 +1,6 @@
---
title: Custom scrollbar
tags: visual,intermediate
tags: visual
---
Customizes the scrollbar style for the document and elements with scrollable overflow, on WebKit platforms.

View File

@ -1,6 +1,6 @@
---
title: Custom text selection
tags: visual,intermediate
tags: visual
---
Changes the styling of text selection.

View File

@ -1,6 +1,6 @@
---
title: Custom variables
tags: other,intermediate
tags: other
---
CSS variables that contain specific values to be reused throughout a document.

View File

@ -1,6 +1,6 @@
---
title: Disable selection
tags: interactivity,intermediate
tags: interactivity
---
Makes the content unselectable.

View File

@ -1,6 +1,6 @@
---
title: Display table centering
tags: layout,intermediate
tags: layout
---
Vertically and horizontally centers a child element within its parent element using `display: table` (as an alternative to `flexbox`).

View File

@ -1,6 +1,6 @@
---
title: Donut spinner
tags: animation,intermediate
tags: animation
---
Creates a donut spinner that can be used to indicate the loading of content.

View File

@ -1,6 +1,6 @@
---
title: Dynamic shadow
tags: visual,intermediate
tags: visual
---
Creates a shadow similar to `box-shadow` but based on the colors of the element itself.

View File

@ -1,6 +1,6 @@
---
title: Easing variables
tags: animation,intermediate
tags: animation
---
Variables that can be reused for `transition-timing-function` properties, more

View File

@ -1,6 +1,6 @@
---
title: Etched text
tags: visual,intermediate
tags: visual
---
Creates an effect where text appears to be "etched" or engraved into the background.

View File

@ -1,6 +1,6 @@
---
title: Evenly distributed children
tags: layout,intermediate
tags: layout
---
Evenly distributes child elements within a parent element.

View File

@ -1,6 +1,6 @@
---
title: Fit image in container
tags: layout, visual,intermediate
tags: layout, visual
---
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.

View File

@ -1,6 +1,6 @@
---
title: Flexbox centering
tags: layout,intermediate
tags: layout
---
Horizontally and vertically centers a child element within a parent element using `flexbox`.

View File

@ -1,6 +1,6 @@
---
title: Focus Within
tags: visual, interactivity,intermediate
tags: visual, interactivity
---
Changes the appearance of a form if any of its children are focused.

View File

@ -1,6 +1,6 @@
---
title: Fullscreen
tags: visual,intermediate
tags: visual
---
The :fullscreen CSS pseudo-class represents an element that's displayed when the browser is in fullscreen mode.

View File

@ -1,6 +1,6 @@
---
title: Ghost trick
tags: layout,intermediate
tags: layout
---
Vertically centers an element in another.

View File

@ -1,6 +1,6 @@
---
title: Gradient text
tags: visual,intermediate
tags: visual
---
Gives text a gradient color.

View File

@ -1,6 +1,6 @@
---
title: Grid centering
tags: layout,intermediate
tags: layout
---
Horizontally and vertically centers a child element within a parent element using `grid`.

View File

@ -1,6 +1,6 @@
---
title: Hairline border
tags: visual,intermediate
tags: visual
---
Gives an element a border equal to 1 native device pixel in width, which can look

View File

@ -1,6 +1,6 @@
---
title: Height transition
tags: animation,intermediate
tags: animation
---
Transitions an element's height from `0` to `auto` when its height is unknown.

View File

@ -1,6 +1,6 @@
---
title: Hover shadow box animation
tags: animation,intermediate
tags: animation
---
Creates a shadow box around the text when it is hovered.

View File

@ -1,6 +1,6 @@
---
title: Hover underline animation
tags: animation,intermediate
tags: animation
---
Creates an animated underline effect when the text is hovered over.

View File

@ -1,6 +1,6 @@
---
title: Last item with remaining available height
tags: layout,intermediate
tags: layout
---
Take advantage of available viewport space by giving the last element the remaining available space in current viewport, even when resizing the window.

View File

@ -1,6 +1,6 @@
---
title: Mouse cursor gradient tracking
tags: visual, interactivity,intermediate
tags: visual, interactivity
---
A hover effect where the gradient follows the mouse cursor.

View File

@ -1,6 +1,6 @@
---
title: :not selector
tags: visual,intermediate
tags: visual
---
The `:not` psuedo selector is useful for styling a group of elements, while leaving the last (or specified) element unstyled.

View File

@ -1,6 +1,6 @@
---
title: Offscreen
tags: layout, visual,intermediate
tags: layout, visual
---
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](https://adata.org/learn-about-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.

View File

@ -1,6 +1,6 @@
---
title: Overflow scroll gradient
tags: visual,intermediate
tags: visual
---
Adds a fading gradient to an overflowing element to better indicate there is more content to be scrolled.

View File

@ -1,6 +1,6 @@
---
title: Popout menu
tags: interactivity,intermediate
tags: interactivity
---
Reveals an interactive popout menu on hover and focus.

View File

@ -1,6 +1,6 @@
---
title: Pretty text underline
tags: visual,intermediate
tags: visual
---
A nicer alternative to `text-decoration: underline` or `<u></u>` where descenders do not clip the underline.

View File

@ -1,6 +1,6 @@
---
title: Reset all styles
tags: visual,intermediate
tags: visual
---
Resets all styles to default values with one property. This will not affect `direction` and `unicode-bidi` properties.

View File

@ -1,6 +1,6 @@
---
title: Shape separator
tags: visual,intermediate
tags: visual
---
Uses an SVG shape to separate two different blocks to create more a interesting visual appearance compared to standard horizontal separation.

View File

@ -1,6 +1,6 @@
---
title: Sibling fade
tags: interactivity,intermediate
tags: interactivity
---
Fades out the siblings of a hovered item.

View File

@ -1,6 +1,6 @@
---
title: System font stack
tags: visual,intermediate
tags: visual
---
Uses the native font of the operating system to get close to a native app feel.

View File

@ -1,6 +1,6 @@
---
title: Toggle switch
tags: visual, interactivity,intermediate
tags: visual, interactivity
---
Creates a toggle switch with CSS only.

View File

@ -1,6 +1,6 @@
---
title: Transform centering
tags: layout,intermediate
tags: layout
---
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.

View File

@ -1,6 +1,6 @@
---
title: Triangle
tags: visual,intermediate
tags: visual
---
Creates a triangle shape with pure CSS.

View File

@ -1,6 +1,6 @@
---
title: Truncate text multiline
tags: layout,intermediate
tags: layout
---
If the text is longer than one line, it will be truncated for `n` lines and end with an gradient fade.

View File

@ -1,6 +1,6 @@
---
title: Truncate text
tags: layout,intermediate
tags: layout
---
If the text is longer than one line, it will be truncated and end with an ellipsis `…`.

View File

@ -1,6 +1,6 @@
---
title: Zebra striped list
tags: visual,intermediate
tags: visual
---
Creates a striped list with alternating background colors, which is useful for differentiating siblings that have content spread across a wide row.