Projet

Général

Profil

0001-scss-add-style-to-have-alternate-row-backgrounds-in-.patch

Frédéric Péters, 02 février 2021 16:12

Télécharger (1,84 ko)

Voir les différences:

Subject: [PATCH 1/2] scss: add style to have alternate row backgrounds in
 fields blocks (#45369)

 help/fr/misc-css-classes.page  |  4 ++++
 static/includes/wcs/_bulk.scss | 29 +++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
help/fr/misc-css-classes.page
107 107
  <td><p><code>pk-error</code></p></td>
108 108
  <td><p>Marque le champ commentaire avec le style de bloc d’erreur.</p></td>
109 109
 </tr>
110
 <tr>
111
  <td><p><code>pk-blocks-zebra</code></p></td>
112
   <td><p>Alterne les couleurs de fond des lignes des blocs de champs.</p></td>
113
 </tr>
110 114
</table>
111 115
</section>
112 116

  
static/includes/wcs/_bulk.scss
749 749
		}
750 750
	}
751 751
}
752

  
753
.pk-blocks-zebra {
754
	.BlockSubWidget {
755
		@include clearfix();
756
		position: relative;
757
	}
758
	// add a gray background for even numbered blocks, but that means odd
759
	// childs when the first child is an error.
760
	.error ~ .BlockSubWidget:nth-child(odd),
761
	.BlockSubWidget:first-child ~ .BlockSubWidget:nth-child(even) {
762
		background: #eee;
763
		outline: 1em solid #f0f0f0;
764
		div.widget:last-child {
765
			margin-bottom: 0;
766
		}
767
	}
768
}
769

  
770
.form-validation .pk-blocks-zebra {
771
	.BlockSubWidget:not(:last-child) {
772
		border-bottom: 1px solid #ddd;
773
	}
774
	.BlockSubWidget {
775
		outline: none !important;
776
		div.widget:last-child {
777
			margin-bottom: 1.5em !important;
778
		}
779
	}
780
}
752
-