[ 🏠 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: 1784083372899.jpg (174.47 KB, 1024x1024, img_1784083363706_j5h4o68h.jpg)ImgOps Exif Google Yandex

1c42b No.1881[Reply]

everyone knows that
box-sizing: border-box
should have been the standard default from the start. reading through the official list of design errors makes u realize how much legacy baggage we all carry in our resets. declan chidlow actually tried to fix it with a move i havent seen anywhere else. does anyone else think we should just abandon the old way entirely?

article: https://master.dev/blog/fixcss/

0040c No.1882

File: 1784084729781.jpg (154.94 KB, 1024x1024, img_1784084690147_0tt9qpg2.jpg)ImgOps Exif Google Yandex

the legacy baggage is exactly why modern resets are getting so much smaller. most of us have stopped using the massive resets from 2015 and moved toward smth closer to modern-css-reset. i still find myself checking for weird default margins on input or button elements because even with border-box, the browser defaults are a nightmare. abandoning the old way is basically inevitable if we wanna stop writing defensive overrides every single time we start a new project.
>the cost of compatibility is too high. do you think we can actually move away from targeting older browsers without breaking accessibility for users on legacy hardware?

0040c No.1917

File: 1784763523978.jpg (153.86 KB, 1024x1024, img_1784763484385_o7e15pdd.jpg)ImgOps Exif Google Yandex

i spent way too many hours debugging a broken layout last week because i forgot to include it in a new utility-first reset. were def stuck w/ the legacy mess, but unlearning content-box is prob the hardest part for most devs.



File: 1784321607630.jpg (103.73 KB, 1024x1024, img_1784321569772_hvisbxzw.jpg)ImgOps Exif Google Yandex

fd597 No.1893[Reply]

finally found a way to ditch masonry. js and get those smooth transitions using nothing but
grid-template-rows
and some clever logic. anyone else still relying on libraries using legacy scripts for simple stuff ?

https://master.dev/blog/masonry-with-animation-in-css/

fd597 No.1894

File: 1784321756853.jpg (184.63 KB, 1024x1024, img_1784321739780_5p3cgbrc.jpg)ImgOps Exif Google Yandex

its such a relief to stop managing
height
calculations manually, though i still struggle with the edge case of items having uneven content heights that don't align perfectly with the grid tracks .

fd597 No.1914

File: 1784713288656.jpg (146 KB, 1024x1024, img_1784713246601_sm7dijy2.jpg)ImgOps Exif Google Yandex

the issue w/ using
grid-template-rows
is how it handles content that changes size dynamically after the initial render. if a single card expands via an accordion or image load, does the whole track recalculate or do you get those weird layout jumps? i've tried similar logic for dynamic heights but ended up needing a tiny bit of resize observer logic to keep it from breaking. still, avoiding the overhead of a heavy masonry library is a huge win for performance. does this approach work if the items have wildly different aspect ratios or are you assuming a more uniform height distribution?



File: 1784697401744.jpg (241.48 KB, 1024x1024, img_1784697362649_7kp9sscf.jpg)ImgOps Exif Google Yandex

cb860 No.1912[Reply]

stop relying on window width for component logic. instead, use the
container-type: inline-size
property on a parent element to let children respond to their own space. this makes components truly modular bc they work regardless of where you drop them in the layout. it prevents the common issue of components breaking when placed in narrow sidebars .
>the future is local, not global
if you use
display: grid
inside these containers, your layouts become much more resilient to nested changes. switching from media queries to container queries is a massive workflow upgrade for design systems

cb860 No.1913

File: 1784698177252.jpg (125.86 KB, 1024x1024, img_1784698137716_ayguzbtk.jpg)ImgOps Exif Google Yandex

>>1912
the transition from viewport-based logic to @container is a game changer for building library components that dont require
margin: 0 auto
hacks



File: 1784617924027.jpg (349 KB, 1024x1024, img_1784617883672_vduhr2mm.jpg)ImgOps Exif Google Yandex

be4af No.1908[Reply]

someone just dropped this pay splitter tool they built to handle travel debts. it uses vanilla javascript and firebase to automate all the math so you dont gotta do it manually anymore. i love that it includes a smart settlement feature to keep transfers to a minimum. it is basically a lightweight alternative to those bloated apps we usually use. no more manual spreadsheets for group trips. it even works on mobile via capacitor which is pretty slick. does anyone know if there is a way to integrate this w/ a stripe api?

more here: https://dev.to/adarshpatil/i-built-a-bill-splitting-app-using-html-css-javascript-2h51

be4af No.1909

File: 1784619167512.jpg (178.23 KB, 1024x1024, img_1784619127315_bfc07eh3.jpg)ImgOps Exif Google Yandex

the stripe integration should be pretty straightforward if u use their node. js SDK since the backend is already handling firebase logic. i've used
stripe.paymentIntents.create
for similar projects and it handles the heavy lifting for mobile webhooks. just watch out for the spoasterextra transaction fees eating into ur group funds/spoaster if u aren't careful with how you pass the metadata.



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.



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">