Skip to content

Instantly share code, notes, and snippets.

View jorgemartins's full-sized avatar

Jorge Martins jorgemartins

View GitHub Profile
@EllyLoel
EllyLoel / reset.css
Last active June 28, 2024 04:00
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
@perrysmotors
perrysmotors / ParallaxLayer.tsx
Last active October 9, 2022 08:34
Add Parallax to scroll content in Framer X
import { Override, motionValue, useTransform } from "framer"
const contentOffsetY = motionValue(0)
// Apply this override to your scroll component
export function TrackScroll(): Override {
return { contentOffsetY: contentOffsetY }
}
// Apply this override to your parallax layer
@jlbruno
jlbruno / ordinal.js
Last active July 28, 2022 14:58
Javascript Ordinal Numbers
// found here http://forums.shopify.com/categories/2/posts/29259
var getOrdinal = function(n) {
var s=["th","st","nd","rd"],
v=n%100;
return n+(s[(v-20)%10]||s[v]||s[0]);
}