Browser behavior - In the above Style declarations "height: 500px; background: yellow;color:red;" will be commented out
CSS parser behavior - In the above Style declarations "height: 500px; background: yellow;color:red;" will be striped out
Browser behavior - In the above Style declarations "height: 500px; background: yellow;color:red;" will be commented out
CSS parser behavior - In the above Style declarations "height: 500px; background: yellow;color:red;" will be striped out
sorry for being not so responsive at the moment.
The code of this fiel is generated from the javacc parser. I think it is a bad idea to manipulate the generated code. Will be great if you can provide a solution based on changes in the javacc input files.
RBRi
On Fri, 10 Mar 2017 10:33:54 +0000 Asiya wrote:
is the following changes in SACParserCSS3.java > styleDeclaration() works for above case ?
~~~
final public void styleDeclaration() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IDENT:
case ASTERISK:{
declaration();
break;
}
default:
jj_la1[89] = jj_gen;
;
}
label_58:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SEMICOLON:{
;
break;
}
default:
jj_la1[90] = jj_gen;
break label_58;
}
jj_consume_token(SEMICOLON);
label_59:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case S:{
;
break;
}
default:
jj_la1[91] = jj_gen;
break label_59;
}
jj_consume_token(S);
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IDENT:
case ASTERISK:{
declaration();
break;
} / FIX : To handle single line comments /
case SLASH:{
error_skipdecl();
break;
}
default:
jj_la1[92] = jj_gen;
;
}
}
}
~~~
Is this issue resolved ? or Do you require solution in the form of javacc parser generated file ? if so can you share the procedure for generation and share that file ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
CSS uses the"block comment" syntax (ie., start a comment with /, and end it with /) and don't support "line comment" //
Whenever we use // in CSS, the next CSS construct - either declaration or block - will be "commented out" in browser .
CASE 1 :
<!DOCTYPE html>
<html>
<head>
<style>
//comment here
.foo {
width: auto;
height: 500px;
background: yellow;
color:red;
}
</style>
</head>
<body>
Hello World!
</body>
</html>
Browser behavior - Style with class "foo" will be commented out
CSS parser behavior - Style with class "foo" will be striped out
CASE 2 :
<!DOCTYPE html>
<html>
<head>
<style>
.foo {
width: auto;
//comments here
height: 500px;
background: yellow;
color:red;
}
</style>
</head>
<body>
Hello World!
</body>
</html>
Browser behavior - In the above Style declarations "height: 500px; background: yellow;color:red;" will be commented out
CSS parser behavior - In the above Style declarations "height: 500px; background: yellow;color:red;" will be striped out
CASE 3 :
<!DOCTYPE html>
<html>
<head>
<style>
.foo {
width: auto;
//height: 500px;
background: yellow;
color:red;
}
</style>
</head>
<body>
Hello World!
</body>
</html>
Browser behavior - In this case, //height: will be consider as invalid css property, hence "background: yellow; color:red;" will be applied in browser
CSS parser behavior - In the above Style declarations "height: 500px; background: yellow;color:red;" will be striped out
In CASE3, The browser and parser behavior differs. Is there any way to handle it ?
I'm working on that, but it is not that simple....
On Wed, 18 Jan 2017 06:29:49 +0000 Asiya wrote:
is the following changes in SACParserCSS3.java > styleDeclaration() works for above case ?
Hi Asiya,
sorry for being not so responsive at the moment.
The code of this fiel is generated from the javacc parser. I think it is a bad idea to manipulate the generated code. Will be great if you can provide a solution based on changes in the javacc input files.
On Fri, 10 Mar 2017 10:33:54 +0000 Asiya wrote:
Is this issue resolved ? or Do you require solution in the form of javacc parser generated file ? if so can you share the procedure for generation and share that file ?
Is the above issue fixed, please let us know because it helps me a lot.
Thanks in advance..
I have updated CSSParser from version 0.9.3 to version 0.9.5.
The issue hasn't been solved yet.
There are no news yet?
Thanks.