Files
coder/site/src/components/DropdownMenu
Andrew Aquino 94605fa193 refactor(site): set square elements' dimensions with size- classes (#27071)
Finds all class combinations like `w-N h-N` and replaces them with
`size-N`.

- find: `/w-(\d+) h-\1(?=\s|")/g`, or `/h-(\d+) w-\1(?=\s|")/g`
- replace with: `size-$1`

The positive lookahead `/(?=\s|")/` matches whitespace or a double quote
character after the number, to prevent false matches where the numbers
aren't the same but share the same left digits:


https://github.com/coder/coder/blob/b3766d62be9487732c7e657cf737e739cc5413da/site/src/pages/WorkspacesPage/WorkspacesTable.tsx#L124

Unfortunately we don't have a way to automatically enforce this, since
there's no Biome equivalent for `eslint-plugin-tailwindcss`'s
[`enforces-shorthand`
rule](https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/HEAD/docs/rules/enforces-shorthand.md)
2026-07-07 15:50:58 -07:00
..