Skip to content

Instantly share code, notes, and snippets.

View cristicretu's full-sized avatar
🚀
lock in

Cristian Crețu cristicretu

🚀
lock in
View GitHub Profile
@cristicretu
cristicretu / scroll-masking.css
Created November 5, 2025 06:06 — forked from linuz90/scroll-masking.css
Tailwind Scroll Masking Utils
/* ----------------------------- Scroll Masking ----------------------------- */
/* Custom properties for scroll-driven mask animations */
@property --mask-up-fade {
syntax: "<length>";
inherits: false;
initial-value: 0;
}
@property --mask-down-fade {
@cristicretu
cristicretu / Apps.jsx
Created December 5, 2024 06:28 — forked from UdaraJay/Apps.jsx
Animated card stack
import styles from './Apps.module.scss';
import { useEffect, useState } from 'react';
import Link from 'next/link';
const APPS = [
{
title: 'APP',
hero: 'Lorem ipsum dolor sit amet',
description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do.',
@cristicretu
cristicretu / what-forces-layout.md
Created August 24, 2024 07:08 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent