[
https://issues.apache.org/jira/browse/DOXIA-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16810673#comment-16810673
]
Fred Eckertson edited comment on DOXIA-590 at 4/5/19 10:04 AM:
---------------------------------------------------------------
This can probably be closed or at least reworded to say the doxia provided
class will be the designated loser which is ensured in some locations by not
setting a class attribute when one is provided. It seems to work that way
without the explicit protection in the tableRow case which is the one I bumped
into.
The documentation for tableRow(attributes) should probably be improved to
indicate the consumer must take charge of zebra striping and how to do it if a
class attribute is provided. Similar for other cases where the default class
provides styling that would otherwise be lost.
When I started to create a fix for the originally stated problem, I realized
that doxia should also skip setting the class if any of the class values it
might want to set ("a" or "b" in the case of tableRow) are already set in the
provided class attribute. That additional complexity suggests the problem is
best solved with documentation updates.
was (Author: fe2417):
This can probably be closed or at least reworded to say the doxia provided
class will be the designated loser which is ensured in some locations by not
setting a class attribute when one is provided. It seems to work that way
without the explicit protection in the tableRow case which is the one I bumped
into.
The documentation for tableRow(attributes) should probably be improved to
indicate the consumer must take charge of zebra striping and how to do it if a
class attribute is provided. Similar for other cases where the default class
provides styling that would otherwise be lost.
When I started to create a fix for the originally stated problem, I realized
that doxia should also skip setting the class if any of the class values it
might want to set ("a" or "b" in the case of tableRow) are already set in the
provided class attribute.
> either provided element class or default class gets ignored.
> ------------------------------------------------------------
>
> Key: DOXIA-590
> URL: https://issues.apache.org/jira/browse/DOXIA-590
> Project: Maven Doxia
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.8
> Reporter: Fred Eckertson
> Priority: Major
>
> The following construct is somewhat common in doxia-core
> att.addAttribute( Attribute.CLASS, "a" );
> The documentation says that basic attributes (including CLASS) are supported.
> However in cases like this either that "a" or the CLASS that was provided in
> the attributes parameter will be ignored. The correct way to do this is to
> append the provided CLASS to "a " if a CLASS attribute was provided.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)