google / web-starter-kit

Web Starter Kit - a workflow for multi-device websites
http://developers.google.com/web/starter-kit
Apache License 2.0
18.43k stars 3.02k forks source link

Problem with uncss + mdl-sass #872

Closed BudickDa closed 6 years ago

BudickDa commented 8 years ago

When swapping the mdl from the CDN with the Sass-Version according to these instructions components like the menu-button and the snackbar do no longer have styles.

Reason: uncss in the gulpfile deletes important css classes like .mdl-layout__drawer-button

Solution: Delete these lines in gulpfile.babel.js (96-102)

.pipe($.if('*.css', $.uncss({
    html: [
        'app/index.html'
    ],
    // CSS Selectors for UnCSS to ignore
    ignore: ['.mdl-layout__drawer-button', '.mdl-snackbar']
})))

It took me a while to figure it out. Maybe the docs (/docs/mdl-sass.md) should be updated.

gauntface commented 6 years ago

🐛 Bankruptcy: Closing due to inactivity.

I would actually like to drop uncss because it adds unusual issues