revolutionary girl erin on Nostr: I have a small anecdote about the devaluation of CSS and the over valuation of ...
I have a small anecdote about the devaluation of CSS and the over valuation of JavaScript. Once long ago I was on a design system team which was closely connected to the design team. The design team unanimously concluded that the tab order needed to go in reverse on two buttons within a modal in the app.
An engineer from a product team took up the task and wrote a complex script to hijack presses of the tab key, and when focus was within a certain container, manually grab tab and change what is focused. It had many bugs. The engineer tossed more JavaScript at it. After three cycles, and a new dependency from NPM, a senior engineer blocked the PR and told the design team that such a thing cannot be done in a stable manner, and this work would not be done.
The design team asked me about it. I said I could do that with one html change and one line of CSS. I switched the order of the buttons in the DOM and set the flex-direction to row-reverse on that container.
No new dependencies, no complex logic, no bugs. Actually understanding and using CSS could reduce the weight of so many pages by literal megabytes, but engineers today see CSS as a problem to solve with JavaScript and not a useful tool.
An engineer from a product team took up the task and wrote a complex script to hijack presses of the tab key, and when focus was within a certain container, manually grab tab and change what is focused. It had many bugs. The engineer tossed more JavaScript at it. After three cycles, and a new dependency from NPM, a senior engineer blocked the PR and told the design team that such a thing cannot be done in a stable manner, and this work would not be done.
The design team asked me about it. I said I could do that with one html change and one line of CSS. I switched the order of the buttons in the DOM and set the flex-direction to row-reverse on that container.
No new dependencies, no complex logic, no bugs. Actually understanding and using CSS could reduce the weight of so many pages by literal megabytes, but engineers today see CSS as a problem to solve with JavaScript and not a useful tool.