Tailwind Fold With Class NamesTailwind CSS offers a fantastic way to style your projects. It's easy to replicate across different projects, minimizes overall code, and eliminates those cumbersome CSS files. However, I've always encountered two main challenges with it:
To address these issues, some developers devised the Inline Fold solution, which hides the CSS classes when you're not using them. I've taken it a step further by modifying it to always display the first class in your class or className attribute. This tweak allows you to create recognizable names for your HTML elements, so you can still apply BEM or any other naming conventions. Read on to learn more about this improved solution! FeaturesBy default, automatic folding is enabled, but you can customize this behavior in the settings.
PRO TIP - Quickly toggle folding using the keyboard shortcut Extension SettingsThis extension allows for the following settings:
NotesThis extension folds all class attributes, even if there are no tailwind specific attributes. Credit due to stivoat! This is a modified fork of "Tailwind Fold" (See https://github.com/stivoat/tailwind-fold for original). |