Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View pieter-biesemans's full-sized avatar

Pieter Biesemans pieter-biesemans

  • Antwerp, Belgium
View GitHub Profile
@pieter-biesemans
pieter-biesemans / gsap-aos.js
Created August 11, 2023 07:42
GSAP Animate On Scroll
//Prefers reduced motion check
let reduceMotion = window.matchMedia('(prefers-reduced-motion)').matches;
//create a traversable array of all the items with the animation data attr
const animateItems = gsap.utils.toArray('[data-in], [data-out]');
//add the animation to each item in the array
animateItems.forEach((item, i) => {
//respect reduced motion request
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
html, body, h1, h2, h3, h4, p, a, ul, ol, li, input, textarea {
font-family: 'Open Sans', sans !important;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
p {
line-height: 1.5em;
aside, .w-blog-post.deal, .w-blog-post.podcast, .w-blog-post.uncategorized{
display: none;
}
main, .l-content {
width: 100%;
}
@pieter-biesemans
pieter-biesemans / helpers.scss
Last active March 25, 2021 15:18
SCSS helper snippets
/* ===================== *\
SCSS HELPERS
\* ===================== */
/* TRANSFORM =-=-=-=-=-=-=-=-=-=-=-=*/
@mixin transform($transform){
-ms-transform: $transform;
-webkit-transform: $transform;
transform: $transform;