Skip to content

Using uncss with Bootstrap

Ryan Zimmerman edited this page Nov 28, 2016 · 10 revisions

For Bootstrap 3.x, specifically v3.3.6, you can use the following as the ignore option, via https://github.com/giakki/uncss/issues/139#issuecomment-227308256.

[
    /\.affix/,
    /\.alert/,
    /\.close/,
    /\.collaps/,
    /\.fade/,
    /\.has/,
    /\.help/,
    /\.in/,
    /\.modal/,
    /\.open/,
    /\.popover/,
    /\.tooltip/
]

Note that this will result in bigger CSS but it's probably the safest. If you want to have the best possible result, either compile only the LESS components you use, or use the customizer (which will be removed in v4).

Clone this wiki locally