-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Description
Following on from the recent addition to the prefix option where you can specify a prefix for all classes - it would be nice to be able to list what classes should be prefixed:
prefix: {
'container': 'tw-'
},
Reason for this suggestion is because the main reason why you use the prefix option is to avoid collisions with whatever framework e.g. Bootstrap that you are using. It seems wasteful to prefix every single classname when there is probably only a 5% collision of names with your current framework.
This will help reduce size of your output CSS and simplify the classnames you need to type.
Another idea, maybe some kind of "mutator" function that will be called when classes are being added to your CSS?
tailwind.addTransformer(function(css) {
if (css.selector == '.container') {
css.selector = 'tw-container';
}
return css;
});Metadata
Metadata
Assignees
Labels
No labels