krasimir / absurd

A JavaScript library with superpowers
http://absurdjs.krasimirtsonev.com/
MIT License
1.38k stars 90 forks source link

Issue with -webkit-line-clamp #118

Closed renatoi closed 9 years ago

renatoi commented 9 years ago

Proprietary -webkit-line-clamp property is giving wrong/broken result in the latest Absurd version, it was working fine before. Is there an option to disable any smart processing Absurd is trying to do with my properties and instead just output what I pass?

'.test': {
    '-webkit-line-clamp': 3
}

is producing:

.test {
   webkit-line-clamp: 3;
  -webkit-webkit-line-clamp: 3;
  -moz-webkit-line-clamp: 3;
  -ms-webkit-line-clamp: 3;
  -o-webkit-line-clamp: 3;
}
krasimir commented 9 years ago

Hi @renatoi

can you please let me know the version that you are using. I'm testing your code in the browser I can't reproduce the bug (here is a jsfiddle http://jsbin.com/sizuritava/1/edit?js,output). I'm trying the following code:

var absurd = Absurd();
var css = absurd.add({
    '.test': {
      '-webkit-line-clamp': 3
    },
    '.anothertest': {
      '-w-line-clamp': 10
    }
}).compile();

The result is:

.test {
  -webkit-line-clamp: 3;
}
.anothertest {
  line-clamp: 10;
  -webkit-line-clamp: 10;
}
renatoi commented 9 years ago

Ok sorry, I believe this bug was in a previous version. We were using the caret symbol as the package dependency in npm, and I believe that it was getting "0.3.158" instead of "0.3.4". Semantically it seemed to me that 0.3.158 > 0.3.4. Could you add a note somewhere in the README the versioning semantics Absurd is using? It will be easier to declare the correct dependency in NPM.