Giter Site home page Giter Site logo

css2json's People

Contributors

kesla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

whx76

css2json's Issues

when css property value has ";", it will get an error

A css like below :
.test { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAC5JREFUKFNjGIKgvLz8P5RJPABpIlkjTBNJGpE1Ea2RZA0gQLIGECBZw2ACDAwAhS4mQZAuqGcAAAAASUVORK5CYII=); }
it will splite by ";"
It can be solve by code below:
var reg = new RegExp("image/png;base64", "g"); var regback = new RegExp("image/png+&+base64", "g");; var declarations = css.substring(lbracket + 1, rbracket).replace(reg, "image/png+&+base64") .split(";") .map(function(declaration){ return declaration.trim().replace(regback, "image/png;base64"); }) .filter(function(declaration) { return declaration.length > 0; }); // Remove any empty ("") values from the array
I change the code in node models and it work well.

@media print broken attribute

Hi guys,

Thanx for this library has been a very good tool for my team's projects.
It works fine on our project but today I was testing the prism library and I got a broken attribute.

This is the code:

@media print {
	code[class*="language-"],
	pre[class*="language-"] {
		text-shadow: none;
	}
}

Output

'@media print': {
    'code[class*=language-],pre[class*=language-]{text-shadow': 'none'
  },
  '}pre[class*=language-]': { '': '}pre[class*=language-]{' },

This is the original css file:

https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/themes/prism.css

Please take a look to it, and thanx again!

License

Hi!

I'm using this package, and I noticed there is no license specified. If you get the chance, can you please add one?

Thank you very much!

node version

Hey Kesla,

Could you update the node version in package.json with something like
"engines": { "node": ">= 0.4.11} ?
otherwise your package is not installable

thanks!

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.