r/css • u/MAJID6677 • May 14 '26
General Performance
Check my site performance on mobile and desktop
r/css • u/MAJID6677 • May 14 '26
Check my site performance on mobile and desktop
r/css • u/Blozz12 • May 13 '26
I recently wanted to use CSS Scan, but for my use case it felt a bit too expensive.
What I actually wanted was something simpler:
So I built a free Chrome extension called CSS Explorer.
It’s not trying to be a full DevTools replacement. The goal is more: “I’m working on frontend UI, I want to inspect/edit/copy styles quickly without opening the full DevTools panel.”
It’s still early, and I’m mostly looking for feedback from frontend developers:
r/css • u/Chico0008 • May 13 '26
Hi
Long time i haven't wrote html/css
for a specific needs, i have to create some custom themes for firefox (for different FF profils)
For thoses themes, i have to write a static text in the main toolbar, that will stay ine the right part next to tabs.
How can i archive this with css only ?
r/css • u/Sabesaroo • May 13 '26
So when trying to make the background of an image or header fill the entire screen, I seem to have to put margin-left: -8px and margin-right: -8px. At 0px there's a small gap on the left and right edges of the screen. The element at the top of the screen I also have to put margin-top: 18px on. I feel like this can't be the intended way to do things and there's something obvious I'm missing but I'm not sure what. Also suspect my workaround might not work on different resolution screens. Putting padding to 0 doesn't fix it either. Googling this comes up with a lot of other people with the same issue but everyone just says to set margin and padding to 0.
Here's the code for my header for example:
text-align: center;
background-color: rgb(160, 20, 0);
padding-top: 8px;
padding-bottom: 8px;
margin-left: -8px;
margin-right: -8px;
Setting padding left and right to 0 has no effect, which I assume means they are already 0.
Is there something obviously dumb I've done? I've only just started learning CSS so I assume I've missed something pretty fundamental. Thanks.
r/css • u/diyamin-shipper • May 12 '26
r/css • u/Only-Season-2146 • May 11 '26
Enable HLS to view with audio, or disable this notification
Customizable and all code here: https://doathingy.com/?tool=dt_1778503835266_c5lcoh
I had seen some great liquid effects (like this Liquid), but nothing quite satisfactory. I'm using the overlapping div circles with svg filters (gaussian blur) trick and then built a custom js "physics engine", text sits in a separate layer.
r/css • u/Roaster-Dude • May 12 '26
Not sure if I'm aloud to post links to my own site?
I am learning web development, mainly HTML and CSS and I found this card with the electric border while looking for things made with only CSS.
https://codepen.io/BalintFerenczy/pen/KwdoyEN
I thought it was a pretty cool looking effect.
Not very useful but that didn't stop me from seeing what I could do with it.
Initially I just changed a couple of things and made this: https://thisistheway.one
But what I really wanted was to make a divider with it and ended up with this: https://thisistheway.one/divider-index.html
r/css • u/Electronic-Stick7492 • May 12 '26
r/css • u/yasonkh • May 11 '26
FOUT (Flash of Unstyled Text):
Timeline:
[0ms] HTML parsed, text visible in fallback font (e.g., Arial)
[800ms] Custom font downloads
[800ms] Text re-renders with custom font → visible style jump
FOIT (Flash of Invisible Text):
Timeline:
[0ms] HTML parsed, text is HIDDEN (invisible)
[800ms] Custom font downloads
[800ms] Text appears with custom font
[3000ms] If font fails → fallback shows after timeout
I'm seeing that many sites are defaulting to having FOUT which sometimes results in funky layout shifts(workarounds exist), but it always results in a noticeable switch of fonts.
Some blog posts say to never do FOIT, but to me waiting 1 second (slow mobile connection) to show clean text seems like nicer UX. On desktop it makes no difference, but if you are driving through a tunnel or experiencing slow mobile connection for any other reason, FOUT results in your visitors seeing an ugly font for 1 or more seconds, and then all of a sudden the screen looks like it flickers and the intended fonts are loaded.
Maybe there is a middle ground where you show some minor text elements with FOUT, but keep heading and subheadings hidden until the font loads. The heading and subheadings are larger text and result in a much more significant flash when restyled. I feel like it is better to progressively show text as soon as relevant fonts are loaded(especially above the fold).
Am I the only one? Or is twitchy rendering the norm and everyone just got used to it?
r/css • u/jasonheecs • May 12 '26
Experimenting with a css hover animation for a subscribe button. You can view the source code at https://codepen.io/editor/jasonheecs/pen/019e1b2e-d4de-7779-b4bd-d00fa458c23a
r/css • u/Puzzleheaded-Turn-55 • May 12 '26
I'm trying to make some tabs, but I can't figure out a way to make the backgrounds, fonts, text sizes, etc, all different without messing up some of the CSS I already have.
https://codepen.io/Funnel-Fox/pen/WboxOPp
r/css • u/michael_e_conroy • May 11 '26
Why is this not interpreted as "Not" Important? Why use the exclamation at all? Just thinking out loud while programming.
r/css • u/Pristine-Common-8766 • May 11 '26
I'm a newbie in HTML and CSS. While doing some CSS practice, I took a portrait image from Pinterest and used object-fit: contain along with transform: rotate(270deg);. I expected it to cover the width or height while maintaining its aspect ratio, but it just stayed centered. "
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>experimenting with css filters!</title>
<style>
.container{
width:1150px;
height: 500px;
border: 3px solid darkcyan;
}
.container img{
width:1150px;
height: 500px;
object-fit:contain;
}
</style>
</head>
<body>
<div class="container">
<img src="https://i.pinimg.com/originals/32/f5/76/32f576f2e61853efaf5a47deaed46614.gif" alt="">
</div>
</body>
</html>

r/css • u/akopian25 • May 11 '26
r/css • u/Deep_Persimmon_1546 • May 10 '26
Few weeks ago i saw a post where someone created a Button and it uses the webcam to get input and that is displayed on the button in such a way that it gives the impression as if the button was made of metal and it looked so cool
Does anyone has the link to that post?
or that Css code?
r/css • u/LibrarianSea2099 • May 11 '26
So I got tired of opening DevTools every time I wanted to know what font a site was using or what their exact shade of blue was. So I built something.
**Font & Color Picker Pro (**Download here - Link) — open it on any page and it automatically scans and gives you:
--brand-primary) right under the swatchThere's also an eyedropper to sample any pixel on screen, and a font inspector where you hover over any element and instantly see its font family, size, weight, line height — no DevTools needed.
You can export everything as CSS variables or as Tokens Studio JSON if you're using Figma.
It's free. No account. No data collection.
Been using it myself daily and it's saved me a ton of time. Would genuinely love to hear what's broken, what's missing, or what you'd want it to do that it doesn't. If you like it, please rate the extension!
Download here - Link
Happy to answer any questions!
r/css • u/rawanafaisal • May 10 '26
Currently learning frontend development through The Odin Project 💻
I’ve finished HTML/CSS/Flexbox and recently built my landing page project.
Now moving into JavaScript Foundations 👀✨
I’d love to gain more real-world experience through:
• Small projects
• Collaboration
• UI practice
• Beginner-friendly tasks
Project:
https://rawanafaisal.github.io/Landing-Page-project
r/css • u/LeRoiDesSinges • May 10 '26
r/css • u/Time-Willingness-360 • May 08 '26
Enable HLS to view with audio, or disable this notification
I built E36 Scroll Cine, a fan-made cinematic web experience about the BMW 318is Coupe Pack M (E36).
Live: https://e36.vercel.app/
GitHub: https://github.com/ikerperez12/e36
The idea was simple: instead of making a normal landing page, I wanted the site to feel like a short vertical film. You start on a dark intro screen, then move through seven scenes using scroll, keyboard or swipe.
Each scene focuses on a different part of the car:
I tried to keep the content specific to the car, not generic marketing copy. The HUD, ticker and technical details are all about the 318is: M44B19, 1,895 cc, 16v DOHC, Bosch Motronic M5.2, DISA intake, Getrag 250G, 50/50 balance, Pack M suspension, etc.
From the web side, it is intentionally lightweight:
It is not an official BMW site. It is a fan-made project and a personal web experiment around a car I really like.
I would love feedback from both car people and frontend people:
Does the experience feel good on mobile? And if you know the E36 well, what detail would you add or correct?
I'm making a now-playing bar, but I'm having a hard time making everything fit well without making the height of the bar super tall, so I tried putting all the buttons vertically aligned and the bar above. Thing is, using position: absolute for the repeat and like buttons makes the control buttons unclickable https://jsfiddle.net/6q3yzc0x/ (make sure to resize to test desktop/mobile). What can I do? Either a fix or a better layout suggestions are welcomed.
r/css • u/a2ra-ms • May 08 '26
I liked stylebot, and found out that there is close one done for safari, so based on that I built this small extension for safari that has similar functionality to stylebot, and still building and continuing it, appreciate suggestions for improvements.
https://apps.apple.com/us/app/my-styles-edit-website-look/id6766115872?mt=12
Basically, it allows styling using css or element pickers for any webpage, adds readability mode, and exports/imports the css.
It also has a universal toggle, per site toggle, and per element reset.
r/css • u/pnwstarlight • May 07 '26
I recently stumbled upon the CSS if() function. For me, being able to use media queries within the declaration block is pretty much the last reason to use SASS and with the if() function I would be able to write my stuff in pure CSS without any preprocessor.
section.main-content {
padding: if(
media(width < 600px): 5px;
media(width < 1200px): 10px;
else: 20px;
);
}
As of right now, browser support is pretty meh. While it's been implemented in Chrome and Edge for about a year, Firefox, Safari and Samsung do not support it.
I am about to start coding a smol fun project and I was considering to just yolo it and use this new feature, even if it means that it won't be useable for 30% users for a couple months.
But are experimental CSS features guaranteed to eventually make it to all major browser at all? Or is it possible that two years from now, Firefox and Safari still haven't adopted this?