Jelajahi Sumber

Optimismo: Prepare for dotorg submission

Takashi Irie 1 tahun lalu
induk
melakukan
90420462d0
4 mengubah file dengan 56 tambahan dan 203 penghapusan
  1. 6 1
      optimismo/readme.txt
  2. 10 11
      optimismo/style.css
  3. 1 1
      optimismo/templates/index.html
  4. 39 190
      optimismo/theme.json

+ 6 - 1
optimismo/readme.txt

@@ -8,7 +8,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
 
 == Description ==
 
-Optimismo is a bold blog theme that allows you to have a big bold message at the front.
+Optimismo is a blog theme with a big bold message at the front.
 
 == Changelog ==
 
@@ -33,3 +33,8 @@ This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU General Public License for more details.
+
+Commissioner Font
+Licensed under SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)
+Source: https://fonts.google.com/specimen/Commissioner
+-- End of Commissioner Font credits --

+ 10 - 11
optimismo/style.css

@@ -3,16 +3,15 @@ Theme Name: Optimismo
 Theme URI: https://wordpress.com/theme/optimismo/
 Author: Automattic
 Author URI: https://automattic.com/
-Description: Optimismo is a bold blog theme that allows you to have a big bold message at the front.
+Description: Optimismo is a blog theme with a big bold message at the front.
 Requires at least: 5.8
-Tested up to: 6.1.1
+Tested up to: 6.3
 Requires PHP: 5.7
 Version: 1.0.1
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
-Template: 
 Text Domain: optimismo
-Tags: blog, news, one-column, wide-blocks, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, rtl-language-support, template-editing, theme-options, threaded-comments, translation-ready
+Tags: blog, one-column, wide-blocks, featured-images, full-site-editing, rtl-language-support, template-editing, threaded-comments, translation-ready
 */
 
 /*
@@ -36,13 +35,12 @@ a {
 }
 
 /*
- * Avatar Block
- * Fix border radius setting for the avatar block
- * https://github.com/WordPress/gutenberg/issues/48253
+ * Navigation Block
+ * Reset the padding from List block
+ * https://github.com/WordPress/gutenberg/issues/50486
  */
-.wp-block-avatar a,
-.wp-block-avatar img {
-	border-radius: inherit;
+.wp-block-navigation ul {
+	padding: unset;
 }
 
 /*
@@ -50,6 +48,7 @@ a {
  * Reset the browser default margins for blockquote element
  * https://github.com/WordPress/gutenberg/issues/44129
  */
-.wp-block-pullquote blockquote {
+.wp-block-pullquote blockquote,
+.wp-block-pullquote p {
 	margin: 0;
 }

+ 1 - 1
optimismo/templates/index.html

@@ -20,7 +20,7 @@
 		<main class="wp-block-group" style="margin-top:var(--wp--preset--spacing--70);margin-bottom:0">
 			<!-- wp:query {"query":{"perPage":"5","pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":null,"parents":[]},"layout":{"type":"constrained"}} -->
 			<div class="wp-block-query">
-				<!-- wp:post-template {"className":"home-post-template"} -->
+				<!-- wp:post-template {"style":{"spacing":{"blockGap":"var:preset|spacing|40"}},"className":"home-post-template"} -->
 					<!-- wp:post-title {"textAlign":"center","isLink":true,"style":{"typography":{"fontStyle":"normal","fontWeight":"500"},"spacing":{"margin":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"fontSize":"small"} /-->
 				<!-- /wp:post-template -->
 			</div>

+ 39 - 190
optimismo/theme.json

@@ -32,143 +32,6 @@
 		},
 		"layout": {
 			"contentSize": "600px",
-			"definitions": {
-				"constrained": {
-					"baseStyles": [
-						{
-							"rules": {
-								"float": "left",
-								"margin-inline-end": "2em",
-								"margin-inline-start": "0"
-							},
-							"selector": " > .alignleft"
-						},
-						{
-							"rules": {
-								"float": "right",
-								"margin-inline-end": "0",
-								"margin-inline-start": "2em"
-							},
-							"selector": " > .alignright"
-						},
-						{
-							"rules": {
-								"margin-left": "auto !important",
-								"margin-right": "auto !important"
-							},
-							"selector": " > .aligncenter"
-						},
-						{
-							"rules": {
-								"margin-left": "auto !important",
-								"margin-right": "auto !important",
-								"max-width": "var(--wp--style--global--content-size)"
-							},
-							"selector": " > :where(:not(.alignleft):not(.alignright):not(.alignfull))"
-						},
-						{
-							"rules": {
-								"max-width": "var(--wp--style--global--wide-size)"
-							},
-							"selector": " > .alignwide"
-						}
-					],
-					"className": "is-layout-constrained",
-					"name": "constrained",
-					"slug": "constrained",
-					"spacingStyles": [
-						{
-							"rules": {
-								"margin-block-end": "0",
-								"margin-block-start": "0"
-							},
-							"selector": " > *"
-						},
-						{
-							"rules": {
-								"margin-block-end": "0",
-								"margin-block-start": null
-							},
-							"selector": " > * + *"
-						}
-					]
-				},
-				"default": {
-					"baseStyles": [
-						{
-							"rules": {
-								"float": "left",
-								"margin-inline-end": "2em",
-								"margin-inline-start": "0"
-							},
-							"selector": " > .alignleft"
-						},
-						{
-							"rules": {
-								"float": "right",
-								"margin-inline-end": "0",
-								"margin-inline-start": "2em"
-							},
-							"selector": " > .alignright"
-						},
-						{
-							"rules": {
-								"margin-left": "auto !important",
-								"margin-right": "auto !important"
-							},
-							"selector": " > .aligncenter"
-						}
-					],
-					"className": "is-layout-flow",
-					"name": "default",
-					"slug": "flow",
-					"spacingStyles": [
-						{
-							"rules": {
-								"margin-block-end": "0",
-								"margin-block-start": "0"
-							},
-							"selector": " > *"
-						},
-						{
-							"rules": {
-								"margin-block-end": "0",
-								"margin-block-start": null
-							},
-							"selector": " > * + *"
-						}
-					]
-				},
-				"flex": {
-					"baseStyles": [
-						{
-							"rules": {
-								"align-items": "center",
-								"flex-wrap": "wrap"
-							},
-							"selector": ""
-						},
-						{
-							"rules": {
-								"margin": "0"
-							},
-							"selector": " > *"
-						}
-					],
-					"className": "is-layout-flex",
-					"displayMode": "flex",
-					"name": "flex",
-					"slug": "flex",
-					"spacingStyles": [
-						{
-							"rules": {
-								"gap": null
-							},
-							"selector": ""
-						}
-					]
-				}
-			},
 			"wideSize": "1200px"
 		},
 		"shadow": {
@@ -457,28 +320,20 @@
 							"textDecoration": "none"
 						}
 					}
-				},
-				"spacing": {
-					"padding": {
-						"left": "var:preset|spacing|40"
-					}
 				}
 			},
 			"core/avatar": {
 				"border": {
 					"radius": "999px"
-				},
-				"typography": {
-					"lineHeight": "0"
 				}
 			},
 			"core/button": {
 				"spacing": {
 					"padding": {
-						"bottom": "16px",
-						"left": "28px",
-						"right": "28px",
-						"top": "18px"
+						"bottom": "1.0625rem",
+						"left": "1.75rem",
+						"right": "1.75rem",
+						"top": "1.0625rem"
 					}
 				},
 				"typography": {
@@ -491,10 +346,10 @@
 						},
 						"spacing": {
 							"padding": {
-								"bottom": "15px",
-								"left": "27px",
-								"right": "27px",
-								"top": "17px"
+								"bottom": "1rem",
+								"left": "1.6875rem",
+								"right": "1.6875rem",
+								"top": "1rem"
 							}
 						}
 					}
@@ -502,11 +357,11 @@
 			},
 			"core/buttons": {
 				"spacing": {
-					"blockGap": "var:preset|spacing|40"
+					"blockGap": "var(--wp--preset--spacing--40)"
 				}
 			},
 			"core/calendar": {
-				"css": ".wp-block-calendar table:where(:not(.has-text-color)) td,.wp-block-calendar table:where(:not(.has-text-color)) th {border-color: var(--wp--preset--color--contrast);}:where(.wp-block-calendar table:not(.has-background) th) {background-color: var(--wp--preset--color--contrast);color: var(--wp--preset--color--base);}"
+				"css": ".wp-block-calendar table:where(:not(.has-text-color)) {color: var(--wp--preset--color--contrast);} .wp-block-calendar table:where(:not(.has-text-color)) td,.wp-block-calendar table:where(:not(.has-text-color)) th {border-color: var(--wp--preset--color--contrast);}:where(.wp-block-calendar table:not(.has-background) th) {background-color: var(--wp--preset--color--contrast);color: var(--wp--preset--color--base);}"
 			},
 			"core/categories": {
 				"elements": {
@@ -520,11 +375,6 @@
 							"textDecoration": "none"
 						}
 					}
-				},
-				"spacing": {
-					"padding": {
-						"left": "var:preset|spacing|40"
-					}
 				}
 			},
 			"core/code": {
@@ -661,7 +511,7 @@
 				"css": " .wp-element-caption{text-align:center;}"
 			},
 			"core/latest-comments": {
-				"css": ".wp-block-latest-comments__comment-date {font-size: var(--wp--preset--font-size--x-small);}.wp-block-latest-comments__comment-excerpt p{font-size: var(--wp--preset--font-size--small);}",
+				"css": " .wp-block-latest-comments__comment-date,.wp-block-latest-comments__comment-excerpt p{font-size: inherit;}.wp-block-latest-comments__comment-excerpt p{margin:0 0 var(--wp--style--block-gap)}",
 				"elements": {
 					"link": {
 						":hover": {
@@ -681,7 +531,7 @@
 				}
 			},
 			"core/latest-posts": {
-				"css": ".wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date {font-size: var(--wp--preset--font-size--x-small);}",
+				"css": " .wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date {font-size: inherit;}.wp-block-latest-posts__post-excerpt{margin:0 0 var(--wp--style--block-gap)}",
 				"elements": {
 					"link": {
 						":hover": {
@@ -703,7 +553,7 @@
 				}
 			},
 			"core/navigation": {
-				"css": ".wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {border-color:var(--wp--preset--color--contrast);} .wp-block-navigation__submenu-container.has-background {padding:0;}",
+				"css": ".wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {border-color:var(--wp--preset--color--contrast);}",
 				"elements": {
 					"link": {
 						":hover": {
@@ -717,7 +567,7 @@
 					}
 				},
 				"typography": {
-					"fontSize": "var:preset|font-size|x-small"
+					"fontSize": "var(--wp--preset--font-size--x-small)"
 				}
 			},
 			"core/page-list": {
@@ -793,7 +643,7 @@
 				}
 			},
 			"core/post-comments-form": {
-				"css": ".wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]), .wp-block-post-comments-form .comment-form textarea {line-height: inherit;}",
+				"css": ".wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]), .wp-block-post-comments-form .comment-form textarea {line-height: inherit;} .wp-block-post-comments-form .form-submit {margin-bottom: 0;}",
 				"spacing": {
 					"margin": {
 						"top": "var(--wp--preset--spacing--70)"
@@ -848,9 +698,6 @@
 					}
 				}
 			},
-			"core/post-template": {
-				"css": ".home-post-template > * + * { margin-top: 16px;}"
-			},
 			"core/post-terms": {
 				"elements": {
 					"link": {
@@ -893,6 +740,7 @@
 					"style": "solid",
 					"width": "1px 0"
 				},
+				"css": ".wp-block-pullquote cite {display:block;margin-top: var(--wp--preset--spacing--50)}",
 				"spacing": {
 					"padding": "var(--wp--preset--spacing--50)"
 				},
@@ -902,6 +750,7 @@
 				}
 			},
 			"core/query-pagination": {
+				"css": ".wp-block-query-pagination .wp-block-query-pagination-next, .wp-block-query-pagination .wp-block-query-pagination-previous, .wp-block-query-pagination .wp-block-query-pagination-numbers {margin-bottom:0;}",
 				"elements": {
 					"link": {
 						":hover": {
@@ -955,7 +804,7 @@
 				}
 			},
 			"core/search": {
-				"css": ".wp-block-search__button-inside .wp-block-search__inside-wrapper {padding: 2px;} :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {background-color: #ffffff;border-color: #949494;} :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input {padding: 0 0 0 var(--wp--preset--spacing--40);} :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-element-button {padding-right: var(--wp--preset--spacing--40);} :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-element-button, :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-element-button {background-color: #ffffff; color: var(--wp--preset--color--primary);} :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-element-button:hover, :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-element-button:focus {background-color: #ffffff;}",
+				"css": " :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {background-color: #ffffff;}",
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--x-small)",
 					"lineHeight": "1"
@@ -978,7 +827,7 @@
 			},
 			"core/site-title": {
 				"color": {
-					"text": "var:preset|color|contrast"
+					"text": "var(--wp--preset--color--contrast)"
 				},
 				"elements": {
 					"link": {
@@ -988,7 +837,7 @@
 							}
 						},
 						"color": {
-							"text": "var:preset|color|contrast"
+							"text": "var(--wp--preset--color--contrast)"
 						},
 						"typography": {
 							"textDecoration": "none"
@@ -1010,7 +859,7 @@
 				}
 			},
 			"core/table": {
-				"css": " + .wp-element-caption {text-align:center;}"
+				"css": " thead{border-bottom-width: 1px;} .wp-block-table tfoot{border-top-width: 1px;} .wp-block-table .wp-element-caption{text-align:center;}"
 			},
 			"core/table-of-contents": {
 				"elements": {
@@ -1030,14 +879,8 @@
 				"css": ".wp-block-tag-cloud.is-style-outline a {border-radius: 999px; padding: 0 1rem;} .wp-block-tag-cloud.is-style-outline a:hover {color: var(--wp--preset--color--base); background-color: var(--wp--preset--color--contrast);}"
 			},
 			"core/term-description": {
-				"css": ".wp-block-term-description p:first-child {margin-top: 0;} .wp-block-term-description p:last-child {margin-bottom: 0;}",
-				"spacing": {
-					"margin": {
-						"top": "0.5rem"
-					}
-				},
 				"typography": {
-					"fontSize": "var:preset|font-size|x-small"
+					"fontSize": "var(--wp--preset--font-size--x-small)"
 				}
 			}
 		},
@@ -1057,6 +900,12 @@
 					"color": {
 						"background": "var(--wp--preset--color--primary)",
 						"text": "var(--wp--preset--color--base)"
+					},
+					"outline": {
+						"color": "var(--wp--preset--color--primary)",
+						"offset": "2px",
+						"style": "dotted",
+						"width": "1px"
 					}
 				},
 				":hover": {
@@ -1074,10 +923,10 @@
 				},
 				"spacing": {
 					"padding": {
-						"bottom": "16px",
-						"left": "28px",
-						"right": "28px",
-						"top": "18px"
+						"bottom": "1.0625rem",
+						"left": "1.75rem",
+						"right": "1.75rem",
+						"top": "1.0625rem"
 					}
 				},
 				"typography": {
@@ -1090,7 +939,7 @@
 			},
 			"caption": {
 				"color": {
-					"text": "var:preset|color|contrast"
+					"text": "var(--wp--preset--color--contrast)"
 				},
 				"spacing": {
 					"margin": {
@@ -1103,7 +952,7 @@
 					}
 				},
 				"typography": {
-					"fontSize": "var:preset|font-size|x-small"
+					"fontSize": "var(--wp--preset--font-size--x-small)"
 				}
 			},
 			"h1": {
@@ -1155,17 +1004,17 @@
 			}
 		},
 		"spacing": {
-			"blockGap": "var:preset|spacing|50",
+			"blockGap": "var(--wp--preset--spacing--50)",
 			"padding": {
 				"bottom": "0",
-				"left": "var:preset|spacing|50",
-				"right": "var:preset|spacing|50",
+				"left": "var(--wp--preset--spacing--50)",
+				"right": "var(--wp--preset--spacing--50)",
 				"top": "0"
 			}
 		},
 		"typography": {
-			"fontFamily": "var:preset|font-family|commissioner",
-			"fontSize": "var:preset|font-size|small",
+			"fontFamily": "var(--wp--preset--font-family--commissioner)",
+			"fontSize": "var(--wp--preset--font-size--small)",
 			"lineHeight": "1.5"
 		}
 	},