Browse Source

added border supports to buttons

Maggie Cabrera 4 năm trước cách đây
mục cha
commit
9a8acc7eb4

+ 0 - 6
blank-canvas-blocks/assets/ponyfill.css

@@ -452,11 +452,9 @@ p.has-drop-cap:not(:focus):first-letter {
 	font-weight: var(--wp--custom--button--typography--font-weight);
 	font-family: var(--wp--custom--button--typography--font-family);
 	font-size: var(--wp--custom--button--typography--font-size);
-	border-radius: var(--wp--custom--button--border--radius);
 	line-height: var(--wp--custom--button--typography--line-height);
 	text-decoration: none;
 	color: var(--wp--custom--button--color--text);
-	border-color: var(--wp--custom--button--color--text);
 	background-color: var(--wp--custom--button--color--background);
 	padding: calc(.667em + 2px) calc(1.333em + 2px);
 }
@@ -575,11 +573,9 @@ p.has-drop-cap:not(:focus):first-letter {
 	font-weight: var(--wp--custom--button--typography--font-weight);
 	font-family: var(--wp--custom--button--typography--font-family);
 	font-size: var(--wp--custom--button--typography--font-size);
-	border-radius: var(--wp--custom--button--border--radius);
 	line-height: var(--wp--custom--button--typography--line-height);
 	text-decoration: none;
 	color: var(--wp--custom--button--color--text);
-	border-color: var(--wp--custom--button--color--text);
 	background-color: var(--wp--custom--button--color--background);
 	padding: calc(.667em + 2px) calc(1.333em + 2px);
 }
@@ -654,11 +650,9 @@ p.has-drop-cap:not(:focus):first-letter {
 	font-weight: var(--wp--custom--button--typography--font-weight);
 	font-family: var(--wp--custom--button--typography--font-family);
 	font-size: var(--wp--custom--button--typography--font-size);
-	border-radius: var(--wp--custom--button--border--radius);
 	line-height: var(--wp--custom--button--typography--line-height);
 	text-decoration: none;
 	color: var(--wp--custom--button--color--text);
-	border-color: var(--wp--custom--button--color--text);
 	background-color: var(--wp--custom--button--color--background);
 	padding: calc(.667em + 2px) calc(1.333em + 2px);
 	display: inline-block;

+ 8 - 2
blank-canvas-blocks/experimental-theme.json

@@ -127,7 +127,10 @@
 						"lineHeight": 2
 					},
 					"border": {
-						"radius": "4px"
+						"radius": "4px",
+						"width": "0",
+						"style": "solid",
+						"color": "var(--wp--custom--button--color--text)"
 					},
 					"color": {
 						"text": "var(--wp--custom--color--background)",
@@ -319,7 +322,10 @@
 				"lineHeight": "var(--wp--custom--button--typography--line-height)"
 			},
 			"border": {
-				"radius": "var(--wp--custom--button--border--radius)"
+				"radius": "var(--wp--custom--button--border--radius)",
+				"style": "var(--wp--custom--button--border--style)",
+				"width": "var(--wp--custom--button--border--width)",
+				"color": "var(--wp--custom--button--border--color)"
 			}
 		},
 		"core/heading/h1": {

+ 0 - 2
blank-canvas-blocks/sass/blocks/_button.scss

@@ -7,11 +7,9 @@
 	font-weight: var(--wp--custom--button--typography--font-weight);
 	font-family: var(--wp--custom--button--typography--font-family);
 	font-size: var(--wp--custom--button--typography--font-size);
-	border-radius: var(--wp--custom--button--border--radius);
 	line-height: var(--wp--custom--button--typography--line-height);
 	text-decoration: none; // Needed because link styles inside .entry-content add a text decoration
 	color: var(--wp--custom--button--color--text);
-	border-color: var(--wp--custom--button--color--text);
 	background-color: var(--wp--custom--button--color--background);
 	padding: calc(.667em + 2px) calc(1.333em + 2px); //The padding found on an unmodified Button Block 
 	svg {

+ 22 - 2
mayland-blocks/experimental-theme.json

@@ -142,7 +142,10 @@
 						"lineHeight": 2
 					},
 					"border": {
-						"radius": "4px"
+						"radius": "4px",
+						"width": "0",
+						"style": "solid",
+						"color": "var(--wp--custom--button--color--text)"
 					},
 					"color": {
 						"text": "var(--wp--custom--color--background)",
@@ -163,6 +166,14 @@
 						"text": "var(--wp--custom--color--foreground)",
 						"background": "transparent",
 						"boxShadow": "none"
+					},
+					"label": {
+						"typography": {
+							"fontSize": "var(--wp--preset--font-size--tiny)"
+						}
+					},
+					"typography": {
+						"fontSize": "var(--wp--preset--font-size--normal)"
 					}
 				},
 				"paragraph": {
@@ -198,7 +209,13 @@
 					"citation": {
 						"typography": {
 							"fontSize": "var(--wp--preset--font-size--tiny)",
+							"fontFamily": "inherit",
 							"fontStyle": "italic"
+						},
+						"spacing": {
+							"margin": {
+								"top": "var(--wp--custom--margin--vertical)"
+							}
 						}
 					}
 				},
@@ -331,7 +348,10 @@
 				"lineHeight": "var(--wp--custom--button--typography--line-height)"
 			},
 			"border": {
-				"radius": "var(--wp--custom--button--border--radius)"
+				"radius": "var(--wp--custom--button--border--radius)",
+				"style": "var(--wp--custom--button--border--style)",
+				"width": "var(--wp--custom--button--border--width)",
+				"color": "var(--wp--custom--button--border--color)"
 			}
 		},
 		"core/heading/h1": {

+ 8 - 2
seedlet-blocks/experimental-theme.json

@@ -179,7 +179,10 @@
 						"lineHeight": 2
 					},
 					"border": {
-						"radius": "4px"
+						"radius": "4px",
+						"width": "0",
+						"style": "solid",
+						"color": "var(--wp--custom--button--color--text)"
 					},
 					"color": {
 						"text": "var(--wp--custom--color--background)",
@@ -375,7 +378,10 @@
 				"lineHeight": "var(--wp--custom--button--typography--line-height)"
 			},
 			"border": {
-				"radius": "var(--wp--custom--button--border--radius)"
+				"radius": "var(--wp--custom--button--border--radius)",
+				"style": "var(--wp--custom--button--border--style)",
+				"width": "var(--wp--custom--button--border--width)",
+				"color": "var(--wp--custom--button--border--color)"
 			}
 		},
 		"core/heading/h1": {