Fixes #5501: Add Twitter Bootstrap CSS (not js) #603
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
That pull request allows to use Twitter Bootstrap CSS and JS without breaking everything in Rudder.
See http://stackoverflow.com/questions/25552144/add-bootstrap-js-css-in-a-subparty-of-a-page-or-use-a-global-no-conflic-or-names for the technical limitation.
The solution was to rewrite CSS with a prefix, namely ".tw-bs" thanks to a LESS online processor (for remaining, it was: http://less2css.org/)
To use it, use the tw-bs component name prefixed with the "tw-bs" class. For example, to use the progree bar component, one will write:
<div class="tw-bs progress">
For using the JS part, I was forced to add "no-conflict" for all standard element of bootstrap (buttons, alerts, modal, tabs, etc). If at some point we want to switch to bootstrap version, we will need to use them everywhere in Rudder (i.e: we can't simply use a Bootstrap button for one new visual element, we will need to change all Rudder buttons to use bootstrap).