Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.
This repository was archived by the owner on Dec 28, 2024. It is now read-only.

Unable to parse multiple rules with plugin on Windows #4

@alexlibby

Description

@alexlibby

Hi,

I've been using your plugin in a Windows environment (I do not have access to Mac or Unix/Linux at present) - I've come across an odd issue though:

If I add one rule to a style sheet, such as this one:

.slide-up + label {
  display: inline-block;
  position: absolute;
  translate: translateX(0);
  top: 0;
  left: -2px;
  padding: 10px 15px;
  text-shadow: 0 1px 0 rgba(19, 74, 70, 0.4);
  transition: all .3s ease-in-out;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
  overflow: hidden;
}

...the code compiles absolutely fine. However, when adding a second or multiple additional rules, it falls over with this error:

C:\wamp\www\postcss>gulp styles
[16:04:54] Using gulpfile C:\wamp\www\postcss\gulpfile.js
[16:04:54] Starting 'styles'...

events.js:141
      throw er; // Unhandled 'error' event
      ^
TypeError: Cannot set property 'value' of undefined
    at C:\wamp\www\postcss\node_modules\postcss-transform-shortcut\index.js:44:20
    at C:\wamp\www\postcss\node_modules\gulp-postcss\node_modules\postcss\lib\container.js:115:34
    at C:\wamp\www\postcss\node_modules\gulp-postcss\node_modules\postcss\lib\container.js:73:26
    at Root.each (C:\wamp\www\postcss\node_modules\gulp-postcss\node_modules\postcss\lib\container.j
s:59:22)
    at Root.walk (C:\wamp\www\postcss\node_modules\gulp-postcss\node_modules\postcss\lib\container.j
s:72:21)
    at Root.walkRules (C:\wamp\www\postcss\node_modules\gulp-postcss\node_modules\postcss\lib\contai
ner.js:113:25)
    at C:\wamp\www\postcss\node_modules\postcss-transform-shortcut\index.js:15:7
    at LazyResult.run (C:\wamp\www\postcss\node_modules\gulp-postcss\node_modules\postcss\lib\lazy-r
esult.js:201:20)
    at C:\wamp\www\postcss\node_modules\gulp-postcss\node_modules\postcss\lib\lazy-result.js:115:37
    at LazyResult.asyncTick (C:\wamp\www\postcss\node_modules\gulp-postcss\node_modules\postcss\lib\
lazy-result.js:129:15)

Removing the additional rules and recompiling the code works fine.

I've tried changing the order and making sure that each rule applies to one selector or class (and not be assigned to multiple selectors at the same time time, such as .foo, .bar {....}. This has not made any difference - the code still fails to compile. I'm using Sublime Text 3 - the line endings have been set to Windows and Unix - neither of these make a difference either! I've also reduced the tasks being called in my gulpfile down to just one (the var references to plugins have been left untouched) - this doesn't make any difference.

Any ideas? My hope is I am just missing something - I'm not sure what though...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions