tailor icon indicating copy to clipboard operation
tailor copied to clipboard

Multiple versions of bootstrap

Open vivek-kandhvar opened this issue 5 years ago • 5 comments

Hi, we have been planning to use tailor for combining multiple of our apps into one. We have been facing some issues with CSS. Though we fixed app specific css using fragment name as name-spacing, we are unable to do so for external css like bootstrap. We have two react apps, using two different version of bootstrap. Once both the apps are loaded, we are seeing css clash happening for bootstrap components like select, datetimepicker etc. Any thoughts on this?

vivek-kandhvar avatar Mar 05 '19 13:03 vivek-kandhvar

You have to remember that this is still front-end code once it is all processed by Parse. You wouldn't include two version of Bootstrap in your regular application correct? You have to decide on one version and stick to it.

stevoPerisic avatar Mar 05 '19 13:03 stevoPerisic

True that. I get what you are saying. But the case is a little different here. Each app is built by a different team, and one app uses bootstrap 3.x, and the other uses 4.x. Upgrading the other is not feasible at this time. So I was wondering if there is any way to handle this scenario. Appreciate your help.

vivek-kandhvar avatar Mar 05 '19 13:03 vivek-kandhvar

Here's an idea, perhaps you can use tools like gulp and webpack to prefix each fragment's static resource code. For example you can use the SASS Bootstrap and run it through your own build script which can add prefixes for your fragments. Hope this can get you started...

stevoPerisic avatar Mar 15 '19 11:03 stevoPerisic

I think you are talking about using namespace for the css, which I have already done. With that, css issues are taken care to an extent. But the js code from both versions still spill over and are causing issues. Even using common fragment didn't solve that.

vivek-kandhvar avatar Mar 18 '19 09:03 vivek-kandhvar

@vivek-kandhvar, did you find any solution for the above problem. Currently I'm facing the similar problem. Thanks in advance.

manikanta443 avatar Sep 14 '21 17:09 manikanta443