workspace-898292ff-937a-4e59-95ab-06bedb43a0fb.tar
148 KB
Tiktok clone
➡️ Live demo
➡️ Live demo
🌀 New CSS Loader: "Neon Orbit"
Simple, modern, and smooth.
HTML
CSS
Tip: Change colors or inset values to create new variants.
#css #loader #animation #fron
Simple, modern, and smooth.
HTML
<div class="loader" aria-label="Loading">
<span></span><span></span><span></span>
</div>
CSS
.loader{
width:56px;height:56px;
position:relative;
filter:drop-shadow(0 0 10px #00e5ff);
}
.loader span{
position:absolute;inset:0;
border-radius:50%;
border:3px solid transparent;
border-top-color:#00e5ff;
animation:spin 1s linear infinite;
}
.loader span:nth-child(2){
inset:10px;
border-top-color:#a855f7;
animation-duration:.85s;
animation-direction:reverse;
}
.loader span:nth-child(3){
inset:20px;
border-top-color:#22c55e;
animation-duration:1.15s;
}
@keyframes spin{to{transform:rotate(360deg)}}
/* optional: center on page */
body{margin:0;min-height:100vh;display:grid;place-items:center;background:#0b1220}
Tip: Change colors or inset values to create new variants.
#css #loader #animation #fron
CodePen Blog
Chris’ Corner: Lovingly Esoteric CSS
Can you reason out the difference between a selector doing
is really:
The latter becomes a lot more clear to me:
1. Select all the stuff in a
2. Select the card as long as it doesn’t contain an
Super different. I love stuff like this. Like Sudoku puzzles for CSS nerds.
Speaking of
I didn’t know this was coming, but I love it, and it makes intuitive sense to me. Una explains in Range Syntax for Style Queries.
My brain goes right now how
But my enthusiasm is tempered by the fact that you can’t do a container query on the same element you set the custom property on. So like this doesn’t work:
You can see what I mean here with a working version.
Because I’m setting
I appreciate Roma Komarov’s obsessing about a tiny detail here. This website Ink & Switch has these kinda rough hand-drawn underlines on it. But when they wrap the wrapping edge is “hard cut”. But it needn’t be so. The CSS property
My toxic trait is that I like to declare winners of things. Like how Apple won with
Chris’ Corner: Lovingly Esoteric CSS
Can you reason out the difference between a selector doing
:has(:not) vs :not(:has)? Kilian Valkhof wrote up that post I just linked to. I like how he teaches the way to think it out is to write out all the implied selectors at work. For instance: .card:has(:not(img)) {} .card:not(:has(img)) {} is really:
.card:has(*:not(img)) {} .card:not(.card:has(img)) {} The latter becomes a lot more clear to me:
1. Select all the stuff in a
.card that isn’t an img. 2. Select the card as long as it doesn’t contain an
img. Super different. I love stuff like this. Like Sudoku puzzles for CSS nerds.
Speaking of
:has(), Heydon gets a bit philosophical with a “Sidebar” layout, explaining how it can get a lot more flexible when we think of how to handle it with any particular layout that just so happens to have a sidebar. And just so happens is a specialty of :has(), polished up with a nice dollop of @container. I didn’t know this was coming, but I love it, and it makes intuitive sense to me. Una explains in Range Syntax for Style Queries.
/* Range query for rain percent (new) */ @container style(--rain-percent > 45%) { .weather-card { background: linear-gradient(140deg, skyblue, lightblue);
}
} My brain goes right now how
line-height often needs to get sucked in when the font-size goes up. So assuming those are custom properties powered, something like this could be cool: @container style(--font-size > 2rem) { line-height: 1;
} But my enthusiasm is tempered by the fact that you can’t do a container query on the same element you set the custom property on. So like this doesn’t work:
h1, h2, h3 { font-size: var(--header-font-size, 1.5rem);
@container style(--header-font-size > 2rem) { line-height: 1;
}
} h1 { --header-font-size: 3rem;
} You can see what I mean here with a working version.
Because I’m setting
--header-font-size at the same “level” as I’m testing it with @container it just doesn’t work. It would have to be set at least one DOM level higher, which is probably not what I’d be doing on an element like this. Oh well, it’s still cool. I appreciate Roma Komarov’s obsessing about a tiny detail here. This website Ink & Switch has these kinda rough hand-drawn underlines on it. But when they wrap the wrapping edge is “hard cut”. But it needn’t be so. The CSS property
box-decoration-break: clone fixes it entirely. Beautiful. You can kinda forgive someone not knowing this as the browser support isn’t perfect. And more, the fact that it starts with box- kinda makes you think it’s gonna be related to box-shadow but really it’s (get this): border-radius, border-image, box-shadow, and background. That’s some good bar trivia right there for you and all your CSS buds.My toxic trait is that I like to declare winners of things. Like how Apple won with
grid-lanes 😬. Or how oklch() is the winning modern color format. Instead of giving those topics the nuance they deserve. I also have a lot of muscle memory for just using rem units everywhere, considering them the winning unit. But that one is almost certainly too narrow of an opinion. In fact, it’s probably not any one particular unit, but as Miriam says The Best CSS Unit Might Be a Combination: We don’t have to choose between px and rem for spacing. .card { /* use 1lh, unless we run out of space */ --min: min(1lh, 2vi); /* round-up to the nearest half-line */ --nearest-half: round(up, 2vi, 0.5lh);
}CodePen
Chris’ Corner: Lovingly Esoteric CSS
Can you reason out the difference between a selector doing :has(:not) vs :not(:has)? Kilian Valkhof wrote up that post I just linked to. I like how he teaches the way to think it out is to write ou…
❤1
Best JavaScript libraries for websites (pick what you need)
UI: React / Vue / Svelte
CSS/UI: Tailwind CSS, Bootstrap
Animations: GSAP, Framer Motion
Charts: Chart.js, D3.js
Forms: React Hook Form, Formik
HTTP: Axios
Dates: Day.js
Validation: Zod, Yup
State: Redux Toolkit, Zustand
Build: Vite
Tip: don’t add libraries “just in case”-opt for the smallest stack.
#javascript #webdev #frontend #html #coding
UI: React / Vue / Svelte
CSS/UI: Tailwind CSS, Bootstrap
Animations: GSAP, Framer Motion
Charts: Chart.js, D3.js
Forms: React Hook Form, Formik
HTTP: Axios
Dates: Day.js
Validation: Zod, Yup
State: Redux Toolkit, Zustand
Build: Vite
Tip: don’t add libraries “just in case”-opt for the smallest stack.
#javascript #webdev #frontend #html #coding
Html codes
Photo
CodePen Blog
Chris’ Corner: Light & Boxes
Andy Bell with pitch perfect bait for me: Fun shadow coding challenge. Just a simple line across a page, but imagine that line is a light source. Squares below the light source have a
https://blog.codepen.io/wp-content/uploads/2026/02/Screenshot-2026-02-06-at-7.37.03-AM.png
JavaScript? Of course, the all-powerful JavaScript can do this. That’s what Andy himself did eight years ago with the inception of this idea.
Kitty Giraudel blogged in with a solution involving
In CSS we can’t read
This isn’t illegal, of course.
I think this is one of these things where some JavaScript is not only needed, but also probably quite important to craft a solution that makes fewer assumptions and work nicely in more flexible circumstances — even if still relying on scroll-driven animations.
But certainly it’s fun to flex those muscles a little harder and see if there is a way. Roman Komarov jumped in and used scroll-driven animations as well, but of the
There is a take where the box-shadow values are manipulated directly with a
Chris Wachtman jumped in with some alternate takes based on the light source idea. Like what if the light source wasn’t a line, but instead your cursor turned into a little sun!
CSS is so cool. Kitty, Chris(es), Roman, you’re pretty cool too.
Chris’ Corner: Light & Boxes
Andy Bell with pitch perfect bait for me: Fun shadow coding challenge. Just a simple line across a page, but imagine that line is a light source. Squares below the light source have a
box-shadow. How can we make it so as the squares scroll by, that box-shadow adjusts itself to honor that “light source”? https://blog.codepen.io/wp-content/uploads/2026/02/Screenshot-2026-02-06-at-7.37.03-AM.png
JavaScript? Of course, the all-powerful JavaScript can do this. That’s what Andy himself did eight years ago with the inception of this idea.
Kitty Giraudel blogged in with a solution involving
animation-timeline: scroll(); which I’m quite sure is just the kind of thing Andy was fishing for. But Kitty relied on some information from JavaScript:In CSS we can’t read
offsetTop or offsetHeight, so we pass them from JavaScript as custom properties:This isn’t illegal, of course.
I think this is one of these things where some JavaScript is not only needed, but also probably quite important to craft a solution that makes fewer assumptions and work nicely in more flexible circumstances — even if still relying on scroll-driven animations.
But certainly it’s fun to flex those muscles a little harder and see if there is a way. Roman Komarov jumped in and used scroll-driven animations as well, but of the
animation-timeline: view(); type rather than scroll(). I think this is key as then we’ve unlocked information about the boxes position within the viewport that we wouldn’t have otherwise. I kinda love Roman’s solution as it doesn’t adjust individual box-shadow values at all, those just adjust from a shadow generally “pointed down” to “pointed up” and it interpolates between them. All the logic is tucked into the animation-range declaration. There is a take where the box-shadow values are manipulated directly with a
view() scroll timeline though, from Chris Bolson. Each of the shadows properties are directly manipulated in the keyframe. Like others, this requires the custom properties to be @property delcared with a type so that the animation knows how to animate them. Chris’ approach is extra classy as it has this touch where the further away from the light source, the lighter the shadow, which feels great.Chris Wachtman jumped in with some alternate takes based on the light source idea. Like what if the light source wasn’t a line, but instead your cursor turned into a little sun!
CSS is so cool. Kitty, Chris(es), Roman, you’re pretty cool too.
📡 System Radar UI
A pure CSS scanning animation.
Perfect for "Server Status" pages or security dashboards. It creates a sense of activity and monitoring without using a single line of JavaScript.
👇 Copy Code:
#CSS #Animation #Dashboard #UI #Snippet
A pure CSS scanning animation.
Perfect for "Server Status" pages or security dashboards. It creates a sense of activity and monitoring without using a single line of JavaScript.
👇 Copy Code:
<!DOCTYPE html>
<style>
body{background:#000;margin:0;height:100vh;display:flex;align-items:center;justify-content:center}
.radar{
width:200px;height:200px;border:2px solid #0f0;border-radius:50%;
position:relative;background:radial-gradient(transparent 60%, rgba(0,255,0,0.1) 100%);
box-shadow:0 0 20px rgba(0,255,0,0.2)
}
/* Grid Lines */
.radar::before{content:'';position:absolute;top:50%;left:0;width:100%;height:1px;background:#0f0}
.radar::after{content:'';position:absolute;left:50%;top:0;height:100%;width:1px;background:#0f0}
/* Scanning Beam */
.beam{
width:100%;height:100%;border-radius:50%;
background:conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(0,255,0,0.5) 360deg);
animation:spin 2s linear infinite
}
/* Center Dot */
.dot{
width:6px;height:6px;background:#0f0;border-radius:50%;
position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
box-shadow:0 0 10px #0f0
}
@keyframes spin{100%{transform:rotate(360deg)}}
</style>
<div class="radar">
<div class="beam"></div>
<div class="dot"></div>
</div>
#CSS #Animation #Dashboard #UI #Snippet
CodePen Blog
Chris’ Corner: All Together Now
Individual fresh CSS features can be amazing, but I always say it’s the most impressive when they go together. Adam Argyle knocked one out of the park with his modestly named Nice Select post & demo. His own post lists all the CSS features that went into it, but I’ll do a quick overview. https://blog.codepen.io/wp-content/uploads/2026/02/nice-selects-1024x494.avif * The core of it is these are “Custom Selects” meaning a native element with
* The opened menu is positioned with anchor positioning and have great edge-detection fallbacks.
* The menus animate both opening and closing thanks to
* The scrolling menus have slightly customized scrollbar styles and a subtle animation where the fade in from the edges via a
* Logical properties, color schemes, and user preferences are used so users needs are taken into account.
* The headers within the menus are sticky with custom styling when stuck.
And honestly, a whole bunch more. Perhaps on their own, each of these features is like hey, that’s kinda neat, but when you start looking at all these CSS improvements combined, you can see how wildly powerful CSS has become. You might say CSS has become a much more intelligent language.
What do we still want from CSS? It’s getting harder to think of entirely fresh features that don’t have any thought put into them at all yet. For instance, Nathan Knowler’s 2026 CSS Wishlist is all stuff that is either here or coming already, and the wish is how they turn CSS into a more cohesive system. Me, I still really want
Ya know how there used to be lists and roundups and stuff that were like “Stuff you don’t need JavaScript for anymore!!!!!”? I love those, obviously, but I feel like we don’t see them quite as much anymore because HTML and CSS have damn near got it covered now. Like if you absolutely need JavaScript for something, it’s like, yes, that’s JavaScript territory. It’s not for things that we’re only leaning on JavaScript for because of it’s power to measure things or detect visibility or handle events. We’ve gotten the heart of those things in CSS now.
Just a few of those as a taste…
* Una Kravets: Follow-the-leader pattern with CSS anchor positioning. A Table of Contents menu that knows exactly which sections are currently visible and can be styled as such? With no JavaScript at all? Amazing.
* Bramus Van Damme: Solved by CSS Scroll State Queries: hide a header when scrolling down, show it again when scrolling up. With no JavaScript at all? Get outta here.
* Una (again) also explains this in Directional CSS with scroll-state(scrolled). It’s so simple. No JavaScript.
* Ahmad Shadeed: Use Cases for Field Sizing. Form fields like and > that grow in size based on the contents they contain, with whatever constraints you want? With No JavaScript at all? Ship it.
It’s almost like CSS is evolving specifically to do things we once needed JavaScript for.
Chris’ Corner: All Together Now
Individual fresh CSS features can be amazing, but I always say it’s the most impressive when they go together. Adam Argyle knocked one out of the park with his modestly named Nice Select post & demo. His own post lists all the CSS features that went into it, but I’ll do a quick overview. https://blog.codepen.io/wp-content/uploads/2026/02/nice-selects-1024x494.avif * The core of it is these are “Custom Selects” meaning a native element with
appearance: base-select applied. That unlocks the ability to essentially style any part of it any way you want. (By the way, multi-selects are very close now too.)* The opened menu is positioned with anchor positioning and have great edge-detection fallbacks.
* The menus animate both opening and closing thanks to
@starting-style and allow-discrete transitions. * The scrolling menus have slightly customized scrollbar styles and a subtle animation where the fade in from the edges via a
view() style scroll-driven animation. * Logical properties, color schemes, and user preferences are used so users needs are taken into account.
* The headers within the menus are sticky with custom styling when stuck.
And honestly, a whole bunch more. Perhaps on their own, each of these features is like hey, that’s kinda neat, but when you start looking at all these CSS improvements combined, you can see how wildly powerful CSS has become. You might say CSS has become a much more intelligent language.
What do we still want from CSS? It’s getting harder to think of entirely fresh features that don’t have any thought put into them at all yet. For instance, Nathan Knowler’s 2026 CSS Wishlist is all stuff that is either here or coming already, and the wish is how they turn CSS into a more cohesive system. Me, I still really want
margin-trim supported everywhere, and my 2023 list still had some stuff I’d take. Oh, and I’d take like ::before-end / ::before-begin / ::after-end / ::after-begin so we’d have both more and more-placeable pseudo elements that mimics insertAdjacentHTML. Or infinite.Ya know how there used to be lists and roundups and stuff that were like “Stuff you don’t need JavaScript for anymore!!!!!”? I love those, obviously, but I feel like we don’t see them quite as much anymore because HTML and CSS have damn near got it covered now. Like if you absolutely need JavaScript for something, it’s like, yes, that’s JavaScript territory. It’s not for things that we’re only leaning on JavaScript for because of it’s power to measure things or detect visibility or handle events. We’ve gotten the heart of those things in CSS now.
Just a few of those as a taste…
* Una Kravets: Follow-the-leader pattern with CSS anchor positioning. A Table of Contents menu that knows exactly which sections are currently visible and can be styled as such? With no JavaScript at all? Amazing.
* Bramus Van Damme: Solved by CSS Scroll State Queries: hide a header when scrolling down, show it again when scrolling up. With no JavaScript at all? Get outta here.
* Una (again) also explains this in Directional CSS with scroll-state(scrolled). It’s so simple. No JavaScript.
* Ahmad Shadeed: Use Cases for Field Sizing. Form fields like and > that grow in size based on the contents they contain, with whatever constraints you want? With No JavaScript at all? Ship it.
It’s almost like CSS is evolving specifically to do things we once needed JavaScript for.
CodePen
Chris’ Corner: All Together Now
Individual fresh CSS features can be amazing, but I always say it’s the most impressive when they go together. Adam Argyle knocked one out of the park with his modestly named Nice Select post…
🚀 Free Platforms to Host Your Coding Projects
1️⃣ GitHub Pages
👉 Best for simple static websites & portfolios
2️⃣ Heroku
👉 Easy backend + app deployment
3️⃣ Firebase Hosting
👉 Fast, secure, great for web apps
4️⃣ Vercel ⭐
👉 My current favorite
👉 Free analytics (limited)
👉 Next.js works insanely well
5️⃣ Netlify
👉 Simple deploy for frontend projects
💬 Which one do you use for hosting?
🔥 Bonus Guide:
A Complete Guide to Hosting a Project/Website for Free using Netlify (Easiest Way)
👉 Read here:
https://www.codewithrandom.com/2025/02/04/host-website-in-free-netlify/
💡 React to this message to get more useful dev content 👇
❤️ Thanks for being here!
1️⃣ GitHub Pages
👉 Best for simple static websites & portfolios
2️⃣ Heroku
👉 Easy backend + app deployment
3️⃣ Firebase Hosting
👉 Fast, secure, great for web apps
4️⃣ Vercel ⭐
👉 My current favorite
👉 Free analytics (limited)
👉 Next.js works insanely well
5️⃣ Netlify
👉 Simple deploy for frontend projects
💬 Which one do you use for hosting?
🔥 Bonus Guide:
A Complete Guide to Hosting a Project/Website for Free using Netlify (Easiest Way)
👉 Read here:
https://www.codewithrandom.com/2025/02/04/host-website-in-free-netlify/
💡 React to this message to get more useful dev content 👇
❤️ Thanks for being here!
Which unusual HTML tag sounds like food but is used for pronunciation annotations in East Asian typography?
Anonymous Quiz
22%
<menu>
44%
<peach>
33%
<ruby>
❤2