FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16357&edit=1

ID: 16357
Updated by: tor-erik@web-amp.com
Reported By: tor-erik at web-amp dot com
Summary: Multiple equal complex at rules not parsed correctly
Status: Open
Type: Bug
Package: HTML_CSS
Operating System: Ubuntu
Package Version: 1.5.3
PHP Version: 5.2.4
Roadmap Versions:
New Comment:

There is a slight mistake in the test script

@media screen {
body { font-size: 10pt,
font-weight: bold }
}

should be:

@media screen {
body { font-size: 10pt;
font-weight: bold; }
}

It does not, however, make any difference in the test result.


Previous Comments:
------------------------------------------------------------------------

[2009-06-21 13:58:09] torerikh

Description:
------------
If multiple "equal" at rules are included in the css file, only the
last is included in the parse result.

Test script:
---------------
$a = new HTML_CSS(null, null);

$a->parseString("

@media print {
body { font-size: 10pt }
}

@media screen {
body { font-size: 10pt,
font-weight: bold }
}
@media screen {
body { font-size: 12pt }
}
", true);

print_r($a->_css);

Expected result:
----------------
Two @media screen rules should be in the internal _css array or
one rule with the content of the two from the css file merged.

Actual result:
--------------
Only the last @media screen rule is included in the internal _css
array

------------------------------------------------------------------------

Search Discussions

  • Pear at Jun 21, 2009 at 5:57 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=16357&edit=1

    ID: 16357
    Updated by: pear@laurent-laville.org
    Reported By: tor-erik at web-amp dot com
    Summary: Multiple equal complex at rules not parsed correctly
    -Status: Open
    +Status: Verified
    Type: Bug
    Package: HTML_CSS
    Operating System: Ubuntu
    Package Version: 1.5.3
    PHP Version: 5.2.4
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Verified



    Previous Comments:
    ------------------------------------------------------------------------

    [2009-06-21 14:19:27] torerikh

    There is a slight mistake in the test script

    @media screen {
    body { font-size: 10pt,
    font-weight: bold }
    }

    should be:

    @media screen {
    body { font-size: 10pt;
    font-weight: bold; }
    }

    It does not, however, make any difference in the test result.

    ------------------------------------------------------------------------

    [2009-06-21 13:58:09] torerikh

    Description:
    ------------
    If multiple "equal" at rules are included in the css file, only the
    last is included in the parse result.

    Test script:
    ---------------
    $a = new HTML_CSS(null, null);

    $a->parseString("

    @media print {
    body { font-size: 10pt }
    }

    @media screen {
    body { font-size: 10pt,
    font-weight: bold }
    }
    @media screen {
    body { font-size: 12pt }
    }
    ", true);

    print_r($a->_css);

    Expected result:
    ----------------
    Two @media screen rules should be in the internal _css array or
    one rule with the content of the two from the css file merged.

    Actual result:
    --------------
    Only the last @media screen rule is included in the internal _css
    array

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJun 21, '09 at 12:21p
activeJun 21, '09 at 5:57p
posts2
users2
websitepear.php.net

2 users in discussion

Tor-erik: 1 post Pear: 1 post

People

Translate

site design / logo © 2022 Grokbase