gelviis
gelviis

Reputation: 458

Disabling Twitter Bootstrap styles on forms like JQM

It's possible to add data-role="none" on form elements in jQuery Mobile if you want to just use the native styles http://jquerymobile.com/demos/1.2.0/docs/forms/forms-all-native.html

Is there a similar option for Twitter Bootstrap? Can't seem to find anything on this.

Upvotes: 3

Views: 459

Answers (1)

Twisty
Twisty

Reputation: 30893

Not familiar with this framework yet when I visit the Custom page, it appears you can not include the Forms section of the CSS: http://twitter.github.com/bootstrap/customize.html

This would suggest that Form Elements are styled via CSS only and simply stripping them of their classes should allow you to disable the styling (which is shown here: http://twitter.github.com/bootstrap/base-css.html#forms).

This framework appears to rely on classes versus added attributes like JQM. Removing the classes appears to be the best way to address it and there does not appear to be a simple way to do it. That said, you can mimic the activity using JQuery. Something like the following:

$(function () {
    $("body").find("*[data-role='none']").attr("class", "");
});

This could be improved to store all the Class values and then just strip off the ones relative to the framework.

Upvotes: 3

Related Questions