Giter Club home page Giter Club logo

osbcp-css-parser's People

Contributors

corgrath avatar philippwiesemann 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

osbcp-css-parser's Issues

com.osbcp.cssparser.CSSParser does not support @media queries

Hi !

The following CSS with a simple media query does not parse correctly, "}" brackets are moved between Rules :
Can you look at it maybe ? :)
Thanks

Input :
@media ( width > 600 and print) {
p{background-color:red;visible:true;}
}
@media ( width > 600 ) {
p{background-color:red;}
}

Output produced, brackets are moved :
@media ( width > 600 and print) {
p{background-color: red;
visible: true;
}

} @media ( width > 600 ) {
p{background-color: red;
}

Media Selectors

I ran my code according to the document and could not sort the media queries appropriately. I was wondering if there is a method for doing so, or is this something I will have to take care of on my own?

Gradle support

Hi,

I'd like to use the CSS parser in my project which I build with Gradle.

I've tried to add this repository in my build.gradle using

maven { url 'https://github.com/corgrath/osbcp-css-parser' }

Using this I'd tried to pull the jar

compile 'com.osbcp.cssparser:cssparser:1.4'

Yet Gradle says that it could not find the jar.

I'm new to Gradle, so please forgive me if I've missed something obvious.

little change maybe required

Hi corgrath,

This is a very useful and compact parser in java, Its also helpful that you didn't add property parser code and leave that on individual implementation.

I would like to point a small change that in css files this code is forcing that propertyValues are are always terminated by a semicolon (;) but in real world CSS the last propertyValue may not be terminated by ";" instead "}" is possible.

thought you would like to know that I just changed my code on file CSSParser.java near line number 180

} else if (Chars.BRACKET_END.equals(c)) {
state = State.INSIDE_SELECTOR;
/************** throw new IncorrectFormatException(ErrorCode.FOUND_END_BRACKET_BEFORE_SEMICOLON, "The value '" + valueName.trim() + "' for property '" + propertyName.trim() + "' in the selector '" + selectorName.trim() + "' should end with an ';', not with '}'."); *********************/

    }

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.