scss: add style to have alternate row backgrounds in fields blocks (#45369)
This commit is contained in:
parent
087f262f69
commit
b5dac6b505
|
@ -107,6 +107,10 @@ de classes CSS réutilisables.
|
|||
<td><p><code>pk-error</code></p></td>
|
||||
<td><p>Marque le champ commentaire avec le style de bloc d’erreur.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p><code>pk-blocks-zebra</code></p></td>
|
||||
<td><p>Alterne les couleurs de fond des lignes des blocs de champs.</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -768,3 +768,13 @@ div.section.foldable {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pk-blocks-zebra {
|
||||
// add a gray background for even numbered blocks, but that means odd
|
||||
// childs when the first child is an error.
|
||||
.error ~ .BlockSubWidget:nth-child(odd),
|
||||
.BlockSubWidget:first-child ~ .BlockSubWidget:nth-child(even) {
|
||||
background: hsla(0, 0%, 0%, 0.05);
|
||||
box-shadow: -0.5em -0.5em 0 .5em hsla(0, 0%, 0%, 0.05);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue