jStyleParser is a CSS parser written in Java. It has its own application interface that is designed to allow an efficient CSS processing in Java and mapping the values to the Java data types. It parses CSS 2.1 style sheets into structures that can be efficiently assigned to DOM elements. It is intended be the primary CSS parser for the CSSBox library. While handling errors, it is user agent conforming according to the CSS specification.
I am not sure if this needs to be in jStyleParser; but it seems relevant. Would like to know your thoughts on this. Thanks!
The CSS DOM API allows querying the short hand form of a property, even when it is not directly specified. There are two types of behaviour:
In JS, element.style.background returns the background as specified in the style attribute.
In JS, getComputedStyle(element).background returns the short form of the computed background, even if only long forms are specified.
It would be nice to have some support for this from jStyleParser (in the form of static utility methods). The wiring to JS land can be done on the client side of course.
I am not sure if this needs to be in jStyleParser; but it seems relevant. Would like to know your thoughts on this. Thanks!
The CSS DOM API allows querying the short hand form of a property, even when it is not directly specified. There are two types of behaviour:
element.style.background
returns thebackground
as specified in thestyle
attribute.getComputedStyle(element).background
returns the short form of the computedbackground
, even if only long forms are specified.It would be nice to have some support for this from jStyleParser (in the form of static utility methods). The wiring to JS land can be done on the client side of course.