framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.04k stars 3.23k forks source link

Prefix CSS class names with f7 #4133

Open Lucky-victory opened 1 year ago

Lucky-victory commented 1 year ago

Is your feature request related to a problem? Please describe. I was working on a theme (non-framework7) but then I decided to add framework7 CDN so I can use its features, only for me to experience Class names collision, some of the names I gave to my elements were also used by framework7 which disrupted my styles and made me had to rename my class names.

Describe the solution you'd like I would love it if the CSS class names get prefixed with f7 just as the CSS variables were prefixed.

Describe alternatives you've considered Ionic, In Ionic, their CSS class names get prefixed with ion, this way you don't have to worry about collisions.

Additional context For instance, menu-list should be f7-menu-list item-list => f7-item-list

shastox commented 1 year ago

What kind of collisions are you talking about? You use F7 and additionally add your classes. You DON't embed F7 in your code

Lucky-victory commented 1 year ago

What kind of collisions are you talking about? You use F7 and additionally add your classes. You DON't embed F7 in your code

I added framework7 CDN to an existing project, and unfortunately, there were class names that I used in my project that were also used in framework7

dotarjun commented 1 year ago

I'd like to give this a shot