nathansmith, to CSS
@nathansmith@hachyderm.io avatar

🔥 CSS hot take: I'm beginning to think any design system that defines style values via anything other than CSS variables — ex: Sass, JavaScript, TypeScript — is essentially doing it wrong.

I am of the opinion that publishing a standalone file with all the CSS variables used in a project is probably the most widely compatible future-facing approach.

#css #designsystems #usetheplatform

https://www.freecodecamp.org/news/what-are-css-variables-and-how-to-use-them/

tvler, (edited ) to random
@tvler@mastodon.social avatar

Introducing a new major feature for StreetPass: Hiding profiles!

Now you can hide and unhide profiles in your StreetPass list to keep things organized. If you wanna go full Inbox Zero mode, there's also an option to automatically hide profiles when clicked! (ty @prenagha for the great feature suggestion)

Available on all major browsers ❤️ https://streetpass.social

tvler,
@tvler@mastodon.social avatar

Also, the collapsible "Hidden" section is just a simple <details> element! No code is better than good code.

#usetheplatform

video/mp4

schizanon, to web
@schizanon@mas.to avatar

The has always had "Events"; like clicks and keydowns, but you couldn't create your own at first. So did what it does and invented hundreds of ways to create custom events; bindings, , , Streams, etc.

ReactJS "Hooks" are just another form of this; they are just callbacks that are executed at certain times in a component lifecycle.

Thing is; we have now! It's well supported since IE11 is gone.

https://caniuse.com/customevent

schizanon,
@schizanon@mas.to avatar

It doesn't have to be this way though! Look at all the events that #htmx can raise!

https://htmx.org/reference/#events

Any other #JavaScript can listen to these events, without using ANY htmx code at all! Just #webstandards based DOM APIs.

#useThePlatform #alwaysBetOnJavaScript

schizanon, (edited ) to webdev
@schizanon@mas.to avatar

> You can't get faster than No Build

"The state of the art is no longer in finding more sophisticated ways to build JavaScript or CSS. It's not to build at all. To lean on HTTP/2 and the now universal support for import maps to avoid bundling."

https://world.hey.com/dhh/you-can-t-get-faster-than-no-build-7a44131c

#webDev #javaScript #css #html #http #http2 #useThePlatform #struggleStack #react #vue #svelte #rails #rubyOnRails #ruby #typescript #web #webpack #bun #vite #npm #nodejs

fugueish, to random

Right-click and Open Image In New Tab is the greatest lightbox image viewer of all tiiiiiiimmmmmeeeeeee #UseThePlatform

julia, to rust

One thing I will say: Rust on the web is overkill. I know, it's tempting to have something like leptos and have a single language on both frontend and backend.

What you should be doing is using the web platform. Most work should be done on the server anyways, your front end code should only be used for progressive enhancement. The user shouldn't have to run JavaScript in order to use your site. Plain and simple.

#rustlang #usetheplatform #webdev #webdevelopment

aeischeid, to webdev
@aeischeid@mastodon.social avatar

Spent bit of time today replacing a React + Emotion ProgressBar <div> party with a #html <progress> element. #CSS for these is still a little tricky, definitely doable, but documentation seems somewhat lacking. My simple example.

https://codepen.io/aeischeid/pen/qBQVQmm

This was used inside of a table cells for a large many row MUI DataGrid so just getting the Emotion styles out of the cell render was a noticeable performance bump, but reducing nodes also helped probably.

#useThePlatform #webPerf

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • kavyap
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • ngwrru68w68
  • Youngstown
  • everett
  • slotface
  • rosin
  • ethstaker
  • Durango
  • GTA5RPClips
  • megavids
  • cubers
  • modclub
  • mdbf
  • khanakhh
  • vwfavf
  • osvaldo12
  • cisconetworking
  • tester
  • Leos
  • tacticalgear
  • anitta
  • normalnudes
  • JUstTest
  • All magazines