Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Causes lots of warnings with stylus option warn on #81

Closed
bengourley opened this issue Apr 2, 2012 · 6 comments
Closed

Causes lots of warnings with stylus option warn on #81

bengourley opened this issue Apr 2, 2012 · 6 comments

Comments

@bengourley
Copy link
Contributor

Having just added nib to a project where the stylus warn option was set, I found the following output.

Turns out in lib/nib/vendor.styl border-image is actually declared twice, but I can't see why all of the other warnings should be fired.

Warning: local function "border-image" previously defined in this scope

Warning: local function "whitespace" previously defined in this scope

Warning: local function "ellipsis" previously defined in this scope

Warning: local function "vendor" previously defined in this scope

Warning: local function "box-shadow" previously defined in this scope

Warning: local function "user-select" previously defined in this scope

Warning: local function "column-count" previously defined in this scope

Warning: local function "column-gap" previously defined in this scope

Warning: local function "column-rule" previously defined in this scope

Warning: local function "column-rule-color" previously defined in this scope

Warning: local function "column-rule-width" previously defined in this scope

Warning: local function "column-rule-style" previously defined in this scope

Warning: local function "column-width" previously defined in this scope

Warning: local function "background-size" previously defined in this scope

Warning: local function "transform" previously defined in this scope

Warning: local function "border-image" previously defined in this scope

Warning: local function "transition" previously defined in this scope

Warning: local function "transition-property" previously defined in this scope

Warning: local function "transition-duration" previously defined in this scope

Warning: local function "transition-timing-function" previously defined in this scope

Warning: local function "transition-delay" previously defined in this scope

Warning: local function "backface-visibility" previously defined in this scope

Warning: local function "opacity" previously defined in this scope

Warning: local function "whitespace" previously defined in this scope

Warning: local function "box-sizing" previously defined in this scope

Warning: local function "box-orient" previously defined in this scope

Warning: local function "box-flex" previously defined in this scope

Warning: local function "box-flex-group" previously defined in this scope

Warning: local function "box-align" previously defined in this scope

Warning: local function "box-pack" previously defined in this scope

Warning: local function "box-direction" previously defined in this scope

Warning: local function "animation" previously defined in this scope

Warning: local function "animation-name" previously defined in this scope

Warning: local function "animation-duration" previously defined in this scope

Warning: local function "animation-delay" previously defined in this scope

Warning: local function "animation-direction" previously defined in this scope

Warning: local function "animation-iteration-count" previously defined in this scope

Warning: local function "animation-timing-function" previously defined in this scope
Warning: local function "animation-play-state" previously defined in this scope
Warning: local function "animation-fill-mode" previously defined in this scope
Warning: local function "border-image" previously defined in this scope

Warning: local function "hyphens" previously defined in this scope

Warning: local function "appearance" previously defined in this scope
Warning: local function "-apply-border-radius" previously defined in this scope
Warning: local function "border-radius" previously defined in this scope

Warning: local function "replace" previously defined in this scope

Warning: local function "grad-point" previously defined in this scope
Warning: local function "pos-in-stops" previously defined in this scope
Warning: local function "normalize-stops" previously defined in this scope
Warning: local function "join-stops" previously defined in this scope
Warning: local function "webkit-stop" previously defined in this scope
Warning: local function "std-stop" previously defined in this scope
Warning: local function "linear-gradient" previously defined in this scope
Warning: local function "linear-gradient-image" previously defined in this scope
@tj
Copy link
Collaborator

tj commented Apr 2, 2012

hmm weird.. I wonder if it's being imported several times or something. are you doing .import('nib') or @import "nib" in the stylesheet?

@tj
Copy link
Collaborator

tj commented Apr 2, 2012

we kinda need a .importOnce() / @import_once or something, or make that the default of @import

@bengourley
Copy link
Contributor Author

In app.js:

var compile = function(str, path) {
  return stylus(str)
    .define('url', stylus.url({ paths : [__dirname + "/public"], limit : 10000 }))
    .set('filename', path)
    .set('warn', true)
    .use(nib());
};

Then in the stylesheet:

@import 'nib'

If I take out either, nib no longer works. I've also checked this on another project and has the same issue.

@tj
Copy link
Collaborator

tj commented Apr 2, 2012

weird! I'll try the same on my project and check it out

@bengourley
Copy link
Contributor Author

Any word on this?

@uipoet
Copy link

uipoet commented Apr 10, 2012

I'm also getting debug warnings for Express 3 and:

application.js

function compile(string, path) {
  return stylus(string)
    .set('filename', path)
    .set('warn', true)
    .set('compress', true)
    .use(nib());
}

application.use(stylus.middleware({
  src: __dirname + '/views',
  dest: __dirname + '/public',
  compile: compile
}));

views/css/style.styl

@import "nib";

console

DEBUG: Warning: local function "border-image" previously defined in this scope
DEBUG: Warning: local function "whitespace" previously defined in this scope
DEBUG: Warning: local function "ellipsis" previously defined in this scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants