Browse Source

Libre 2: Finish first round of adding Gutenberg support to theme.

Laurel Fulford 6 years ago
parent
commit
82ecac9cfc
2 changed files with 451 additions and 62 deletions
  1. 242 12
      libre-2/css/blocks.css
  2. 209 50
      libre-2/css/editor-blocks.css

+ 242 - 12
libre-2/css/blocks.css

@@ -12,6 +12,7 @@ Description: Used to style Gutenberg Blocks.
 4.0 Blocks - Formatting
 5.0 Blocks - Layout Elements
 6.0 Blocks - Widgets
+7.0 Blocks - Colors
 --------------------------------------------------------------*/
 
 /*--------------------------------------------------------------
@@ -72,6 +73,15 @@ Description: Used to style Gutenberg Blocks.
 2.0 General Block Styles
 --------------------------------------------------------------*/
 
+/* Figures */
+
+figure[class^="wp-block-"]:not(.aligncenter):not(.alignleft):not(.alignright):not(.alignwide):not(.alignfull),
+[class^="wp-block-"]:not(.aligncenter):not(.alignleft):not(.alignright):not(.alignwide):not(.alignfull) figure,
+[class^="wp-block-"] figure:not(.aligncenter):not(.alignleft):not(.alignright):not(.alignwide):not(.alignfull), {
+	margin-left: 0;
+	margin-right: 0;
+}
+
 /*--------------------------------------------------------------
 3.0 Blocks - Common Blocks
 --------------------------------------------------------------*/
@@ -91,6 +101,12 @@ p.has-drop-cap:not(:focus)::first-letter {
 
 /* Quote */
 
+.wp-block-quote p,
+.wp-block-quote.is-large p,
+.wp-block-quote.is-style-large p {
+	margin-bottom: 1.0em;
+}
+
 .wp-block-quote.is-large p,
 .wp-block-quote.is-style-large p {
 	font-size: 1.25em;
@@ -103,6 +119,11 @@ p.has-drop-cap:not(:focus)::first-letter {
 	padding: 0;
 }
 
+.wp-block-quote.is-large:before,
+.wp-block-quote.is-style-large:before {
+	display: none;
+}
+
 .wp-block-quote.is-large cite,
 .wp-block-quote.is-style-large cite {
 	font-size: inherit;
@@ -131,6 +152,14 @@ p.has-drop-cap:not(:focus)::first-letter {
 	display: flex;
 }
 
+.wp-block-cover-image .wp-block-cover-image-text,
+.wp-block-cover-image .wp-block-cover-text,
+.wp-block-cover-image h2,
+.wp-block-cover .wp-block-cover-image-text,
+.wp-block-cover .wp-block-cover-text,
+.wp-block-cover h2 {
+	font-size: 1.5em;
+}
 
 /* File */
 
@@ -167,6 +196,12 @@ p.has-drop-cap:not(:focus)::first-letter {
 	margin-right: 0;
 }
 
+/* Video */
+
+.wp-block-video video {
+	width: 100%;
+}
+
 /*--------------------------------------------------------------
 4.0 Blocks - Formatting
 --------------------------------------------------------------*/
@@ -185,10 +220,6 @@ p.has-drop-cap:not(:focus)::first-letter {
 
 /* Pullquote */
 
-.wp-block-pullquote {
-
-}
-
 .wp-block-pullquote blockquote {
 	margin-left: inherit;
 	padding: 0;
@@ -198,13 +229,14 @@ p.has-drop-cap:not(:focus)::first-letter {
 	display: none;
 }
 
-.wp-block-pullquote cite {
-
+.wp-block-pullquote blockquote p {
+	margin-bottom: 0.75em;
 }
 
+.wp-block-pullquote cite,
 .wp-block-pullquote.alignleft cite,
 .wp-block-pullquote.alignright cite {
-	font-size: 20px;
+	font-size: 18px;
 }
 
 /* Table */
@@ -234,21 +266,30 @@ p.has-drop-cap:not(:focus)::first-letter {
 /* Buttons */
 
 .wp-block-button .wp-block-button__link {
-	border: 0 none;
 	border-radius: 0;
 	box-shadow: 0 2px 0 0 currentColor;
+}
+
+.wp-block-button .wp-block-button__link:not(.has-background) {
 	background: transparent;
+	padding: 0.21875em 0;
+}
+
+.wp-block-button .wp-block-button__link:not(.has-color) {
 	color: #404040;
+}
+
+.wp-block-button__link {
+	border: 0 none;
 	font-size: 18px;
 	font-size: 1rem;
 	font-weight: bold;
-	padding: 0.21875em 0;
 	transition: 0.2s;
 }
 
-.wp-block-button .wp-block-button__link:hover,
-.wp-block-button .wp-block-button__link:focus,
-.wp-block-button .wp-block-button__link:active {
+.wp-block-button__link:hover,
+.wp-block-button__link:focus,
+.wp-block-button__link:active {
 	background: transparent;
 	box-shadow: 0 4px 0 0 currentColor;
 	color: #404040;
@@ -302,6 +343,16 @@ p.has-drop-cap:not(:focus)::first-letter {
 .wp-block-latest-comments {
 	margin-left: 0;
 	margin-right: 0;
+	padding-left: 0;
+	padding-right: 0;
+}
+
+.wp-block-latest-comments__comment a {
+	box-shadow: 0 1px 0 0 rgba(0,0,0,0);
+}
+
+.wp-block-latest-comments__comment-date {
+	margin-top: 0.5em;
 }
 
 /* Latest Posts */
@@ -310,3 +361,182 @@ p.has-drop-cap:not(:focus)::first-letter {
 	margin-left: 0;
 	margin-right: 0;
 }
+
+/*--------------------------------------------------------------
+7.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+.has-pale-pink-color,
+.has-pale-pink-color:hover,
+.has-pale-pink-color:focus,
+.has-pale-pink-color:active {
+	color: #f78da7;
+}
+
+.has-pale-pink-background-color,
+.has-pale-pink-background-color:hover.
+.has-pale-pink-background-color:focus,
+.has-pale-pink-background-color:active,
+.has-pale-pink-background-color:visited {
+	background-color: #f78da7;
+}
+
+.has-vivid-red-color,
+.has-vivid-red-color:hover,
+.has-vivid-red-color:focus,
+.has-vivid-red-color:active,
+.has-vivid-red-color:visited {
+	color: #cf2e2e;
+}
+
+.has-vivid-red-background-color,
+.has-vivid-red-background-color:hover,
+.has-vivid-red-background-color:focus,
+.has-vivid-red-background-color:active,
+.has-vivid-red-background-color:visited {
+	background-color: #cf2e2e;
+}
+
+.has-luminous-vivid-orange-color,
+.has-luminous-vivid-orange-color:hover,
+.has-luminous-vivid-orange-color:focus,
+.has-luminous-vivid-orange-color:active,
+.has-luminous-vivid-orange-color:visited {
+	color: #ff6900;
+}
+
+.has-luminous-vivid-orange-background-color,
+.has-luminous-vivid-orange-background-color:hover,
+.has-luminous-vivid-orange-background-color:focus,
+.has-luminous-vivid-orange-background-color:active,
+.has-luminous-vivid-orange-background-color:visited {
+	background-color: #ff6900;
+}
+
+.has-luminous-vivid-amber-color,
+.has-luminous-vivid-amber-color:hover,
+.has-luminous-vivid-amber-color:focus,
+.has-luminous-vivid-amber-color:active,
+.has-luminous-vivid-amber-color:visited {
+	color: #fcb900;
+}
+
+.has-luminous-vivid-amber-background-color,
+.has-luminous-vivid-amber-background-color:hover,
+.has-luminous-vivid-amber-background-color:focus,
+.has-luminous-vivid-amber-background-color:active,
+.has-luminous-vivid-amber-background-color:visited {
+	background-color: #fcb900;
+}
+
+.has-light-green-cyan-color,
+.has-light-green-cyan-color:hover,
+.has-light-green-cyan-color:focus,
+.has-light-green-cyan-color:active,
+.has-light-green-cyan-color:visited {
+	color: #7bdcb5;
+}
+
+.has-light-green-cyan-background-color,
+.has-light-green-cyan-background-color:hover,
+.has-light-green-cyan-background-color:focus,
+.has-light-green-cyan-background-color:active,
+.has-light-green-cyan-background-color:visited {
+	background-color: #7bdcb5;
+}
+
+.has-vivid-green-cyan-color,
+.has-vivid-green-cyan-color:hover,
+.has-vivid-green-cyan-color:focus,
+.has-vivid-green-cyan-color:active,
+.has-vivid-green-cyan-color:visited {
+	color: #00d084;
+}
+
+.has-vivid-green-cyan-background-color,
+.has-vivid-green-cyan-background-color:hover,
+.has-vivid-green-cyan-background-color:focus,
+.has-vivid-green-cyan-background-color:active,
+.has-vivid-green-cyan-background-color:visited {
+	background-color: #00d084;
+}
+
+.has-pale-cyan-blue-color,
+.has-pale-cyan-blue-color:hover,
+.has-pale-cyan-blue-color:focus,
+.has-pale-cyan-blue-color:active,
+.has-pale-cyan-blue-color:visited {
+	color: #8ed1fc;
+}
+
+.has-pale-cyan-blue-background-color,
+.has-pale-cyan-blue-background-color:hover,
+.has-pale-cyan-blue-background-color:focus,
+.has-pale-cyan-blue-background-color:active,
+.has-pale-cyan-blue-background-color:visited {
+	background-color: #8ed1fc;
+}
+
+.has-vivid-cyan-blue-color,
+.has-vivid-cyan-blue-color:hover,
+.has-vivid-cyan-blue-color:focus,
+.has-vivid-cyan-blue-color:active,
+.has-vivid-cyan-blue-color:visited {
+	color: #0693e3;
+}
+
+.has-vivid-cyan-blue-background-color,
+.has-vivid-cyan-blue-background-color:hover,
+.has-vivid-cyan-blue-background-color:focus,
+.has-vivid-cyan-blue-background-color:active,
+.has-vivid-cyan-blue-background-color:visited {
+	background-color: #0693e3;
+}
+
+.has-very-light-gray-color,
+.has-very-light-gray-color:hover,
+.has-very-light-gray-color:focus,
+.has-very-light-gray-color:active,
+.has-very-light-gray-color:visited {
+	color: #eee;
+}
+
+.has-very-light-gray-background-color,
+.has-very-light-gray-background-color:hover,
+.has-very-light-gray-background-color:focus,
+.has-very-light-gray-background-color:active,
+.has-very-light-gray-background-color:visited {
+	background-color: #eee;
+}
+
+.has-cyan-bluish-gray-color,
+.has-cyan-bluish-gray-color:hover,
+.has-cyan-bluish-gray-color:focus,
+.has-cyan-bluish-gray-color:active,
+.has-cyan-bluish-gray-color:visited {
+	color: #abb8c3;
+}
+
+.has-cyan-bluish-gray-background-color,
+.has-cyan-bluish-gray-background-color:hover,
+.has-cyan-bluish-gray-background-color:focus,
+.has-cyan-bluish-gray-background-color:active,
+.has-cyan-bluish-gray-background-color:visited {
+	background-color: #abb8c3;
+}
+
+.has-very-dark-gray-color,
+.has-very-dark-gray-color:hover,
+.has-very-dark-gray-color:focus,
+.has-very-dark-gray-color:active,
+.has-very-dark-gray-color:visited {
+	color: #313131;
+}
+
+.has-very-dark-gray-background-color,
+.has-very-dark-gray-background-color:hover,
+.has-very-dark-gray-background-color:focus,
+.has-very-dark-gray-background-color:active,
+.has-very-dark-gray-background-color:visited {
+	background-color: #313131;
+}

+ 209 - 50
libre-2/css/editor-blocks.css

@@ -80,33 +80,33 @@ Description: Used to style Gutenberg Blocks in the editor.
 	font-size: 12px;
 }
 
-@media screen and (min-width: 720px) {
-	.edit-post-visual-editor h1,
+@media (min-width: 720px) {
+	.editor-styles-wrapper.edit-post-visual-editor h1,
 	.wp-block-freeform.block-library-rich-text__tinymce h1 {
 		font-size: 47px;
 	}
 
-	.edit-post-visual-editor h2,
+	.editor-styles-wrapper.edit-post-visual-editor h2,
 	.wp-block-freeform.block-library-rich-text__tinymce h2 {
 		font-size: 29px;
 	}
 
-	.edit-post-visual-editor h3,
+	.editor-styles-wrapper.edit-post-visual-editor h3,
 	.wp-block-freeform.block-library-rich-text__tinymce h3 {
 		font-size: 23px;
 	}
 
-	.edit-post-visual-editor h4,
+	.editor-styles-wrapper.edit-post-visual-editor h4,
 	.wp-block-freeform.block-library-rich-text__tinymce h4 {
 		font-size: 18px;
 	}
 
-	.edit-post-visual-editor h5,
+	.editor-styles-wrapper.edit-post-visual-editor h5,
 	.wp-block-freeform.block-library-rich-text__tinymce h5 {
 		font-size: 14px;
 	}
 
-	.edit-post-visual-editor h6,
+	.editor-styles-wrapper.edit-post-visual-editor h6,
 	.wp-block-freeform.block-library-rich-text__tinymce h6 {
 		font-size: 13px;
 	}
@@ -119,7 +119,7 @@ Description: Used to style Gutenberg Blocks in the editor.
 /* Main content width */
 
 .wp-block {
-	width: 705px; /* 675px + 30px to account for padding */
+	max-width: 705px; /* 675px + 30px to account for padding */
 }
 
 /* Link styles */
@@ -127,23 +127,20 @@ Description: Used to style Gutenberg Blocks in the editor.
 .edit-post-visual-editor a,
 .editor-block-list__block a,
 .wp-block-freeform.block-library-rich-text__tinymce a {
-
+	box-shadow: 0 1px 0 0 currentColor;
+	color: #404040;
+	text-decoration: none;
+	transition: 0.2s;
 }
 
-
 /* Table styles */
 
 .wp-block-freeform.block-library-rich-text__tinymce table,
 .wp-block-freeform.block-library-rich-text__tinymce table th,
 .wp-block-freeform.block-library-rich-text__tinymce table td {
-
-}
-
-.wp-block-freeform.block-library-rich-text__tinymce table {
-
+	border: 0;
 }
 
-
 .rtl .wp-block-freeform.block-library-rich-text__tinymce td,
 .rtl .wp-block-freeform.block-library-rich-text__tinymce th {
 	text-align: right;
@@ -152,16 +149,51 @@ Description: Used to style Gutenberg Blocks in the editor.
 /* Quote styles */
 
 .wp-block-freeform.block-library-rich-text__tinymce blockquote {
+	border: 0;
+	padding-left: 2.5em;
+}
 
+.wp-block-freeform.block-library-rich-text__tinymce blockquote:before {
+	content: "\201c";
+	display: block;
+	font-size: 72px;
+	line-height: 1;
+	position: absolute;
+	top: 0;
+	left: 0;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote cite {
+	font-style: italic;
 }
 
-.wp-block-freeform.block-library-rich-text__tinymce blockquote,
-.wp-block-freeform.block-library-rich-text__tinymce blockquote > p {
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote {
+	padding-left: 0;
+	padding-right: 2.5em;
+}
 
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote:before {
+	left: auto;
+	right: 0;
 }
 
-.wp-block-freeform.block-library-rich-text__tinymce blockquote cite {
+@media (min-width: 720px) {
+	.wp-block-freeform.block-library-rich-text__tinymce blockquote {
+		padding-left: 4em;
+	}
+
+	.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote {
+		padding-left: 0;
+		padding-right: 4em;
+	}
+
+	.wp-block-freeform.block-library-rich-text__tinymce blockquote p {
+		font-size: 23px;
+	}
 
+	.wp-block-freeform.block-library-rich-text__tinymce blockquote:before {
+		font-size: 129px;
+	}
 }
 
 /* Definition List styles */
@@ -189,16 +221,95 @@ p.has-drop-cap:not(:focus)::first-letter {
 
 /* Quote */
 
-.wp-block-quote {
-
+.editor-styles-wrapper .wp-block-quote p,
+.editor-styles-wrapper .wp-block-quote.is-large p,
+.editor-styles-wrapper .wp-block-quote.is-style-large p {
+	margin-bottom: 1.0em;
 }
 
 .wp-block-quote:not(.is-large):not(.is-style-large) {
+	border: 0;
+	padding-left: 0.5em;
+}
+
+.editor-styles-wrapper .wp-block-quote:before {
+	left: -40.5px;
+}
 
+.editor-styles-wrapper .wp-block-quote.wp-block-quote.is-large:before,
+.editor-styles-wrapper .wp-block-quote.wp-block-quote.is-style-large:before {
+	display: none
 }
 
 .wp-block-quote__citation {
+	color: inherit;
+	font-size: inherit;
+	font-style: italic;
+}
+
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large {
+	font-style: normal;
+	padding: 0;
+}
+
+.edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-large p,
+.edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-style-large p {
+	font-size: 20px;
+	font-style: normal;
+}
+
+.wp-block-quote.is-large .wp-block-quote__citation,
+.wp-block-quote.is-style-large .wp-block-quote__citation {
+	font-size: 18px;
+}
+
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large) {
+	padding-left: 0;
+	padding-right: 0.5em;
+}
+
+.rtl .editor-styles-wrapper .wp-block-quote:before {
+	left: auto;
+	right: -40.5px;
+}
+
+@media (min-width: 720px) {
+	.wp-block-quote:not(.is-large):not(.is-style-large)  {
+		padding-left: 4em;
+	}
+
+	.wp-block-quote:not(.is-large):not(.is-style-large) {
+		padding-left: 2.0em;
+	}
+
+	.edit-post-visual-editor .editor-block-list__block .wp-block-quote p {
+		font-size: 23px;
+	}
+
+	.editor-styles-wrapper .wp-block-quote:before {
+		font-size: 129px;
+	}
+
+	.edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-large p,
+	.edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-style-large p {
+		font-size: 28.75px;
+	}
+
+	.wp-block-quote.is-large .wp-block-quote__citation,
+	.wp-block-quote.is-style-large .wp-block-quote__citation {
+		font-size: 23px;
+	}
+
+	.rtl .wp-block-quote:not(.is-large):not(.is-style-large)  {
+		padding-left: 0;
+		padding-right: 4em;
+	}
 
+	.rtl .wp-block-quote:not(.is-large):not(.is-style-large) {
+		padding-left: 0;
+		padding-right: 2.0em;
+	}
 }
 
 /* Cover */
@@ -214,17 +325,32 @@ p.has-drop-cap:not(:focus)::first-letter {
 
 /* File */
 
-.wp-block-file .wp-block-file__button {
+.wp-block-file :not(.wp-block-file__button),
+.wp-block-file :not(.wp-block-file__button):hover {
+	box-shadow: none;
+}
 
+.wp-block-file .wp-block-file__button,
+.wp-block-file .wp-block-file__button:visited {
+	border: 0 none;
+	border-radius: 0;
+	box-shadow: 0 2px 0 0 currentColor;
+	background: transparent;
+	color: #404040;
+	font-size: 18px;
+	font-size: 1rem;
+	font-weight: bold;
+	padding: 0.21875em 0;
+	transition: 0.2s;
 }
 
+.wp-block-file .wp-block-file__button:hover,
 .wp-block-file .wp-block-file__button:focus,
 .wp-block-file .wp-block-file__button:active {
-
-}
-
-.wp-block-file .wp-block-file__button:hover {
-
+	background: transparent;
+	box-shadow: 0 4px 0 0 currentColor;
+	color: #404040;
+	outline: none;
 }
 
 /*--------------------------------------------------------------
@@ -237,6 +363,10 @@ p.has-drop-cap:not(:focus)::first-letter {
 	font-style: italic;
 }
 
+.editor-styles-wrapper .wp-block-verse pre {
+	font-family: "Libre Baskerville", Libre, Georgia, Times, serif;
+}
+
 .wp-block-verse pre {
 	padding: 0;
 }
@@ -252,32 +382,35 @@ p.has-drop-cap:not(:focus)::first-letter {
 	background: transparent;
 }
 
-.wp-block-code .editor-plain-text {
-
-}
-
 /* Preformatted */
 
-.wp-block-preformatted {
-
-}
-
 .wp-block-preformatted pre {
-
+	font-family: "Libre Baskerville", Libre, Georgia, Times, serif
 }
 
 /* Pullquote */
 
 .wp-block-pullquote {
+	border: 0;
+}
 
+.editor-styles-wrapper .wp-block-pullquote blockquote {
+	margin-left: inherit;
+	padding: 0;
 }
 
-.wp-block-pullquote blockquote {
+.editor-styles-wrapper .wp-block-pullquote blockquote:before {
+	display: none;
+}
 
+.wp-block-pullquote blockquote p {
+	margin-bottom: 0.75em;
 }
 
 .wp-block-pullquote .wp-block-pullquote__citation {
-
+	font-size: inherit;
+	font-style: italic;
+	text-transform: none;
 }
 
 .wp-block-pullquote.alignleft blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty="true"]::before,
@@ -289,21 +422,18 @@ p.has-drop-cap:not(:focus)::first-letter {
 
 /* Table */
 
-.wp-block-table {
-
-}
-
+.wp-block-table,
 .wp-block-table td,
 .wp-block-table th {
-
+	border: 0;
 }
 
 .wp-block-table th {
-
+	text-align: left;
 }
 
-.wp-block-table td {
-
+.rtl .wp-block-table th {
+	text-align: right;
 }
 
 .wp-block-table__cell-content {
@@ -317,16 +447,34 @@ p.has-drop-cap:not(:focus)::first-letter {
 /* Buttons */
 
 .wp-block-button .wp-block-button__link {
-
+	border-radius: 0;
+	box-shadow: 0 2px 0 0 currentColor;
 }
 
-.wp-block-button .wp-block-button__link:focus,
-.wp-block-button .wp-block-button__link:active {
+.wp-block-button .wp-block-button__link:not(.has-background) {
+	background: transparent;
+	padding: 0.21875em 0;
+}
 
+.wp-block-button .wp-block-button__link:not(.has-color) {
+	color: #404040;
 }
 
-.wp-block-button .wp-block-button__link:hover {
+.wp-block-button__link {
+	border: 0 none;
+	font-size: 18px;
+	font-size: 1rem;
+	font-weight: bold;
+	transition: 0.2s;
+}
 
+.wp-block-button__link:hover,
+.wp-block-button__link:focus,
+.wp-block-button__link:active {
+	background: transparent;
+	box-shadow: 0 4px 0 0 currentColor;
+	color: #404040;
+	outline: none;
 }
 
 /* Separator */
@@ -348,3 +496,14 @@ p.has-drop-cap:not(:focus)::first-letter {
 [data-align="center"] .wp-block-archives ul {
 	list-style-position: inside;
 }
+
+/* Latest Comments */
+
+.editor-styles-wrapper .wp-block-latest-comments {
+	padding-left: 0;
+	padding-right: 0;
+}
+
+.wp-block-latest-comments__comment a {
+	box-shadow: 0 1px 0 0 rgba(0,0,0,0);
+}