Menu

Stop the agent from switching the styling approach “while we’re here”
📰

Stop the agent from switching the styling approach “while we’re here”

DEV Community: css·Sherotree·16 days ago
#VkIJsS2H
#devtocss#devto#dev#styling#file
Long article (469 words) — no AI summary yet.
Reading 0:00
15s threshold

The bug is a truncated label. The diff also rewrites the file from CSS Modules to Tailwind “so it matches the newer pages,” or from a styled component to a stack of inline styles “to keep it local.” The visual fix is one min-width . The rest is a styling migration with no design review.

I’ve started telling agents to keep the styling approach the file already uses . A bugfix is not the moment to introduce a second (or third) styling system in the same folder.

Why the rewrite looks helpful

The model wants consistency with whatever examples it has seen most recently. If the prompt or the nearby tab is Tailwind, it will “helpfully” convert the file you asked it to patch. The conversion often almost works: a few tokens get inlined as magic values, a media query is dropped, and a CSS Module that other files still import is left half-deleted.

You also lose review signal. A 200-line style rewrite buries the text-overflow change.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.