bonsai.css icon indicating copy to clipboard operation
bonsai.css copied to clipboard

[Feature] Add class to unstyle default styling

Open ibn-akbar opened this issue 3 years ago • 2 comments

Hi,

Every now and then there's need to add classes for unstyling elements. Like this:

.button-icon {
  border: unset;
  box-shadow: unset;
}

If we add support for .unstyle class there'll be no need to unset/override styles and it'll come handy. For example:

.button:not(.unstyle), button:not(.unstyle) {
  ...
}

ibn-akbar avatar Nov 18 '20 23:11 ibn-akbar

Thank you for the suggestion.

I think you make a good point As we are styling the base semantic elements it is indeed important to provide a measure to remove this styling inline.

ciar4n avatar Nov 22 '20 08:11 ciar4n

@ciar4n I think there should be a css file exported that has everything except the bonsai-base.css - this would make bonsai much more flexible without imposing the style opinions of the authors on users. It's not "utility-first" if there are a bunch of styles that come with the framework - other libraries/frameworks usually call these "themes" that users can choose from.

I think bonsai is interesting and I don't mean to be harsh because I do like the default styles.

I can recreate what I want by doing

import 'bonsai.css/dist/bonsai-helpers.min.css';
import 'bonsai.css/dist/bonsai-utilities.min.css';

but they still set all the :root variables.

JaKXz avatar Feb 02 '21 01:02 JaKXz