0

My project uses React, Isomorphic rendering, Gulp, and Webpack. We will be removing Gulp, but until then...

I am using the styl for css/sass and I'm having an issue. I bring in a local npm package which uses precompiled css. My project is dependent on this package.

When gulp-clean-css (which uses clean-css) compiles my main project, it is replacing font-family: 'Crimson Text', serif from the npm package with font-family: "#dc143c Text , serif" and I am having issues figuring out how to prevent it. This clean-css link will be of use I believe ? Any advice is appreciated!

Kevin Danikowski
  • 4,620
  • 6
  • 41
  • 75
  • Or tell clean-css to ignore minifying this file entirely is an option – Kevin Danikowski May 11 '18 at 18:57
  • 1
    I am not familiar with the workings of clean-css, but this sounds like it's confused about whether things inside single quotes may be manipulated. Have you tried using double quotes instead? Or maybe there's a single quote somewhere earlier in the CSS that throws it off? An apostrophe in a comment perhaps? – Mr Lister May 11 '18 at 19:33
  • Yes that was the first thing I tried :/ it's an issue that it is double compiled/minified. the first minification removes the quotes, the second interprets the unquoted color – Kevin Danikowski May 11 '18 at 20:09
  • 1
    Removing quotes around a font name I'd classify as a bug. Same as changing the value of a `font-name` property to something else. I don't think there's much you can do, except file a bug report. – Mr Lister May 12 '18 at 06:38
  • @MrLister I agree, thank you! – Kevin Danikowski May 13 '18 at 20:16

0 Answers0