PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_Page » Bug #698

addStyleDeclaration() always overwrite current style.

Details

Submitted2004-02-06 12:21 UTC
Fromdostick at ctco dot lv
Assignedthesaur
StatusWont fix
PackageHTML_Page
PHP Version4.3.4
Roadmaps(Not assigned)

Comments

[2004-02-06 12:21 UTC] dostick at ctco dot lv

Description:
------------
addStyleDeclaration() always overwrite current style.
so if you're using addStyleDeclaration() more than once in script it will
use the value passed in last call.

This is VERY inconvenient and annoying. Other PEAR HTML_Page methods
accumulate passed data: e.g. addBodyContent() adds content to the internal
buffer and of course does not override it.

[2004-02-06 12:34 UTC] thesaur at php dot net

addScriptDeclaration() acts the same way. The side-effect of creating an array is that as it now stands, it would create a new <script> or <style> section for each addition. That's not very pretty. However, I will attempt to group by type and then implode the content before wrapping it with the html elements.

I will get to that hopefully this coming week.