[
https://issues.apache.org/jira/browse/DOXIA-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17680828#comment-17680828
]
Fred Eckertson commented on DOXIA-590:
--------------------------------------
Please try the example below. The third and fourth rows in the displayed table
end up with the same color which is wrong.
As I stated, the even/odd css selector does not work for zebra striping when
hidden rows are involved.
example.css
{code:java}
table, th, td {
border: 1px solid;
border-collapse: collapse;
}
.hidden {
display: none;
}
tbody > tr > td {
background-color: mediumslateblue;
}
tbody > tr:nth-child(odd) > td {
background-color: lightsteelblue;
} {code}
{code:java}
<!DOCTYPE HTML>
<html>
<head>
<title>Experiment</title>
<link rel="stylesheet" type="text/css" href="./example.css">
</head>
<body>
<div>
<table>
<thead>
<tr>
<td>name</td>
<td>id</td>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>1</td>
</tr>
<tr>
<td>B</td>
<td>2</td>
</tr>
<tr>
<td>C</td>
<td>3</td>
</tr>
<tr class='hidden'>
<td>D</td>
<td>4</td>
</tr>
<tr>
<td>E</td>
<td>5</td>
</tr>
<tr>
<td>F</td>
<td>6</td>
</tr>
</tbody>
</table>
</div>
</body>
</html> {code}
> 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
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 2.0.0-M3
>
> Attachments: image-2022-05-18-21-57-40-619.png,
> image-2023-01-20-18-32-31-967.png
>
>
> 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
(v8.20.10#820010)