Kaynağa Gözat

Fix Gutenberg block and editor styles

Chris Runnells 6 yıl önce
ebeveyn
işleme
1144491a1f

+ 32 - 9
radcliffe-2/assets/css/blocks.css

@@ -96,13 +96,22 @@ p.alignfull {
 .has-drop-cap {}
 
 /* Images */
-.wp-block-image {
-	display: inline-block; /* helps with smaller, unaligned images */
+.wp-block-image {}
+
+.wp-block-image figure {
+	margin-top: 0;
 }
 
 .wp-block-image img {
 	display: block;
-	width: 100%;
+}
+
+.wp-block-image .alignleft {
+	margin-right: 1.6em;
+}
+
+.wp-block-image .alignright {
+	margin-left: 1.6em;
 }
 
 .wp-block-image.alignwide {}
@@ -214,28 +223,38 @@ ul.wp-block-gallery li {
 /* Verse */
 .wp-block-verse {
 	background-color: transparent;
-	font-family: "Alegreya", Georgia, "Times New Roman", serif;
+	font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Times, "Times New Roman", serif;
 	font-size: 1.1em;
 	font-style: italic;
+	line-height: 1.8;
 	padding: 0;
 }
 
 /* Separator */
 .wp-block-separator {
 	border: none;
-	max-width: none;
+	max-width: 100px;
 	margin: 1.6em auto;
 }
 
+.wp-block-separator.is-style-wide {
+	max-width: 100%;
+}
+
 /* Buttons */
+.wp-block-file .wp-block-file__button,
 .wp-block-button .wp-block-button__link {
 	background: #222;
 	border-radius: 3px;
 	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif;
 	font-size: 1.4rem;
 	font-size: 14px;
+	line-height: 1.29;
+	padding: 9px 18px;
 }
 
+.wp-block-file a:hover,
+.wp-block-file a:focus,
 .wp-block-button a:hover,
 .wp-block-button a:focus {
 	opacity: 1.0;
@@ -252,6 +271,8 @@ ul.wp-block-gallery li {
 	text-decoration: none;
 }
 
+.wp-block-file__button:hover,
+.wp-block-file__button:focus,
 .wp-block-button__link:not(.has-background):hover,
 .wp-block-button__link:not(.has-background):focus {
 	background: #ca2017;
@@ -306,20 +327,22 @@ ul.wp-block-gallery li {
 	border: 0;
 }
 
-/* Categories */
+/* Widget blocks */
 .wp-block-categories {}
 
-.wp-block-categories-list ul,
-.wp-block-categories-list li {
+.wp-block-archives,
+.wp-block-latest-comments,
+.wp-block-categories-list {
 	list-style: none;
-	margin: 0;
 	padding: 0;
 }
 
+.wp-block-archives li,
 .wp-block-categories-list li {
 	padding: 0.25em 0;
 }
 
+.wp-block-archives li:not(:last-child),
 .wp-block-categories-list li:not(:last-child) {
 	border-bottom: 1px solid rgba(0,0,0,0.075);
 }

+ 24 - 9
radcliffe-2/assets/css/editor-style.css

@@ -5,9 +5,11 @@ Editor Styles for Radcliffe 2
 /* Widths */
 
 @media screen and ( min-width: 788px ) {
-	.edit-post-visual-editor .editor-post-title,
-	.edit-post-visual-editor .editor-block-list__block {
-		max-width:	768px;
+	/* Main column width */
+	body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block,
+	body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender,
+	body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block {
+	    max-width: 770px; /* 740px + 30px for editor block margins */
 	}
 }
 
@@ -21,7 +23,8 @@ Editor Styles for Radcliffe 2
 .edit-post-visual-editor input,
 .edit-post-visual-editor select,
 .edit-post-visual-editor optgroup,
-.edit-post-visual-editor textarea {
+.edit-post-visual-editor textarea,
+.edit-post-visual-editor blockquote {
 	color: #222;
 	font-family: Palatino,"Palatino Linotype","Palatino LT STD","Book Antiqua",Times,"Times New Roman",serif;
 	font-size: 20px;
@@ -111,7 +114,6 @@ h6.editor-rich-text__tinymce.mce-content-body {
 .mce-content-body pre,
 .wp-block-code .editor-plain-text,
 .wp-block-preformatted pre {
-	background: #eee;
 	font-family: "Courier 10 Pitch", Courier, monospace;
 	font-size: 16px;
 	line-height: 1.6;
@@ -122,6 +124,11 @@ h6.editor-rich-text__tinymce.mce-content-body {
 	word-wrap: nowrap;
 }
 
+.wp-block-code .editor-plain-text {
+	margin-bottom: 0;
+}
+
+
 .mce-content-body blockquote {
 	margin: 0 1.5em;
 }
@@ -650,9 +657,17 @@ h6.editor-rich-text__tinymce.mce-content-body {
 	padding: 0;
 }
 
-.edit-post-visual-editor .wp-block-pullquote p,
-.edit-post-visual-editor .wp-block-pullquote cite {
+.edit-post-visual-editor .wp-block-pullquote p {
 	color: #666;
+	margin-bottom: 1.8em;
+}
+
+.edit-post-visual-editor .wp-block-pullquote__citation {
+	color: #666;
+	font-size: 1.1em;
+	font-style: italic;
+	opacity: 0.8;
+	text-transform: capitalize;
 }
 
 /* Cover Images */
@@ -678,8 +693,8 @@ h6.editor-rich-text__tinymce.mce-content-body {
 /* Verse */
 .wp-block-verse {
 	background-color: transparent;
-	font-family: "Alegreya", Georgia, "Times New Roman", serif;
-	font-size: 1.1em;
+	font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Times, "Times New Roman", serif;
+	font-size: 22px;
 	font-style: italic;
 	padding: 0;
 }