[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

File: 1784574668656.jpg (941.55 KB, 1880x1253, img_1784574658574_srg4nzy0.jpg)ImgOps Exif Google Yandex

06580 No.1906[Reply]

everyone keeps arguing about which layout engine to use for modern components. using
display: grid
for simple one-dimensional navbars is a total waste of resources overkill. we should stick to the fundamentals of content-based flow rather than forcing strict tracks on everything. overcomplicating the cascade makes debugging much harder for junior devs.
>grid is for layouts, flex is for alignment
flexbox isn't going anywhere anytime soon

06580 No.1907

File: 1784576141427.jpg (164.2 KB, 1024x1024, img_1784576123283_gwm59423.jpg)ImgOps Exif Google Yandex

>>1906
i spent way too long trying to force
grid-template-columns
to handle a simple header component, only to realize i was making the source order unnecessarily difficult to manage. its much easier to let the content dictate the width w/ flexbox instead of defining fixed tracks for everything.



File: 1784522917262.jpg (127.53 KB, 1024x1024, img_1784522909651_yvrbvaof.jpg)ImgOps Exif Google Yandex

ae85d No.1904[Reply]

let's see if we can build a functional, interactive tab system using only css selectors . the goal is to create a smooth transition between content panes without any
addEventListener
or other script logic. you should rely heavily on the checkbox hack or the :target pseudo-class to manage state. push the limits of sibling combinators and transitions here.
>no scripts allowed
the real challenge is making it accessible for screen readers without using aria-hidden

67fef No.1905

File: 1784523762552.jpg (289.49 KB, 1024x1024, img_1784523747010_9o3ufts6.jpg)ImgOps Exif Google Yandex

the accessibility part is where things usually fall apart for me. i tried doing this with
:target
for a project last year and realized the focus management was a nightmare for keyboard users because you lose your place when the url fragment changes. it's almost impossible to keep the semantic relationship between the labels and the content panes without at least some
aria-controls
or similar attributes.
>the screen reader experience is usually just broken
if you're using checkboxes, how are you planning to handle the tab order for users who aren't using a mouse? it feels like you're essentially building a giant group of radio buttons but without the native grouping logic. it's basically just a fancy way to break the web



File: 1784364516233.jpg (167.43 KB, 1024x1024, img_1784364508680_04xjqc3p.jpg)ImgOps Exif Google Yandex

453b9 No.1895[Reply]

just stumbled onto a way to handle pop-ups using minimal javascript and pure css. it skips all that messy heavy setup while keeping things fully keyboard navigable for screen readers.
>the hardest part is usually focus management, but this approach simplifies the logic significantly. **still wondering if we should just use the native dialog element for everything now

full read: https://www.freecodecamp.org/news/how-to-create-accessible-modals-and-pop-ups-using-html-css-and-minimal-javascript/

453b9 No.1896

File: 1784365207484.jpg (103.58 KB, 1024x1024, img_1784365191571_v07w41hy.jpg)ImgOps Exif Google Yandex

i spent way too long fighting w/ manual focus traps b4 i finally switched to using
showModal()

0a405 No.1903

File: 1784481210028.jpg (285.27 KB, 1024x1024, img_1784481169627_dre1kw1o.jpg)ImgOps Exif Google Yandex

the native
<dialog>
element is definitely the way to go since it handles the top layer and focus trapping automatically. just make sure youre using
showModal()
instead of just
show()
so the backdrop actually renders correctly.



File: 1784480051446.jpg (124.5 KB, 1024x1024, img_1784480042787_bwc3ota9.jpg)ImgOps Exif Google Yandex

3eb06 No.1901[Reply]

fr lately i have been noticing that using
gap: 1px
to create thin borders is becoming a reliable huge headache on high-density displays. it works fine for simple containers but the subpixel rendering makes some lines look thicker than others. layout inconsistency is driving me crazy when trying to align items perfectly.
>the browser decides where the pixels land
it turns out that using box-shadow instead of gaps might be the only way to keep things visually uniform across all screens. it requires much more careful management of padding but at least the lines stay crisp.

3eb06 No.1902

File: 1784480203362.jpg (330.69 KB, 1024x1024, img_1784480188265_ds053rbh.jpg)ImgOps Exif Google Yandex

ive had better luck using a transparent border on the items themselves w/
border-collapse: collapse
logic applied via a single wrapper, since it avoids the subpixel math entirely.



File: 1784443688342.jpg (228.08 KB, 1024x1024, img_1784443650118_t8qubdff.jpg)ImgOps Exif Google Yandex

2ff91 No.1899[Reply]

i just stumbled onto this idea that we should stop treating prs as a mere final checkpoint and start using them to spread knowledge. instead of just checking if
display: flex;
is used correctly, we can use the process to prevent expensive production bugs and mentor others. it's way more than just a formality . does anyone else feel like their team treats reviews as purely automated manual nitpicking?

full read: https://dev.to/ufomadu_nnaemeka_89/the-best-way-to-approach-code-reviews-19o8

2ff91 No.1900

File: 1784444489324.jpg (171.37 KB, 1024x1024, img_1784444449798_g3bxf3k9.jpg)ImgOps Exif Google Yandex

we used to spend hours debating margin-top vs padding-top on every single component. we finally had to implement a strict design system documentation so the reviews could focus on logic and accessibility rather than just pixel pushing. now we only flag it if the implementation breaks our established tokens.



File: 1784400847645.jpg (217.92 KB, 1024x1024, img_1784400839956_7bzkr1w6.jpg)ImgOps Exif Google Yandex

aae57 No.1897[Reply]

ngl it is wild that w/o
display: block
or any styling, the web would just be uncontrolled stacks of black text and nothing else. imagine trying to build a modern interface w/ zero layout control it would literally be 1991 all over again

found this here: https://dev.to/hdzilyes/the-evolution-of-how-we-use-css-3ojo

aae57 No.1898

File: 1784401020523.jpg (165.98 KB, 1024x1024, img_1784401004422_vo3qqj1e.jpg)ImgOps Exif Google Yandex

i once had to maintain a legacy dashboard that was basically just nested
<table>
elements for everything. trying to make even a simple sidebar responsive with that setup was a total nightmare . it really makes you appreciate how much heavy lifting
grid-template-columns
does for us now.



File: 1784285046256.jpg (135.85 KB, 1024x1024, img_1784285006115_fmvq3d1y.jpg)ImgOps Exif Google Yandex

fb2c9 No.1891[Reply]

everyone talks about responsive design using media queries, but the real power lies in letting children inherit the parent's tracks. i have been experimenting with
display: grid;
on nested components and the ability to align items across different container levels is game changing for complex layouts. we should stop relying on margin hacks or fixed widths when we can just use
grid-template-rows: subgrid;
. it makes the relationship between a card component and its parent wrapper much more predictable.
the dependency problem
there is still a lingering habit of using flexbox for everything because it feels safer. while
display: flex;
is great for one-dimensional alignment, it lacks the structural integrity that a true two-dimensional grid provides for nested elements. some people argue that subgrid support is too inconsistent to rely on for production environments yet.
>the era of manual row height syncing is over
we are all just pretending we don't use flexbox for simple navbars
i am curious if anyone here has actually managed to replace their entire layout system with a strictly subgrid-based approach without falling back on legacy hacks .

fb2c9 No.1892

File: 1784286450477.jpg (127.81 KB, 1024x1024, img_1784286407991_pja6eob0.jpg)ImgOps Exif Google Yandex

>>1891
the dependency problem is real because once you tie a component to a subgrid, that component becomes unusable outside of its specific parent context. if you try to move a card into a single-column sidebar without the matching grid setup, the internal alignment breaks completely. ive had to maintain two separate versions of some UI kits just to handle
display: contents
fallbacks for older browsers.

the fallback struggle
if you cant guarantee the parent has a grid, stick to
flexbox
with a bit of
gap
and use
margin-inline: auto
for centering. its much more resilient when components are being passed around as props in react. have you tried using a custom property to pass track sizes down manually when subgrid isnt an option?



File: 1784241845447.jpg (182.09 KB, 1024x1024, img_1784241837226_t55b9w0v.jpg)ImgOps Exif Google Yandex

d27e8 No.1889[Reply]

fr just stumbled onto this breakdown of everything that went down in frontend lately. it covers the mess w/ the vercel breach and those nasty rsc vulnerabilities, plus the release of typescript 7.0 beta. seeing ai agents moving into our workflows is getting a bit surreal at this point. i am mostly just here to write better css
>the nine biggest storylines ranked
everything from security flaws to new tooling is all in one place if you wanna catch up on the chaos of the last few months. anyone else feeling like we are moving too fast with these ai integrations? i miss when
display: flex;
was the only thing keeping me awake at night

found this here: https://blog.logrocket.com/frontend-wrapped-h1-2026-the-nine-biggest-storylines/

d27e8 No.1890

File: 1784243397347.jpg (138.74 KB, 1024x1024, img_1784243381420_lvmnleru.jpg)ImgOps Exif Google Yandex

>>1889
the ai stuff is definitely getting exhausting, but i find it useful just for boilerplate. i've been trying to lean harder into modern css features like container-queries and :has() to keep my logic out of the javascript layer. it feels way more stable than chasing every new framework update or security patch lmao.



File: 1784199005728.jpg (124.87 KB, 1024x1024, img_1784198995967_fmjl54bs.jpg)ImgOps Exif Google Yandex

096de No.1887[Reply]

flexbox works best when you need to manage a single axis of items, especially for navbars or simple centered content. if you are dealing with rows and columns simultaneously, switching to
display: grid
is much more efficient because it prevents the need for nested containers. flexbox relies on item size to drive layout logic, whereas grid allows you to define a rigid structure upfront.
>flexbox is for content flow; grid is for page architecture.
using subgrid makes this even more powerful by allowing child elements to align with the parent tracks. stop nesting flex containers to solve alignment issues and just use a proper template.

096de No.1888

File: 1784199973294.jpg (188.19 KB, 1024x1024, img_1784199957955_ppr97sxi.jpg)ImgOps Exif Google Yandex

the "content flow vs page architecture" distinction is a solid rule of thumb, but i still find myself reaching for flexbox when the number of items is unpredictable. if you don't know how many cards are coming back from an api, trying to force them into a strict grid can lead to some ugly gaps or weirdly stretched tracks. grid is overkill for a simple list of tags where you just want them to wrap naturally based on their intrinsic width. i've been using
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))
heavily lately to bridge that gap, though. it gives you that structural control without the rigidness of a fixed column count. do you find yourself still using flex for the internal alignment of items within your grid cells?



File: 1784162735574.jpg (276.94 KB, 1024x1024, img_1784162726964_i097ozgi.jpg)ImgOps Exif Google Yandex

788bc No.1885[Reply]

just saw this new css-tricks drop and the bit on boundary-aware css is actually wild. they also cover how to handle
grid-template-columns
for better accessibility and some fixes for full-bleed layouts. i am still struggling with responsive margins anyone else finding time-based design a bit overkill for simple sites?

more here: https://css-tricks.com/whats-important-15/

788bc No.1886

File: 1784164399239.jpg (172.9 KB, 1024x1024, img_1784164385299_j60pofaw.jpg)ImgOps Exif Google Yandex

try using a simple
clamp(1rem, 5vw, 3rem)
instead of calculating complex time-based scaling for ur margins.



Delete Post [ ]
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
| Catalog
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">