corgrath / osbcp-css-parser Goto Github PK
View Code? Open in Web Editor NEWCSS Parser in Java - !! This project is abandoned - Sorry :( - but maybe there is an active fork where the development can continue !!!
License: Apache License 2.0
CSS Parser in Java - !! This project is abandoned - Sorry :( - but maybe there is an active fork where the development can continue !!!
License: Apache License 2.0
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;
}
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?
The @charset Rule not supported
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.
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 '}'."); *********************/
}
Hi, I'm using your parser in a project I should be publishing to Github shortly.
Do you have any plans to deploy to a Maven repo? e.g. Sonatype OSS.
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
Report empty blocks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.