Profile avatar
mayank.co
design engineer and tinkerer. usually writing CSS or listening to prog (or both). they/them
443 posts 3,563 followers 403 following
Regular Contributor
Active Commenter
comment in response to post
i've seen some build tools do "hoisting" of nested dependencies. basically every dependency (recursive) gets imported as a side-effect import at the top of the script, even if it's not directly used by the main scripts. (haven't measured perf impact myself)
comment in response to post
that's a good point, i might move or duplicate this part. in practice i often have "sub layers" which have lower priority anyway, so i don't find myself needing this specificity hack very often.
comment in response to post
another blog post from Sara? 👀
comment in response to post
see adrianroselli.com/2025/05/do-n...
comment in response to post
don't forget the aria-label on the static div "is this accessibility? 🦋"
comment in response to post
even for those highly interactive use cases, i find Astro to be one of the better options. it gives you a refreshing level of control and makes it simple to do the "right thing"
comment in response to post
never forget
comment in response to post
a tooltip appears when you hover or focus but not when you tap
comment in response to post
i assume by "component libraries" you mean UI rendering libraries/frameworks. Svelte has approached element-level transitions with "directives" (fancy attributes). svelte.dev/tutorial/sve... for page-level view transitions, their app framework has an imperative "hook": svelte.dev/blog/view-tr...
comment in response to post
on the <body>
comment in response to post
it's a double filter. invert + hue-rotate
comment in response to post
right? it's like a breath of fresh air when the status quo is seven layers of build tooling
comment in response to post
TIL you can use the entire plugin API from the dev tools console within Figma. and it's encouraged! www.youtube.com/watch?v=HO4f...
comment in response to post
the association is not the problem, i'm talking about the invalid nesting. you can't put a random menu inside a toolbar, for example. among other issues, the keyboard behaviors of these two patterns will start conflicting.
comment in response to post
yes! but portals are still somewhat necessary, particularly when the floating element can't be easily placed next to the trigger element due to accessibility structure (e.g. a "toolbar" can contain the button but not the associated dropdown/popover)
comment in response to post
i want to believe in Server Components but the build tools leave a lot to be desired
comment in response to post
i think it makes sense to use <html> for global stuff. some properties get automatically propagated from <body> to <html> for legacy reasons, while other properties (like `line-height`) will get inherited. i'm still trying to understand the impact and what this means for user prefs/styles.
comment in response to post
can floating-ui be completely replaced by anchor positioning? that would be huge!
comment in response to post
i remember @cobrawinfrey.dev making one 👀
comment in response to post
it makes so little sense when you consider that npm comes bundled with node now you need to: 1. install a node version manager 2. install the correct node version 3. install a package manager manager 4. install the correct package manager 5. install dependencies this could all have been 1 step
comment in response to post
you can animate the unanimatable with view transitions. it just takes snapshots of the before/after states.
comment in response to post
this is where i might use view transitions? i assume you need JS for changing the position-anchor anyway
comment in response to post
you're too kind! (just don't look at my code 🫣)
comment in response to post
your outie force pushes to main
comment in response to post
native import map support is pretty cool 👀 any chance the ids are customizable? i would love to have ids matching the directory structure where possible
comment in response to post
this is going to be a paradigm shift for many reasons, but one that i'm excited about is that it reduces code duplication. with something like Sass, all the code is still duplicated after compilation. this can really can add up for a large site.
comment in response to post
oh yes, i double click all over the place also repeatedly hitting cmd+` on mac to switch between windows as i'm thinking
comment in response to post
this matches the browser's order of execution
comment in response to post
ooh i missed this. added to wishlist!
comment in response to post
yeah, i would hope so, at least for implicit `@scope`. i wanted to caveat what i said above with "this is for styles in general. implicit @scope might have some optimizations". but character limit 🫠
comment in response to post
the contents do matter, but i was talking about the frequency of updates. each time you insert a style tag on client, the browser will have to recalculate those styles against _everything_ on the page. there's a lot of factors involved though. always good to measure when doing something different
comment in response to post
it should be fine if you're not rendering lots of style tags on the client. whenever a new stylesheet is inserted, it can trigger expensive recalcs
comment in response to post
it's a cashews kinda day for me
comment in response to post
last one for 2024, this is one of the best albums of the year seeyouspacecowboy.bandcamp.com/album/coup-d...
comment in response to post
sure! breakout is how i got into software development i think. it was one of my first projects that i completed, i built it in C and then ported it over to Java. would love to see a web version of it