From 0e2c6873ebb5a939dd02a0f2696fbc000121167c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@entrouvert.com>
Date: Tue, 26 Oct 2021 14:36:28 +0200
Subject: [PATCH] scss: introduce/use new %cell and %cell-links-list selectors
 (#58200)

---
 static/essonne-cd91/_custom.scss              | 13 +------
 static/fontenay-sous-bois-2018/_custom.scss   | 12 +-----
 static/gpseo/_custom.scss                     | 21 ++--------
 static/haute-garonne-cd31/_custom.scss        | 12 +-----
 static/includes/_cells.scss                   | 38 ++++++++++++-------
 static/marseille/_custom.scss                 | 10 +----
 static/montpellier/_custom.scss               |  6 +--
 static/quimper/_custom.scss                   |  6 +--
 static/roannais-icitoyen/_custom.scss         | 13 +------
 static/sables-d-olonne/_custom.scss           | 12 +-----
 static/saone-et-loire-cd71-2019/_custom.scss  | 12 +-----
 static/thonon-agglomeration-2021/_custom.scss | 10 +----
 static/vandoeuvre-les-nancy-2021/_custom.scss | 10 +----
 static/venissieux/_custom.scss                | 12 +-----
 static/villeneuve-dascq/_custom.scss          | 11 +-----
 15 files changed, 41 insertions(+), 157 deletions(-)

diff --git a/static/essonne-cd91/_custom.scss b/static/essonne-cd91/_custom.scss
index 23163be4..23e088d5 100644
--- a/static/essonne-cd91/_custom.scss
+++ b/static/essonne-cd91/_custom.scss
@@ -67,18 +67,7 @@ div#nav {
 
 // Links list
 #main-content {
-    div#rub_service div.category ul,
-    div#services > ul > li > ul,
-    div#account-management ul,
-    div.links-list ul,
-    div.menucell ul,
-    div.wcsformcell,
-    div.notificationscell ul,
-    div.categoriescell ul,
-    div.link-list-cell ul,
-    div.wcsformsofcategorycell ul,
-    div.wcscurrentdraftscell ul,
-    div.wcscurrentformscell ul {
+    %cell-links-list {
         background-color: $gray-lighter;
         & > li {
             border-bottom-width: 3px !important;
diff --git a/static/fontenay-sous-bois-2018/_custom.scss b/static/fontenay-sous-bois-2018/_custom.scss
index c997fda9..cd9a37c5 100644
--- a/static/fontenay-sous-bois-2018/_custom.scss
+++ b/static/fontenay-sous-bois-2018/_custom.scss
@@ -286,17 +286,7 @@ button {
 }
 
 div#content {
-	div#rub_service div.category ul,
-	div#services > ul > li > ul,
-	div#account-management ul,
-	div.links-list ul,
-	div.menucell ul,
-	div.wcsformcell,
-	div.notificationscell ul,
-	div.categoriescell ul,
-	div.wcsformsofcategorycell ul,
-	div.wcscurrentdraftscell ul,
-	div.wcscurrentformscell ul {
+	%cell-links-list {
 		a {
 			color: #888;
 			padding: 0.5rem 0.5rem;
diff --git a/static/gpseo/_custom.scss b/static/gpseo/_custom.scss
index 080e33e8..8cb266d6 100644
--- a/static/gpseo/_custom.scss
+++ b/static/gpseo/_custom.scss
@@ -264,12 +264,8 @@ main {
 
 
 // CELLS & tracking code
-div.a2-continue,
-div#services > ul > li,
-div.a2-block,
-.gru-content div.cell,
-div.block,
-#tracking-code {
+#tracking-code,
+%cell {
 	box-shadow: $gpseo-shadow;
 	margin-bottom: 20px;
 
@@ -414,18 +410,7 @@ div#tracking-code {
 }
 
 // LINKS LIST
-div#rub_service div.category ul,
-div#services > ul > li > ul,
-div#account-management ul,
-div.links-list ul,
-div.menucell ul,
-div.wcsformcell,
-div.notificationscell ul,
-div.categoriescell ul,
-div.link-list-cell ul,
-div.wcsformsofcategorycell ul,
-div.wcscurrentdraftscell ul,
-div.wcscurrentformscell ul {
+%cell-links-list {
 	& > li {
 		> a {
 			display: block;
diff --git a/static/haute-garonne-cd31/_custom.scss b/static/haute-garonne-cd31/_custom.scss
index f76348fb..d64b20f8 100644
--- a/static/haute-garonne-cd31/_custom.scss
+++ b/static/haute-garonne-cd31/_custom.scss
@@ -223,17 +223,7 @@ div.gru-content div.cell {
 	}
 }
 
-div#rub_service div.category ul,
-div#services > ul > li > ul,
-div#account-management ul,
-div.links-list ul,
-div.menucell ul,
-div.wcsformcell,
-div.notificationscell ul,
-div.categoriescell ul,
-div.wcsformsofcategorycell ul,
-div.wcscurrentdraftscell ul,
-div.wcscurrentformscell ul {
+%cell-links-list {
 	& > li > a {
 		padding: 0.5rem 1rem 0.5rem 2rem;
 		&::before {
diff --git a/static/includes/_cells.scss b/static/includes/_cells.scss
index 705db6e8..488a37e8 100644
--- a/static/includes/_cells.scss
+++ b/static/includes/_cells.scss
@@ -78,11 +78,7 @@ div#sidebar + div#columns {
 	}
 }
 
-div.a2-continue,
-div#services > ul > li,
-div.a2-block,
-.gru-content .cell,
-.block {
+%cell {
 	text-align: left;
 	background: $cell-background;
 	color: $cell-color;
@@ -90,6 +86,14 @@ div.a2-block,
 	border-radius: $cell-border-radius;
 }
 
+div.a2-continue,
+div#services > ul > li,
+div.a2-block,
+.gru-content .cell,
+.block {
+	@extend %cell;
+}
+
 .column div.a2-block,
 .gru-content div.cell,
 .block {
@@ -152,15 +156,7 @@ div.links-list p {
 	margin: 1em;
 }
 
-div#rub_service div.category ul,
-div#services > ul > li > ul,
-div#account-management ul,
-div.links-list ul,
-div.menucell ul,
-div.wcsformcell,
-div.categoriescell ul,
-div.wcscurrentdraftscell ul,
-div.wcscurrentformscell ul {
+%cell-links-list {
 	padding: 0;
 	margin: 0;
 	list-style: none;
@@ -261,6 +257,20 @@ div.wcscurrentformscell ul {
 	}
 }
 
+div#rub_service div.category ul,
+div#services > ul > li > ul,
+div#account-management ul,
+.cell:not(.pk-button) div.links-list ul,
+div.menucell ul,
+div.wcsformcell,
+div.categoriescell ul,
+div.link-list-cell ul,
+div.wcsformsofcategorycell ul,
+div.wcscurrentdraftscell ul,
+div.wcscurrentformscell ul {
+	@extend %cell-links-list;
+}
+
 .gru-content div.link-list-cell.has-asset-picture,
 .gru-content div.wcsformsofcategorycell.has-asset-picture {
 	picture img {
diff --git a/static/marseille/_custom.scss b/static/marseille/_custom.scss
index c4957869..793fb5f3 100644
--- a/static/marseille/_custom.scss
+++ b/static/marseille/_custom.scss
@@ -156,15 +156,7 @@ div#main-content-wrapper {
 }
 
 // Links-list
-div#rub_service div.category ul,
-div#services > ul > li > ul,
-div#account-management ul,
-div.links-list ul,
-div.menucell ul,
-div.wcsformcell,
-div.categoriescell ul,
-div.wcscurrentdraftscell ul,
-div.wcscurrentformscell ul {
+%cell-links-list {
 	& > li {
 		> a {
 			padding-left: 2rem;
diff --git a/static/montpellier/_custom.scss b/static/montpellier/_custom.scss
index 159f69d9..8ff8e965 100644
--- a/static/montpellier/_custom.scss
+++ b/static/montpellier/_custom.scss
@@ -1,10 +1,6 @@
 /* general stuff */
 
-div.a2-continue,
-div#services > ul > li,
-div.a2-block,
-.gru-content div.cell,
-div.block {
+%cell {
 	overflow: visible;
 }
 
diff --git a/static/quimper/_custom.scss b/static/quimper/_custom.scss
index cdd1f174..fd0ea92a 100644
--- a/static/quimper/_custom.scss
+++ b/static/quimper/_custom.scss
@@ -7,11 +7,7 @@ $remote-font-path: 'https://perso.entrouvert.org/~fred/quimper/';
 		url('#{$remote-font-path}/geometric_231_heavy_bt-webfont.ttf') format('truetype');
 }
 
-div.a2-continue,
-div#services > ul > li,
-div.a2-block,
-.gru-content div.cell,
-div.block {
+%cell {
 	overflow: visible;
 }
 
diff --git a/static/roannais-icitoyen/_custom.scss b/static/roannais-icitoyen/_custom.scss
index 39826444..c2ab8766 100644
--- a/static/roannais-icitoyen/_custom.scss
+++ b/static/roannais-icitoyen/_custom.scss
@@ -457,18 +457,7 @@ div#services > ul > li,
 
 
 // Links-list
-div#rub_service div.category ul,
-div#services > ul > li > ul,
-div#account-management ul,
-.cell:not(.pk-button) div.links-list ul,
-div.menucell ul,
-div.wcsformcell,
-div.notificationscell ul,
-div.categoriescell ul,
-div.link-list-cell ul,
-div.wcsformsofcategorycell ul,
-div.wcscurrentdraftscell ul,
-div.wcscurrentformscell ul {
+%cell-links-list {
 	& > li {
 		font-weight: bold;
 		color: $gray;
diff --git a/static/sables-d-olonne/_custom.scss b/static/sables-d-olonne/_custom.scss
index 00bb0d29..db0c7dcc 100644
--- a/static/sables-d-olonne/_custom.scss
+++ b/static/sables-d-olonne/_custom.scss
@@ -458,15 +458,7 @@ div.text-cell.cyan {
 
 // Links-list {
 .gru-content {
-	div#rub_service div.category ul,
-	div#services > ul > li > ul,
-	div#account-management ul,
-	div.links-list ul,
-	div.menucell ul,
-	div.wcsformcell,
-	div.categoriescell ul,
-	div.wcscurrentdraftscell ul,
-	div.wcscurrentformscell ul {
+	%cell-links-list {
 		& > li {
 			position: relative;
 			padding-left: 2em;
@@ -678,4 +670,4 @@ div#gauche {
 			display: inline-block;
 		}
 	}
-}
\ No newline at end of file
+}
diff --git a/static/saone-et-loire-cd71-2019/_custom.scss b/static/saone-et-loire-cd71-2019/_custom.scss
index 88209a1b..66404f72 100644
--- a/static/saone-et-loire-cd71-2019/_custom.scss
+++ b/static/saone-et-loire-cd71-2019/_custom.scss
@@ -334,17 +334,7 @@ div.apa-user {
 }
 
 .gru-content {
-	div#rub_service div.category ul,
-	div#services > ul > li > ul,
-	div#account-management ul,
-	div.links-list ul,
-	div.menucell ul,
-	div.wcsformcell,
-	div.notificationscell ul,
-	div.categoriescell ul,
-	div.wcsformsofcategorycell ul,
-	div.wcscurrentdraftscell ul,
-	div.wcscurrentformscell ul {
+	%cell-links-list {
 		li a:not(.add-more-items--button) {
 			padding-left: 1rem;
 			&::before {
diff --git a/static/thonon-agglomeration-2021/_custom.scss b/static/thonon-agglomeration-2021/_custom.scss
index 642956c1..11af3575 100644
--- a/static/thonon-agglomeration-2021/_custom.scss
+++ b/static/thonon-agglomeration-2021/_custom.scss
@@ -342,15 +342,7 @@ $cell-additional-padding : 10px;
 
 // links-lists
 .gru-content {
-	div#rub_service div.category ul,
-	div#services > ul > li > ul,
-	div#account-management ul,
-	div.links-list ul,
-	div.menucell ul,
-	div.wcsformcell,
-	div.categoriescell ul,
-	div.wcscurrentdraftscell ul,
-	div.wcscurrentformscell ul {
+	%cell-links-list {
 		& > li > a {
 			padding: 0.5rem 2rem 0.5rem 2.5rem;
 			position: relative;
diff --git a/static/vandoeuvre-les-nancy-2021/_custom.scss b/static/vandoeuvre-les-nancy-2021/_custom.scss
index 86927320..0707bb78 100644
--- a/static/vandoeuvre-les-nancy-2021/_custom.scss
+++ b/static/vandoeuvre-les-nancy-2021/_custom.scss
@@ -203,15 +203,7 @@ h3 {
 	}
 }
 
-div#rub_service div.category ul,
-div#services > ul > li > ul,
-div#account-management ul,
-div.links-list ul,
-div.menucell ul,
-div.wcsformcell,
-div.categoriescell ul,
-div.wcscurrentdraftscell ul,
-div.wcscurrentformscell ul {
+%cell-links-list {
 	& > li > a {
 		padding-left: 2em;
 		position: relative;
diff --git a/static/venissieux/_custom.scss b/static/venissieux/_custom.scss
index 3f104d3a..8c2922c2 100644
--- a/static/venissieux/_custom.scss
+++ b/static/venissieux/_custom.scss
@@ -198,17 +198,7 @@ div#section-une {
 	}
 }
 
-div#rub_service div.category ul,
-div#services > ul > li > ul,
-div#account-management ul,
-div.links-list ul,
-div.menucell ul,
-div.wcsformcell,
-div.notificationscell ul,
-div.categoriescell ul,
-div.wcsformsofcategorycell ul,
-div.wcscurrentdraftscell ul,
-div.wcscurrentformscell ul {
+%cell-links-list {
 	li {
 		&:last-child::after {
 			content: none;
diff --git a/static/villeneuve-dascq/_custom.scss b/static/villeneuve-dascq/_custom.scss
index 059c577c..5ceba5c0 100644
--- a/static/villeneuve-dascq/_custom.scss
+++ b/static/villeneuve-dascq/_custom.scss
@@ -329,16 +329,7 @@ div.cell {
 //
 // Links List
 //
-div#rub_service div.category ul,
-div#services > ul > li > ul,
-div#account-management ul,
-div.links-list ul,
-div.menucell ul,
-div.wcsformcell,
-div.categoriescell ul,
-div.link-list-cell ul,
-div.wcscurrentdraftscell ul,
-div.wcscurrentformscell ul {
+%cell-links-list {
 	padding: 0 $theme-gutter-mobile;
 
 	& > li > a {
-- 
2.33.1

