Skip to content

Commit

Permalink
Updated snippet cards (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalarangelo committed Aug 23, 2019
1 parent 6990b61 commit d12e35a
Show file tree
Hide file tree
Showing 55 changed files with 454 additions and 499 deletions.
Binary file added assets/NotoSans-Bold.ttf
Binary file not shown.
230 changes: 92 additions & 138 deletions snippet_data/snippetList.json

Large diffs are not rendered by default.

370 changes: 162 additions & 208 deletions snippet_data/snippets.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion snippets/bouncing-loader.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Bouncing loader
tags: animation,intermediate
tags: animation
---

Creates a bouncing loader animation.
Expand Down
2 changes: 1 addition & 1 deletion snippets/box-sizing-reset.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion snippets/button-border-animation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Button border animation
tags: animation,intermediate
tags: animation
---

Creates a border animation on hover.
Expand Down
2 changes: 1 addition & 1 deletion snippets/calc.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/circle.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Circle
tags: visual,intermediate
tags: visual
---

Creates a circle shape with pure CSS.
Expand Down
2 changes: 1 addition & 1 deletion snippets/clearfix.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Clearfix
tags: layout,intermediate
tags: layout
---

Ensures that an element self-clears its children.
Expand Down
2 changes: 1 addition & 1 deletion snippets/constant-width-to-height-ratio.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion snippets/counter.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/custom-scrollbar.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/custom-text-selection.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Custom text selection
tags: visual,intermediate
tags: visual
---

Changes the styling of text selection.
Expand Down
2 changes: 1 addition & 1 deletion snippets/custom-variables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Custom variables
tags: other,intermediate
tags: other
---

CSS variables that contain specific values to be reused throughout a document.
Expand Down
2 changes: 1 addition & 1 deletion snippets/disable-selection.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Disable selection
tags: interactivity,intermediate
tags: interactivity
---

Makes the content unselectable.
Expand Down
2 changes: 1 addition & 1 deletion snippets/display-table-centering.md
Original file line number Diff line number Diff line change
@@ -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`).
Expand Down
2 changes: 1 addition & 1 deletion snippets/donut-spinner.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/dynamic-shadow.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/easing-variables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Easing variables
tags: animation,intermediate
tags: animation
---

Variables that can be reused for `transition-timing-function` properties, more
Expand Down
2 changes: 1 addition & 1 deletion snippets/etched-text.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/evenly-distributed-children.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Evenly distributed children
tags: layout,intermediate
tags: layout
---

Evenly distributes child elements within a parent element.
Expand Down
2 changes: 1 addition & 1 deletion snippets/fit-image-in-container.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/flexbox-centering.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion snippets/focus-within.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/fullscreen.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/ghost-trick.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Ghost trick
tags: layout,intermediate
tags: layout
---

Vertically centers an element in another.
Expand Down
2 changes: 1 addition & 1 deletion snippets/gradient-text.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Gradient text
tags: visual,intermediate
tags: visual
---

Gives text a gradient color.
Expand Down
2 changes: 1 addition & 1 deletion snippets/grid-centering.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion snippets/hairline-border.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion snippets/height-transition.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/hover-shadow-box-animation.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/hover-underline-animation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Hover underline animation
tags: animation,intermediate
tags: animation
---

Creates an animated underline effect when the text is hovered over.
Expand Down
2 changes: 1 addition & 1 deletion snippets/last-item-with-remaining-available-height.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/mouse-cursor-gradient-tracking.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/not-selector.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/offscreen.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/overflow-scroll-gradient.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/popout-menu.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Popout menu
tags: interactivity,intermediate
tags: interactivity
---

Reveals an interactive popout menu on hover and focus.
Expand Down
2 changes: 1 addition & 1 deletion snippets/pretty-text-underline.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/reset-all-styles.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/shape-separator.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/sibling-fade.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Sibling fade
tags: interactivity,intermediate
tags: interactivity
---

Fades out the siblings of a hovered item.
Expand Down
2 changes: 1 addition & 1 deletion snippets/system-font-stack.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/toggle-switch.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Toggle switch
tags: visual, interactivity,intermediate
tags: visual, interactivity
---

Creates a toggle switch with CSS only.
Expand Down
2 changes: 1 addition & 1 deletion snippets/transform-centering.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/triangle.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Triangle
tags: visual,intermediate
tags: visual
---

Creates a triangle shape with pure CSS.
Expand Down
2 changes: 1 addition & 1 deletion snippets/truncate-text-multiline.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snippets/truncate-text.md
Original file line number Diff line number Diff line change
@@ -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 ``.
Expand Down
2 changes: 1 addition & 1 deletion snippets/zebra-striped-list.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading

0 comments on commit d12e35a

Please sign in to comment.