Переглянути джерело

Blockbase: Move table stripes to Blockbase (#5115)

* Blockbase: Move table stripes to Blockbase

* Remove unneeded code

* rebuild css

* rebuild all

* give the tertiary color a bit more contrast
Ben Dwyer 3 роки тому
батько
коміт
7f5e587c78

+ 5 - 0
blockbase/assets/ponyfill.css

@@ -900,6 +900,7 @@ p.wp-block-site-tagline {
 
 .wp-block-table.is-style-stripes figcaption,
 .wp-block-table figcaption {
+	color: var(--wp--preset--color--primary);
 	font-size: var(--wp--custom--table--figcaption--typography--font-size);
 	text-align: center;
 }
@@ -911,6 +912,10 @@ p.wp-block-site-tagline {
 	padding: calc(0.5*var(--wp--custom--gap--vertical)) calc(0.5*var(--wp--custom--gap--horizontal));
 }
 
+.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
+	background-color: var(--wp--preset--color--tertiary);
+}
+
 .wp-block-video figcaption {
 	margin: var(--wp--custom--video--caption--margin);
 	text-align: var(--wp--custom--video--caption--text-align);

+ 9 - 0
blockbase/sass/blocks/_table.scss

@@ -1,6 +1,7 @@
 .wp-block-table.is-style-stripes,
 .wp-block-table {
 	figcaption { // See https://github.com/WordPress/gutenberg/issues/34650
+		color: var(--wp--preset--color--primary);
 		font-size: var(--wp--custom--table--figcaption--typography--font-size);
 		text-align: center;
 	}
@@ -13,3 +14,11 @@
 
 	border-bottom: none;
 }
+
+.wp-block-table.is-style-stripes {
+	tbody {
+		tr:nth-child(odd) {
+			background-color: var(--wp--preset--color--tertiary);
+		}
+	}
+}

+ 1 - 1
blockbase/theme.json

@@ -68,7 +68,7 @@
 				},
 				{
 					"slug": "tertiary",
-					"color": "#FAFAFA",
+					"color": "#F0F0F0",
 					"name": "Tertiary"
 				}
 			]

+ 0 - 9
geologist/assets/theme.css

@@ -280,15 +280,6 @@ ul ul {
 	border-bottom-width: 1px;
 }
 
-.wp-block-table.is-style-stripes figcaption,
-.wp-block-table figcaption {
-	color: var(--wp--preset--color--primary);
-}
-
-.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
-	background-color: var(--wp--preset--color--tertiary);
-}
-
 .wp-block-pullquote {
 	text-indent: -0.5ch;
 }

+ 0 - 14
geologist/sass/blocks/_table.scss

@@ -1,6 +1,5 @@
 .wp-block-table.is-style-stripes,
 .wp-block-table {
-
 	th {
 		font-weight: 400;
 	}
@@ -19,17 +18,4 @@
 	tr:last-child td {
 		border-bottom-width: 1px;
 	}
-
-	figcaption {
-		color: var(--wp--preset--color--primary);
-	}
-
 }
-
-.wp-block-table.is-style-stripes {
-	tbody {
-		tr:nth-child(odd) {
-			background-color: var(--wp--preset--color--tertiary);
-		}
-	}
-}

+ 0 - 9
quadrat/assets/theme.css

@@ -454,15 +454,6 @@ ul ul {
 	border-bottom-width: 1px;
 }
 
-.wp-block-table.is-style-stripes figcaption,
-.wp-block-table figcaption {
-	color: var(--wp--preset--color--primary);
-}
-
-.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
-	background-color: var(--wp--preset--color--tertiary);
-}
-
 .wp-block-pullquote.is-style-solid-color {
 	padding: var(--wp--custom--gap--horizontal);
 }

+ 4 - 4
quadrat/package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "quadrat",
-  "version": "1.1.25",
+  "version": "1.1.28",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -428,9 +428,9 @@
       }
     },
     "caniuse-lite": {
-      "version": "1.0.30001216",
-      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001216.tgz",
-      "integrity": "sha512-1uU+ww/n5WCJRwUcc9UH/W6925Se5aNnem/G5QaSDga2HzvjYMs8vRbekGUN/PnTZ7ezTHcxxTEb9fgiMYwH6Q==",
+      "version": "1.0.30001283",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001283.tgz",
+      "integrity": "sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg==",
       "dev": true
     },
     "caseless": {

+ 0 - 14
quadrat/sass/blocks/_table.scss

@@ -1,6 +1,5 @@
 .wp-block-table.is-style-stripes,
 .wp-block-table {
-
 	th {
 		font-weight: 400;
 	}
@@ -19,17 +18,4 @@
 	tr:last-child td {
 		border-bottom-width: 1px;
 	}
-
-	figcaption {
-		color: var(--wp--preset--color--primary);
-	}
-
 }
-
-.wp-block-table.is-style-stripes {
-	tbody {
-		tr:nth-child(odd) {
-			background-color: var(--wp--preset--color--tertiary);
-		}
-	}
-}

+ 0 - 9
zoologist/assets/theme.css

@@ -281,15 +281,6 @@ ul ul {
 	border-bottom-width: 1px;
 }
 
-.wp-block-table.is-style-stripes figcaption,
-.wp-block-table figcaption {
-	color: var(--wp--preset--color--primary);
-}
-
-.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
-	background-color: var(--wp--preset--color--tertiary);
-}
-
 .wp-block-pullquote {
 	text-indent: -0.5ch;
 }

+ 0 - 14
zoologist/sass/blocks/_table.scss

@@ -1,6 +1,5 @@
 .wp-block-table.is-style-stripes,
 .wp-block-table {
-
 	th {
 		font-weight: 400;
 	}
@@ -19,17 +18,4 @@
 	tr:last-child td {
 		border-bottom-width: 1px;
 	}
-
-	figcaption {
-		color: var(--wp--preset--color--primary);
-	}
-
 }
-
-.wp-block-table.is-style-stripes {
-	tbody {
-		tr:nth-child(odd) {
-			background-color: var(--wp--preset--color--tertiary);
-		}
-	}
-}