In the ground since Fri Oct 01 2021
Last watered inFri Oct 01 2021
CSS
Common Cases
Afix/Sticky Navbar
https://www.geeksforgeeks.org/how-to-create-an-affix-or-sticky-navbar/
https://medium.com/@satisshtechie/sticky-navbar-with-animation-react-3d7efc491591
Dealing with Overflows
Unexpected CSS things
overflow on <body> / <html> doesn't work
https://stackoverflow.com/questions/41506456/why-body-overflow-not-working
CSS Variables
Setting CSS Variables via Typescript (TS)
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
1export const ThemeSetup = () => {
2 useEffect(() => {
3 const root = document?.documentElement;
4
5 root.style.setProperty("--active-primary", "someColorHere");
6 root.style.setProperty("--active-secondary", "someOtherColorHere");
7 }, []);
8
9 return null;
10};
Grid
Make the child element grows the maximum of the parent height when the parent is a Grid Item