Code Monkey home page Code Monkey logo

postcss-prefix's People

Contributors

ahdinosaur avatar ajoslin avatar gmaclennan avatar goto-bus-stop avatar hughsk avatar toddself avatar yoshuawuyts avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

postcss-prefix's Issues

Add Travis tests

I think it would help ensure the tests aren't failing. Note that tests are failing in the latest release on node 5 (#12)!

Missing the license

I can't the license information of this package, providing it would be better.

prefixes shouldn't be applied to psuedo-class arguments

trying to use the :nth-child pseudo-selector and its not working as expected:

.row {
  border: 1px solid black;
}

.row:nth-child(odd) {
  background-color: #eee;
}
<div>
<div class="row">yo!</div>
<div class="row">dude</div>
</div>

Should produce:
image

However, when you do this with sheetify, the transformed CSS looks like:

._ffdf2d5a .row {
  border: 1px solid black;
}
._ffdf2d5a .row:nth-child(._ffdf2d5a odd) {
  background-color: #eee;
}

Which does not apply the rule to the odd nth-children. If you add a rule in your inspector omitting the ._ffdf2d5a prior to odd:

._ffdf2d5a .row:nth-child(odd) {
  background-color: #eee;
}

It works as expected.

Tests fail on node 5

$ nvm version
v5.12.0
> [email protected] test /Users/cjhowe7/Desktop/postcss-prefix
> tape test/index.js

TAP version 13
# postcss-prefix
/Users/cjhowe7/Desktop/postcss-prefix/node_modules/postcss/lib/lazy-result.js:277
            throw error;
            ^

SyntaxError: Identifier 'prefixNode' has already been declared
    at /Users/cjhowe7/Desktop/postcss-prefix/index.js:19:35
    at /Users/cjhowe7/Desktop/postcss-prefix/node_modules/postcss-selector-parser/dist/selectors/container.js:164:26
    at Root.each (/Users/cjhowe7/Desktop/postcss-prefix/node_modules/postcss-selector-parser/dist/selectors/container.js:147:22)
    at Root.eachInside (/Users/cjhowe7/Desktop/postcss-prefix/node_modules/postcss-selector-parser/dist/selectors/container.js:163:21)
    at Processor.transformSelectors [as func] (/Users/cjhowe7/Desktop/postcss-prefix/index.js:19:15)
    at Processor.process (/Users/cjhowe7/Desktop/postcss-prefix/node_modules/postcss-selector-parser/dist/processor.js:31:14)
    at /Users/cjhowe7/Desktop/postcss-prefix/index.js:12:10
    at /Users/cjhowe7/Desktop/postcss-prefix/node_modules/postcss/lib/container.js:241:28
    at /Users/cjhowe7/Desktop/postcss-prefix/node_modules/postcss/lib/container.js:148:26
    at Root.each (/Users/cjhowe7/Desktop/postcss-prefix/node_modules/postcss/lib/container.js:114:22)
npm ERR! Test failed.  See above for more details.

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.