Giter VIP home page Giter VIP logo

Comments (7)

kodekoder avatar kodekoder commented on June 1, 2024

Sorry, seems like everything working just fine. 👍

from rucksack.

ribeiroevandro avatar ribeiroevandro commented on June 1, 2024

I have the same problem.
My configuration in gulpfile.js looks like this:

gulp.task('css', () => {
  gulp.src(srcPaths.styl)
    .pipe(plumber())
    .pipe(sourcemaps.init())
    .pipe(stylus({
      use: [
        rupture(),
        poststylus([
          lost(),
          fontMagician(),
          rucksack({
            fallbacks: true,
            autoprefixer: true
          })
        ])
      ],
      compress: false
    }))
    .on('error', onError)
    .pipe(gcmq())
    // .pipe(cssnano())
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest(buildPaths.css));
});

And it generates the error:

{ [CssSyntaxError: pixrem: /Users/ribeiroevandro/Codes/Usabit/wella-site/src/styl/style.styl:22:3: Root font-size is invalid]
  name: 'CssSyntaxError',
  message: 'pixrem: /Users/ribeiroevandro/Codes/Usabit/wella-site/src/styl/style.styl:22:3: Root font-size is invalid',
  showStack: false,
  showProperties: true,
  plugin: 'gulp-stylus',
  __safety: { toString: [Function: bound ] } }

If I remove fallbacks and autoprefixer from the rucksack configuration, the error does not occur.

from rucksack.

madeleineostoja avatar madeleineostoja commented on June 1, 2024

Hmm looks like something going on with the pixrem plugin, which fallbacks (seaneking/laggard) uses. I'll have to poke around a bit more - are you setting a font-size on the html element?

from rucksack.

ribeiroevandro avatar ribeiroevandro commented on June 1, 2024

Yes, it was created that way.

html
  font-size: responsive 8px 10px

from rucksack.

madeleineostoja avatar madeleineostoja commented on June 1, 2024

ah, that might be throwing off the pixrem plugin. I'd have to see what it does (it's not my plugin) but I assume if it sees a font-size on html it uses that to calculate a px fallback, hence the error when using responsive keyword.

from rucksack.

madeleineostoja avatar madeleineostoja commented on June 1, 2024

The output of responsive will fail on IE6-8 anyway (needs calc and vw unit support), FWIW

from rucksack.

ribeiroevandro avatar ribeiroevandro commented on June 1, 2024

Hmmm, I'll take it easy, I've chosen to remove the parameters and resolve this better later.

from rucksack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.