Theming : How do i exclude incompatible code that is added?
william - 8 months ago
The Switch plugin is depended on old less not compatible with newer bootstrap versions. If i don't want that addon to add that old less code for theming, what do i do? Do i override all the views that includes it?
I would like a discussion in the community regarding this. In my mind, field types should not be allowed to include styling that is depended on frameworks. In the case of this less file, the author of the plugin should hard code the color and border radius values in the stylesheets, with the !default making it possible to override.
In this case, when trying to develop an admin theme that uses a newer version things break. Another issue is that those variables would not be accessible by the field type if you would compile the theme stylesheets with webpack/gulp and add the final css file in with assetics.
To me, this is bad practice that cause issues and we should make sure we avoid it as developers.