You Know You Should Use JavaScript When… by Chris Coyier, 9/21/09, css-tricks.com
Making It Better Without Making It Over by Rebecca Murhy, DinosaurJS 2016
How many people are missing out on JavaScript enhancement? by Peter Herlihy, 10/21/13, gov.uk
Chrome's NOSCRIPT Intervention by Tim Kadlec, 9/6/18, timkadlec.com
Between all the animation options with CSS and SVG, we have no reason to rely on JS
•
animation
property
•
animation-play-state
property
•
@keyframe
at-rule
•
transform
property
•
transition
property
•
transition-delay
property
:target
A CSS pseudo-class that represents a unique element (the target element) with an id matching the URL's fragment.
• modals
• slideshows
• tabs
• carousels
Matches the second element only if it immediately follows the first element.
p + img { … }
iOS 6 switch style checkboxes with pure CSS by Lea Verou, 3/15/13, lea.verou.me
animation-play-state
A CSS property that specifies whether an animation is running or paused. Combined with pseudo selectors like
:hover
,
:focus
,
:valid
,
:invalid
, etc you can get really creative interactions.
Smooth state animations with animation-play-state by Lea Verou, 1/9/14, lea.verou.me
position: sticky
We used to rely heavily on JS using
window.onscroll
and determine the position of elements relative to the window.
position: sticky; by Chris Coyier, 11/9/16, css-tricks.com
Create smooth scroll experiences by specifying snap positions that tell the browser where to stop after each scrolling operation.
• image carousels
• paginated sections
#gallery {
scroll-snap-type: x mandatory;
overflow-x: scroll;
display: flex;
}
#gallery img {
scroll-snap-align: center;
}