瀏覽代碼

[Livre] Refine site title treatment (#5268)

* Try all-caps text in the header.

* Add "tiny" font size.

* Write more specific CSS.

* Use x-small instead of tiny.

* Update screenshot.jpg
Kjell Reigstad 3 年之前
父節點
當前提交
265fc3cde5
共有 4 個文件被更改,包括 21 次插入12 次删除
  1. 2 2
      livre/parts/header.html
  2. 二進制
      livre/screenshot.jpg
  3. 14 9
      livre/style.css
  4. 5 1
      livre/theme.json

+ 2 - 2
livre/parts/header.html

@@ -4,5 +4,5 @@
 <!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
 <!-- /wp:navigation -->
 
-<!-- wp:site-title {"style":{"typography":{"fontStyle":"italic","fontWeight":"400"}}} /--></div>
-<!-- /wp:group -->
+<!-- wp:site-title {"style":{"spacing":{"padding":{"top":"0.35ch"}},"typography":{"textTransform":"uppercase"}}} /--></div>
+<!-- /wp:group -->

二進制
livre/screenshot.jpg


+ 14 - 9
livre/style.css

@@ -82,20 +82,20 @@ a:active {
 .wp-block-file .wp-block-file__button:hover,
 .wp-block-button__link:hover {
 	opacity: 0.90;
-} 
+}
 
-.wp-block-button__link:hover, .wp-block-button__link:focus, 
+.wp-block-button__link:hover, .wp-block-button__link:focus,
 .wp-block-button__link:active, .wp-block-button__link:visited {
 	color: initial;
 }
 
 /*
  * Alignment styles.
- * These rules are temporary, and should not be relied on or 
- * modified too heavily by themes or plugins that build on 
- * Livre. These are meant to be a precursor to 
- * a global solution provided by the Block Editor. 
- * 
+ * These rules are temporary, and should not be relied on or
+ * modified too heavily by themes or plugins that build on
+ * Livre. These are meant to be a precursor to
+ * a global solution provided by the Block Editor.
+ *
  * Relevant issues:
  * https://github.com/WordPress/gutenberg/issues/35607
  * https://github.com/WordPress/gutenberg/issues/35884
@@ -144,6 +144,9 @@ body > .is-root-container,
 	text-decoration: underline;
 }
 
+.wp-block-site-title[style*="text-transform:uppercase"] {
+	letter-spacing: 0.15em;
+}
 /*
  * Comment form cleanup.
  */
@@ -178,7 +181,9 @@ input:not([type="submit"]):not([type="button"]):focus {
 
 .wp-block-post-comments .navigation + .comment-respond {
 	margin-top: calc(3 * var(--wp--style--block-gap));
-}/*
+}
+
+/*
  * Drop cap refinements.
  */
 
@@ -186,4 +191,4 @@ input:not([type="submit"]):not([type="button"]):focus {
 	font-size: 3.15em;
 	font-weight: 300;
 	margin: 0.25em 0.125em 0 0;
-}
+}

+ 5 - 1
livre/theme.json

@@ -76,6 +76,10 @@
 				}
 			],
 			"fontSizes": [
+				{
+					"size": "1rem",
+					"slug": "x-small"
+				},
 				{
 					"size": "1.125rem",
 					"slug": "small"
@@ -152,7 +156,7 @@
 				"typography": {
 					"fontFamily": "var(--wp--preset--font-family--newsreader)",
 					"lineHeight": "var(--wp--custom--typography--line-height--normal)",
-					"fontSize": "var(--wp--preset--font-size--small)",
+					"fontSize": "var(--wp--preset--font-size--x-small)",
 					"fontWeight": "normal"
 				}
 			}