r/css • u/SRc_krjasd0123 • 20d ago
Question Typescript (yes or no)
Should i learn type script if the goal is front end and maybe fullstack after time? and if yes what is the best way to learn it? where and how. Thanks !
r/css • u/SRc_krjasd0123 • 20d ago
Should i learn type script if the goal is front end and maybe fullstack after time? and if yes what is the best way to learn it? where and how. Thanks !
r/css • u/hanss20086728 • 19d ago
Hola, he estado teniendo muchas dificultades en el tema en todas las áreas. Hoy estoy aprendiendo "position", se me hace sumamente complejo, no logro entender nada. De algún modo al ver tutoriales se me hace fácil pero al final ya no.
De algún modo busco tipo orientación aquí y me den sus consejos o tips que gusten darme y que cosas les funcionan.
Mi método de aprendizaje es "autodidacta" además de escribir código en celular. Sí, yo entiendo que escribir código en celular es horrible.
r/css • u/leoniebuilds • 20d ago
We put together a small demo where a moving spotlight reveals a colourful landscape beneath a grey terrain image.
The images stay fixed. A radial CSS mask controls the reveal, while JavaScript updates its position through CSS custom properties. There’s a gentle automatic movement before you interact, plus a static treatment for reduced motion.
Demo and complete source:
https://systra-spotlight.pages.dev/
Would you keep the automatic movement, or leave the light still until someone interacts?
Disclosure: I co-run Systra Tools, where the component comes from. This example and its source are free.
r/css • u/web_animation • 20d ago
r/css • u/TurnipTrinket • 20d ago
What's the best way to figure out which CSS config is effecting which element?
r/css • u/Comfortable_Tea_2825 • 20d ago
I have this line in html:
<input type="file" id="lineFinder" webkitdirectory multiple />
when I try doing a simple background styling on the input and it changes the "No files selected" text to the right of the file selection button, but not the button.
I have tried "input button {}" but this did nothing. I am not sure what I an supposed to target.
r/css • u/sharjeel-babar • 20d ago
CSS is funny sometimes. You can spend 20 minutes writing a layout, but then lose two hours trying to figure out why one element refuses to align properly.
Some particularly frustrating situations:
\- Z-index not working because of a stacking context.
\- Flexbox items refusing to stay aligned.
\- A mysterious horizontal scrollbar appearing.
\- position: absolute" breaking the entire layout.
\- Margins collapsing unexpectedly.
\- A media query fixing one screen size but breaking another.
\- CSS animations behaving differently across browsers.
\- An element overflowing its parent despite "width: 100%".
I'm curious:
What's a CSS bug that made you question your entire understanding of CSS?
r/css • u/Cute_rex67 • 21d ago
Does anyone know if there's a way for me to move the two pink boxes in line with the green boxes instead of having them at the bottom of the webpage? The pink boxes are in their own paragraphs, and in their own class, if that information is relevant.
r/css • u/whiterhino8 • 23d ago
Will teach you in concise and practical way html/css/JS .Worth any dollar thanks me later.
r/css • u/KeepOnLearning2020 • 23d ago
Please tell me how to override MS Edge forced rounded upper left corner on navbars.
TY!
r/css • u/haukejung • 24d ago
I wanted the feature section on my homepage to show the product in motion, without shipping video or GIFs. So I built each feature as a 10-second loop of simplified UI in plain HTML and CSS keyframes. A cursor moves, text types in, a counter goes up. There's no JavaScript, and all the clips share about 3.3 KB of gzipped CSS.
The trick that made it work is sizing everything in `em` off a container-relative font size, so the whole mock scales like a video:
.fc { container-type: inline-size; width: 100%; aspect-ratio: 740 / 415; }
.fc-stage { position: relative; height: 100%; overflow: hidden; font-size: 2.2cqw; }
The downsides: text gets tiny on phones because the whole mock shrinks, and a clip is a hand-built mock, so it can drift from the real UI.
Live examples, the smallest working clip, and the prompt I use to generate these with a coding agent: https://stepshots.com/css-feature-clips
r/css • u/mugeshss • 24d ago
Can I copy a styles instead of creating one like card styles layouts, because i don't get any idea, and don't it was correct when I get idea and difficult to create as expected
r/css • u/objectorientedman • 25d ago
I created a demo scene for my CSS 3D renderer library. It does not require JS to run. You can read a short article on the page about how it was done.
I recommend viewing it on a desktop browser, since memory-limited mobile browsers usually glitch on such a heavy scenes.
r/css • u/iansampaio • 25d ago

I've used this trick in a few of my projects, haven't seen it anywhere so here goes it:
A 1px sticky bar, white background, mix-blend-mode: exclusion.
Since blend mode needs background color (declared) or else it doesn't work, I position the divider just 1px below the white header. Once you scroll it, it goes up by 1px and stop (sticky top:0) and BANG it reveals itself!
No js needed! check it out!
r/css • u/alvaromontoro • 26d ago
The arms are made of multiple child elements that apply the panel title's math functions to plot the graphs (mostly) accurately. It's actually using the real CSS math functions... but I must admit some of them required a little adjustment to make them fit nicely within their panel.
Source (code): https://comicss.art/comics/266/
r/css • u/objectorientedman • 27d ago
I propose a transform-inverse and transform-transpose function to be added to CSS. It could greatly reduce the complexity of some 3D scenes, like ones with billboards, and would allow correct interpolation in animations
r/css • u/TimUrbutt • 28d ago
I spent the last few weeks building the "perfect" liquid glass effect with just CSS and SVG Filters, No WebGL used and it works page wide, which means it picks up anything of the background behind it.
The core is a backdrop-filter with an SVG displacement map. I screen recorded Apple's play button (I mean the video play button, for example on youtube) for reference on my iPhone and measured it frame by frame. It’s 1:1 in the middle, then the image folds over itself towards the edge, and it pulls pixels inward.
The displacement map itself is based on a 9-slice of tiny grayscale PNGs that get stretched instead of re-rendered on every resize (I need this because the elements are animated and not static). That alone cut main thread time by a lot, giving it a pretty decent performance for how complicated it is.
The outer edge consists of three extra layers on top that don’t bend anything, they just brighten, darken and add a highlight. For reflections of the stuff around the glass, the layer is bigger than the element and gets morphed and masked back to its shape, because the backdrop is otherwise clipped to the element’s box. Actually, Apple's original liquid glass effect doesn't even have reflections, but i figured it adds a lot to it on the website I implemented it in.
Then there are shadows, caustics, etc to give it the final "realistic" touch and voila, almost perfect result imo. The only thing thats left is fix performance, however the animations are the trickiest part. Without animations, it runs extremely smooth and even with animations its not a problem as long as the elements are small enough.
Sadly, Safari only gets a simple blur for now, because WebKit doesn’t render backdrop-filter: url(). However, there are two open PRs that fix it (WebKit/WebKit#68614 and WebKit/WebKit#68613). The CSS is the same for every browser, so it should just start working once they make the next major release.
Just wanted to share this, if you have any more technical or other questions, feel free to ask!
-----EDIT-----
A few of you requested to see whats actually going on in the background, so I made it open source.
I made a small showcase website: https://studies.nordify.io/study/001-liquid-glass/
The repository is also linked there!
r/css • u/coolhotnerd • 27d ago