mozilla-services / FindMyDevice

Find My Device - 🚨🚨This server is obsolete and unsupported.🚨🚨
Mozilla Public License 2.0
13 stars 8 forks source link

Remove comment banners from minified CSS? #206

Open pdehaan opened 10 years ago

pdehaan commented 10 years ago

Steps to reproduce:

  1. Go to https://find.firefox.com (which serves minimized content).
  2. View the output of the minimized {sha}.main.css file (in my case the file name/url is currently https://find.firefox.com/styles/404662ff.main.css)

    Actual results:

/*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} ... td,th{padding:0}/*! This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */@font-face{font-family:'TypoPRO Fira Sans';

Sorry, it's a bit hard to read, but basically we're serving up the normalize.css copyright heading (MIT License) and then the minimized normalize.css contents, followed by the multiline Mozilla MPL license and then the contents of the generated main.css file.

Not sure if we want to remove all copyrights, or whatever.

pdehaan commented 10 years ago

From what I can tell, this is coming from the grunt-contrib-cssmin Grunt task.

We may be able to solve it by setting the keepSpecialComments option to 1 (to keep the first /*! comment only), or setting it to 0 (which would remove both copyright headers). Then we could possibly use the banner option to specify some custom copyright header notice.