Edit report at http://pear.php.net/bugs/bug.php?id=18633&edit=1
ID: 18633
Updated by: [email protected]
Reported By: gennadiy at gmail dot com
-Summary: Problem in CSS Tokenizer
+Summary: CSS Tokenizer doesn't replace T_LIST tokens inside
some styles
-Status: Verified
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Debian
Package Version: 1.3.0
PHP Version: 5.3.6
Assigned To: squiz
Roadmap Versions:
New Comment:
-Summary: Problem in CSS Tokenizer
+Summary: CSS Tokenizer doesn't replace T_LIST tokens inside
some styles
-Status: Verified
+Status: Closed
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Previous Comments:
------------------------------------------------------------------------
[2011-07-13 05:50:21] squiz
And only for the second definition. The first works fine as a one-liner.
So it's the
element targeting # that is causing issues. This code will replicate it
simply:
#listStyle {list-style-type: square;}
------------------------------------------------------------------------
[2011-07-13 05:48:09] squiz
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: squiz
Interestingly, if you define the CSS like this:
.listStyle {
list-style: square inside url(list-style.png);
}
#listStyle {
list-style-type: square;
list-style-position: inside;
list-style-image: url(image.gif);
}
Then it works fine. There is something about it being on the same line
as the
definition name that seems to be causing an issue.
------------------------------------------------------------------------
[2011-06-28 12:26:09] gennadiylitvinyuk
Description:
------------
CSS Tokenizer has problems during tokenizing of list-* styles
They are parsed as a T_LIST and T_STYLE tokens, should be
only T_STYLE.
Test script:
---------------
This is a part of CSS
.listStyle {list-style: square inside url(list-style.png)}
#listStyle {list-style-type: square;list-style-position:
inside;list-style-image: url(image.gif)}
Expected result:
----------------
var_dump($tokens) :
[65]=>
array(7) {
["type"]=>
string(7) "T_STYLE"
["code"]=>
int(1041)
["content"]=>
string(16) "list-style-image"
["line"]=>
int(5)
["column"]=>
int(69)
["level"]=>
int(0)
["conditions"]=>
array(0) {
}
Actual result:
--------------
var_dump($tokens) :
[65]=>
array(7) {
["code"]=>
int(359)
["content"]=>
string(4) "list"
["type"]=>
string(6) "T_LIST"
["line"]=>
int(5)
["column"]=>
int(65)
["level"]=>
int(0)
["conditions"]=>
array(0) {
}
}
[66]=>
array(7) {
["type"]=>
string(7) "T_STYLE"
["code"]=>
int(1041)
["content"]=>
string(12) "-style-image"
["line"]=>
int(5)
["column"]=>
int(69)
["level"]=>
int(0)
["conditions"]=>
array(0) {
}
}
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18633&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.