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
-Status: Open
+Status: Verified
Type: Bug
Package: PHP_CodeSniffer
Operating System: Debian
Package Version: 1.3.0
PHP Version: 5.3.6
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:
-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.
Previous Comments:
------------------------------------------------------------------------
[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.