How to prevent scrolling the page on iOS Safari 15
If we show a modal on iOS we need to prevent events inside the modal from interacting with the page behind the modal. On a previous episode of “Fun with Safari” we could use preventDefault() on the "touchmove" event but on iOS 15 that no longer works. Here we go.
LEGO Letterpress: Bird Species from The Netherlands Are Printed with Everyone’s Favorite Toy Bricks
Back in 2017, designer Roy Scholten and collaborator Martijn van der Blom brought LEGO into their letterpress workshops for elementary school students. Small and accessible to most, the ubiquitous plastic bricks were easier and faster to use than traditional lead type and were familiar creative tool
SVGeez hosts a collection of fun, free and configurable SVG repeating patterns and backgrounds for websites. Customize foreground and background colors, adjust scale, copy and paste SVG CSS into your website for use.
Generative Art Projects | Photos, videos, logos, illustrations and branding on Behance
We worked with generative art, creative coding and graphic design to make a brand identity that is always different, but with the same visual language. How can we bridge the gap between code and design? This is our approach.
I’ve been using a fluid type and spacing system on the most recent builds I’ve completed. Here’s why I use it, and how I approach it. I mainly use SCSS (a
This video explores using the Intersection Observer API to watch for an element leaving the page and then changing the style of a fixed navigation bar.
GitHub repo: https://github.com/kevin-powell/navbar-change-on-scroll
(includes start and finished versions)
I set up some custom properties ahead of time to make the change really super simple, and then with the use of a little JavaScript to set up our observer, we can add (or remove) a class from our navigation when it reaches the right point on the screen.
#JavaScript #IntersectionObserver #CSS
---
Come and hangout, ask questions, suggest ideas, and meet some awesome people over in The Community: https://discord.gg/nTYCvrK
I have a newsletter! https://www.kevinpowell.co/newsletter
New to Sass, or want to step up your game with it? I've got a course just for you: https://www.kevinpowell.co/learn-sass
---
My Code Editor: VS Code - https://code.visualstudio.com/
How my browser refreshes when I save: https://youtu.be/h24noHYsuGc
---
Support me on Patreon: https://www.patreon.com/kevinpowell
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.
Instagram: https://www.instagram.com/kevinpowell.co/
Twitter: https://twitter.com/KevinJPowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
Parallax is extremely popular right now. Here's a simple way to implement a horizontal parallax with only a couple lines of code.
Feel free to check this implementation out at the following codepen:
https://codepen.io/johnmeade-webdev/pen/GRoqgmG
Using Absolute Value, Sign, Rounding and Modulo in CSS Today | CSS-Tricks - CSS-Tricks
For quite a while now, the CSS spec has included a lot of really useful mathematical functions, such as trigonometric functions (sin(), cos(), tan(), asin(),
Reducing The Web’s Carbon Footprint: Optimizing Social Media Embeds — Smashing Magazine
In this article, we’ll look specifically at what we can do to reduce the impact of social media embeds and social sharing widgets — or even some strategies to avoid them altogether. While the spotlight is on reducing the environmental impact, many of these tips will be great for performance too.