Jelajahi Sumber

Polishing fixes for RTL, editor styles, and adds colors.

Caroline Moore 6 tahun lalu
induk
melakukan
bc1a51ecc0
3 mengubah file dengan 96 tambahan dan 47 penghapusan
  1. 27 27
      rebalance/blocks.css
  2. 62 13
      rebalance/editor-blocks.css
  3. 7 7
      rebalance/functions.php

+ 27 - 27
rebalance/blocks.css

@@ -127,6 +127,14 @@ p.has-drop-cap:not(:focus)::first-letter {
 	padding-left: 40px;
 }
 
+.rtl .entry-content .wp-block-quote {
+	border-left: 0;
+	border-right: 6px solid #f35029;
+	margin: 0 -40px 1.5em 0;
+	padding-left: 0;
+	padding-right: 40px;
+}
+
 .wp-block-quote cite {
 	font-family: "Libre Baskerville", Georgia, serif;
 	font-style: italic;
@@ -239,7 +247,7 @@ p.has-drop-cap:not(:focus)::first-letter {
 	border: 0;
 }
 
-.wp-block-pullquote blockquote {
+.entry-content .wp-block-pullquote blockquote {
 	border-left: 0;
 	border-bottom: 4px solid #f35029;
 	border-top: 4px solid #f35029;
@@ -249,6 +257,10 @@ p.has-drop-cap:not(:focus)::first-letter {
 	padding: 1.5em;
 }
 
+.rtl .wp-block-pullquote blockquote {
+	border-right: 0;
+}
+
 .wp-block-pullquote cite {
 	color: inherit;
 	font-size: 18px;
@@ -286,6 +298,7 @@ p.has-drop-cap:not(:focus)::first-letter {
 	margin: 0 0 .75em;
 }
 
+
 /*--------------------------------------------------------------
 4.0 Blocks - Layout Elements
 --------------------------------------------------------------*/
@@ -305,6 +318,7 @@ p.has-drop-cap:not(:focus)::first-letter {
 .wp-block-button .wp-block-button__link:hover,
 .wp-block-button .wp-block-button__link:focus {
 	box-shadow: none;
+	text-decoration: none;
 }
 
 .wp-block-button__link:not(.has-background) {
@@ -402,8 +416,8 @@ hr.wp-block-separator {
 	margin-bottom: 0;
 }
 
-.wp-block-latest-posts,
-.rtl .wp-block-latest-posts {
+.wp-block-latest-posts.is-grid,
+.rtl .wp-block-latest-posts.is-grid {
 	margin-left: 0;
 	margin-right: 0;
 }
@@ -416,28 +430,28 @@ hr.wp-block-separator {
 .has-medium-gray-color:hover,
 .has-medium-gray-color:focus,
 .has-medium-gray-color:active {
-	color: #ccc;
+	color: #999;
 }
 
 .has-medium-gray-background-color,
 .has-medium-gray-background-color:hover,
 .has-medium-gray-background-color:focus,
 .has-medium-gray-background-color:active {
-	background-color: #ccc;
+	background-color: #999;
 }
 
 .has-light-gray-color,
 .has-light-gray-color:hover,
 .has-light-gray-color:focus,
 .has-light-gray-color:active {
-	color: #dddddd;
+	color: #ccc;
 }
 
 .has-light-gray-background-color,
 .has-light-gray-background-color:hover,
 .has-light-gray-background-color:focus,
 .has-light-gray-background-color:active {
-	background-color: #dddddd;
+	background-color: #ccc;
 }
 
 .has-white-color,
@@ -472,54 +486,40 @@ hr.wp-block-separator {
 .has-dark-red-color:hover,
 .has-dark-red-color:focus,
 .has-dark-red-color:active {
-	color: #712012;
+	color: #aa2e11;
 }
 
 .has-dark-red-background-color,
 .has-dark-red-background-color:hover,
 .has-dark-red-background-color:focus,
 .has-dark-red-background-color:active {
-	background-color: #712012;
-}
-
-.has-gray-color,
-.has-gray-color:hover,
-.has-gray-color:focus,
-.has-gray-color:active {
-	color: #85cc36;
-}
-
-.has-gray-background-color,
-.has-gray-background-color:hover,
-.has-gray-background-color:focus,
-.has-gray-background-color:active {
-	background-color: #85cc36;
+	background-color: #aa2e11;
 }
 
 .has-dark-gray-color,
 .has-dark-gray-color:hover,
 .has-dark-gray-color:focus,
 .has-dark-gray-color:active {
-	color: #787065;
+	color: #666;
 }
 
 .has-dark-gray-background-color,
 .has-dark-gray-background-color:hover,
 .has-dark-gray-background-color:focus,
 .has-dark-gray-background-color:active {
-	background-color: #787065;
+	background-color: #666;
 }
 
 .has-black-color,
 .has-black-color:hover,
 .has-black-color:focus,
 .has-black-color:active {
-	color: #222;
+	color: #000;
 }
 
 .has-black-background-color,
 .has-black-background-color:hover,
 .has-black-background-color:focus,
 .has-black-background-color:active {
-	background-color: #222;
+	background-color: #000;
 }

+ 62 - 13
rebalance/editor-blocks.css

@@ -72,6 +72,7 @@
 .edit-post-visual-editor h4,
 .edit-post-visual-editor h5,
 .edit-post-visual-editor h6 {
+	clear: both;
 	font-family: "Libre Baskerville", Georgia, serif;
 	font-weight: 700;
 	margin-bottom: .5em;
@@ -116,7 +117,7 @@
 /* Main column width */
 
 .wp-block {
-	max-width: 828px; /* 798px + 30px to account for padding */
+	max-width: 789px; /* 759px + 30px to account for padding */
 }
 
 /* Link styles */
@@ -232,6 +233,15 @@
 	padding-left: 40px;
 }
 
+.rtl .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large),
+.rtl .editor-block-list__block .wp-block-quote {
+	border-left: 0;
+	border-right: 6px solid #f35029;
+	margin: 0 -40px 1.5em 0;
+	padding-left: 0;
+	padding-right: 40px;
+}
+
 .edit-post-visual-editor .editor-block-list__block blockquote p:not(.wp-block-cover-text) {
 	font-family: "Libre Baskerville", Georgia, serif;
 	font-style: italic;
@@ -278,6 +288,15 @@
 	font-size: 24px;
 }
 
+.rtl .wp-block-quote.is-large,
+.rtl .wp-block-quote.is-style-large {
+	border-left: 0;
+	border-right: 6px solid #f35029;
+	margin: 0 -40px 1.5em 0;
+	padding-left: 0;
+	padding-right: 40px;
+}
+
 .edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-large,
 .edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-style-large,
 .edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-large p,
@@ -353,8 +372,9 @@
 	padding: 1.6em;
 }
 
-.wp-block-code textarea {
+.wp-block-code .editor-plain-text {
 	background: #ccc;
+	color: #fff;
 }
 
 /* Classic */
@@ -427,6 +447,7 @@
 .wp-block-freeform.block-library-rich-text__tinymce h4,
 .wp-block-freeform.block-library-rich-text__tinymce h5,
 .wp-block-freeform.block-library-rich-text__tinymce h6 {
+	clear: both;
 	font-family: "Libre Baskerville", Georgia, serif;
 	font-weight: 700;
 	margin-bottom: .5em;
@@ -457,14 +478,19 @@
 }
 
 .wp-block-freeform.block-library-rich-text__tinymce pre {
-	background: #eee;
-	font-family: Inconsolata, monospace;
+	background: #ccc;
+	color: #fff;
+	font-family: "Courier 10 Pitch", Courier, monospace;
+	font-size: 15px;
+	line-height: 1.6;
+	margin-bottom: 1.6em;
 	max-width: 100%;
 	overflow: auto;
-	padding: .75em;
+	padding: 1.6em;
 }
 
 .wp-block-freeform.block-library-rich-text__tinymce table {
+	border-collapse: collapse;
 	margin: 0 0 1.5em;
 	text-align: left;
 	width: 100%;
@@ -478,21 +504,31 @@
 	background: transparent;
 }
 
-.wp-block-freeform.block-library-rich-text__tinymce table td {
+.wp-block-freeform.block-library-rich-text__tinymce table td,
+.wp-block-freeform.block-library-rich-text__tinymce table th {
 	border: 1px solid #999;
 	word-break: break-word;
 	padding: 10px;
 	text-align: left;
 }
 
-.wp-block-freeform.block-library-rich-text__tinymce table th {
-	border: 1px solid #999;
+.rtl .wp-block-freeform.block-library-rich-text__tinymce table td,
+.rtl .wp-block-freeform.block-library-rich-text__tinymce table th {
+	text-align: right;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce table thead th {
 	word-break: break-word;
 	font-family: "Libre Baskerville", Georgia, serif;
 	font-weight: 400;
 	font-size: 14px;
 	padding: 10px;
-	text-align: left;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce table tbody th {
+	word-break: break-word;
+	font-weight: 700;
+	padding: 10px;
 }
 
 
@@ -607,6 +643,8 @@
 	width: 100%;
 }
 
+
+
 .rtl .editor-block-list__block table.wp-block-table {
 	text-align: right;
 }
@@ -618,19 +656,30 @@
 }
 
 .editor-block-list__block table.wp-block-table th {
-	border: 1px solid #999;
+	text-align: left;
+}
+
+.rtl .editor-block-list__block table.wp-block-table th {
+	text-align: right;
+}
+
+.editor-block-list__block table.wp-block-table thead th {
+	border: 0;
 	word-break: break-word;
 	font-family: "Libre Baskerville", Georgia, serif;
 	font-weight: 400;
 	font-size: 14px;
 	padding: 10px;
-	text-align: left;
 }
 
-.rtl .editor-block-list__block table.wp-block-table th {
-	text-align: right;
+.editor-block-list__block table.wp-block-table tbody th {
+	border: 1px solid #999;
+	word-break: break-word;
+	font-weight: 700;
+	padding: 10px;
 }
 
+
 /*--------------------------------------------------------------
 5.0 Blocks - Layout Elements
 --------------------------------------------------------------*/

+ 7 - 7
rebalance/functions.php

@@ -44,22 +44,22 @@ function rebalance_setup() {
 			array(
 				'name'  => esc_html__( 'Black', 'rebalance' ),
 				'slug' => 'black',
-				'color' => '#192930',
+				'color' => '#000000',
 			),
 			array(
 				'name'  => esc_html__( 'Dark Gray', 'rebalance' ),
 				'slug' => 'dark-gray',
-				'color' => '#474f53',
+				'color' => '#666666',
 			),
 			array(
 				'name'  => esc_html__( 'Medium Gray', 'rebalance' ),
 				'slug' => 'medium-gray',
-				'color' => '#cccccc',
+				'color' => '#999999',
 			),
 			array(
 				'name'  => esc_html__( 'Light Gray', 'rebalance' ),
 				'slug' => 'light-gray',
-				'color' => '#eeece8',
+				'color' => '#cccccc',
 			),
 			array(
 				'name'  => esc_html__( 'White', 'rebalance' ),
@@ -72,9 +72,9 @@ function rebalance_setup() {
 				'color' => '#f35029',
 			),
 			array(
-				'name'  => esc_html__( 'Dark Yellow', 'rebalance' ),
-				'slug' => 'dark-yellow',
-				'color' => '#9c8012',
+				'name'  => esc_html__( 'Dark Red', 'rebalance' ),
+				'slug' => 'dark-red',
+				'color' => '#aa2e11',
 			),
 		)
 	);