From bbdb7490027f1075b4603ef8fa9ccc8c39a1480a Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Thu, 9 Sep 2021 09:35:18 +0100 Subject: [PATCH] Blockbase: Add comments to Blockbase for the respective Gutenberg issues (#4551) * Blockbase: Add comments to Blockbase for the respective Gutenberg issues * update image alignment issue --- blockbase/sass/blocks/_button-mixins.scss | 4 +++- blockbase/sass/blocks/_code.scss | 4 ++-- blockbase/sass/blocks/_columns.scss | 3 ++- blockbase/sass/blocks/_file.scss | 2 +- blockbase/sass/blocks/_gallery.scss | 2 +- blockbase/sass/blocks/_html.scss | 3 ++- blockbase/sass/blocks/_image.scss | 9 +++++---- blockbase/sass/blocks/_latest-posts.scss | 4 ++-- blockbase/sass/blocks/_list.scss | 1 + blockbase/sass/blocks/_navigation.scss | 3 ++- blockbase/sass/blocks/_paragraph.scss | 2 -- blockbase/sass/blocks/_post-author.scss | 2 +- blockbase/sass/blocks/_pullquote.scss | 2 +- blockbase/sass/blocks/_separator.scss | 8 ++++---- blockbase/sass/blocks/_table.scss | 6 ++++-- blockbase/sass/blocks/_video.scss | 2 +- 16 files changed, 32 insertions(+), 25 deletions(-) diff --git a/blockbase/sass/blocks/_button-mixins.scss b/blockbase/sass/blocks/_button-mixins.scss index b48e69dec0..152e1b54a0 100644 --- a/blockbase/sass/blocks/_button-mixins.scss +++ b/blockbase/sass/blocks/_button-mixins.scss @@ -1,4 +1,5 @@ // NOTE: These remain for the styling of buttons that are NOT blocks and is used elsewhere. This can be removed when those no longer exist. +// See https://github.com/WordPress/gutenberg/issues/29167 @mixin button-main-styles { @include button-padding-styles; @include button-typography-styles; @@ -47,6 +48,7 @@ // NOTE: These remain for the hover styling of blocks. This can be removed when the button block has configurable hover states. // The mechanism below ONLY CHANGES CSS VARIABLES that are already applied to properties (above) +// See https://github.com/WordPress/gutenberg/issues/4543 @mixin button-hover-styles { //The following changes should ONLY be changed if the user has NOT set a custom color &:not(.has-background):not(.has-text-color) { @@ -76,4 +78,4 @@ padding-left: var(--wp--custom--button--spacing--padding--left); padding-right: var(--wp--custom--button--spacing--padding--right); } -} \ No newline at end of file +} diff --git a/blockbase/sass/blocks/_code.scss b/blockbase/sass/blocks/_code.scss index 6ddee62b1a..3de8b013bd 100644 --- a/blockbase/sass/blocks/_code.scss +++ b/blockbase/sass/blocks/_code.scss @@ -1,4 +1,4 @@ -// TODO: This can be removed when Gutenberg applies fontFamily correcly to .wp-block-code code (https://github.com/WordPress/gutenberg/issues/31135) +// TODO: This can be removed when Gutenberg applies fontFamily correcly to .wp-block-code code. .wp-block-code code { - font-family: var(--wp--custom--code--typography--font-family); + font-family: var(--wp--custom--code--typography--font-family); // See https://github.com/WordPress/gutenberg/issues/31135 } diff --git a/blockbase/sass/blocks/_columns.scss b/blockbase/sass/blocks/_columns.scss index 096bacc766..a82cceadc0 100644 --- a/blockbase/sass/blocks/_columns.scss +++ b/blockbase/sass/blocks/_columns.scss @@ -1,5 +1,6 @@ // TODO: This can be removed when Gutenberg no longer expresses opinion about the bottom margin of the block columns // or perhaps when the margins of blocks can be styled with the "style" portion of theme.json +// See: https://github.com/WordPress/gutenberg/pull/34630 .wp-block-columns { margin-bottom: unset; -} \ No newline at end of file +} diff --git a/blockbase/sass/blocks/_file.scss b/blockbase/sass/blocks/_file.scss index d1bd501bbe..8bf636ce2d 100644 --- a/blockbase/sass/blocks/_file.scss +++ b/blockbase/sass/blocks/_file.scss @@ -1,6 +1,6 @@ @import 'button-mixins'; -// TODO: Remove when https://github.com/WordPress/gutenberg/issues/27760 is fixed +// TODO: Remove when https://github.com/WordPress/gutenberg/issues/27760 is fixed. .wp-block-file .wp-block-file__button { @include button-main-styles; @include button-hover-styles; diff --git a/blockbase/sass/blocks/_gallery.scss b/blockbase/sass/blocks/_gallery.scss index edc47dd510..11040b5205 100644 --- a/blockbase/sass/blocks/_gallery.scss +++ b/blockbase/sass/blocks/_gallery.scss @@ -2,7 +2,7 @@ .blocks-gallery-image, .blocks-gallery-item { figcaption { - font-size: var(--wp--custom--gallery--caption--font-size); + font-size: var(--wp--custom--gallery--caption--font-size); // See https://github.com/WordPress/gutenberg/issues/34643. } } } diff --git a/blockbase/sass/blocks/_html.scss b/blockbase/sass/blocks/_html.scss index 66f0f90ccc..c52b3ad156 100644 --- a/blockbase/sass/blocks/_html.scss +++ b/blockbase/sass/blocks/_html.scss @@ -1,6 +1,7 @@ +// See https://github.com/WordPress/gutenberg/issues/34645 .block-library-html__edit { .block-editor-plain-text { color: var(--wp--custom--form--color--text); border: var(--wp--custom--form--border--width) var(--wp--custom--form--border--style) var(--wp--custom--form--border--color); } -} \ No newline at end of file +} diff --git a/blockbase/sass/blocks/_image.scss b/blockbase/sass/blocks/_image.scss index 567ba77cd4..ed586ded6d 100644 --- a/blockbase/sass/blocks/_image.scss +++ b/blockbase/sass/blocks/_image.scss @@ -1,10 +1,11 @@ .wp-block-image { - /* + /* From what I can tell the below are styles regularly used by themes to fix the image block. I believe these should go into the block's - default styles. It's difficult to say how this will land, however - based on discussion found in (many) related issues here: + default styles. It's difficult to say how this will land, however + based on discussion found in (many) related issues here: https://github.com/WordPress/gutenberg/issues/28923 + https://github.com/WordPress/gutenberg/issues/29506 */ text-align: center; -} \ No newline at end of file +} diff --git a/blockbase/sass/blocks/_latest-posts.scss b/blockbase/sass/blocks/_latest-posts.scss index c42902d63f..c1283e5f4c 100644 --- a/blockbase/sass/blocks/_latest-posts.scss +++ b/blockbase/sass/blocks/_latest-posts.scss @@ -1,4 +1,4 @@ .wp-block-latest-posts .wp-block-latest-posts__post-date, .wp-block-latest-posts .wp-block-latest-posts__post-author { - color: var(--wp--custom--latest-posts--meta--color--text); -} \ No newline at end of file + color: var(--wp--custom--latest-posts--meta--color--text); // See https://github.com/WordPress/gutenberg/issues/34647. +} diff --git a/blockbase/sass/blocks/_list.scss b/blockbase/sass/blocks/_list.scss index 2177372d7b..f8c43e4c9b 100644 --- a/blockbase/sass/blocks/_list.scss +++ b/blockbase/sass/blocks/_list.scss @@ -1,3 +1,4 @@ +// See https://github.com/WordPress/gutenberg/pull/27511 ul, ol { padding-left: var(--wp--custom--list--spacing--padding--left); diff --git a/blockbase/sass/blocks/_navigation.scss b/blockbase/sass/blocks/_navigation.scss index f0d8cfc42d..8cd4b4f6cb 100644 --- a/blockbase/sass/blocks/_navigation.scss +++ b/blockbase/sass/blocks/_navigation.scss @@ -1,3 +1,4 @@ +// See https://github.com/WordPress/gutenberg/issues/34648 .wp-block-navigation.is-responsive { .wp-block-navigation__responsive-container.is-menu-open { background-color: var(--wp--custom--color--background); @@ -9,4 +10,4 @@ .has-child .wp-block-navigation-link__container{ display: revert; } -} \ No newline at end of file +} diff --git a/blockbase/sass/blocks/_paragraph.scss b/blockbase/sass/blocks/_paragraph.scss index cadb08c962..2171a23c76 100644 --- a/blockbase/sass/blocks/_paragraph.scss +++ b/blockbase/sass/blocks/_paragraph.scss @@ -1,6 +1,4 @@ p { - - // Override `color: inherit` from Core styles. &.has-text-color a { color: var( --wp--style--color--link, var(--wp--custom--color--primary) ); diff --git a/blockbase/sass/blocks/_post-author.scss b/blockbase/sass/blocks/_post-author.scss index ab3ce9714b..4b84432dbd 100644 --- a/blockbase/sass/blocks/_post-author.scss +++ b/blockbase/sass/blocks/_post-author.scss @@ -1,3 +1,3 @@ .wp-block-post-author__name { - font-weight: var(--wp--custom--post-author--font-weight); + font-weight: var(--wp--custom--post-author--font-weight); // See https://github.com/WordPress/gutenberg/issues/34640 } diff --git a/blockbase/sass/blocks/_pullquote.scss b/blockbase/sass/blocks/_pullquote.scss index 5442c98d85..5a82f5a914 100644 --- a/blockbase/sass/blocks/_pullquote.scss +++ b/blockbase/sass/blocks/_pullquote.scss @@ -1,6 +1,6 @@ .wp-block-pullquote.is-style-solid-color, .wp-block-pullquote { - text-align: var(--wp--custom--pullquote--typography--text-align); + text-align: var(--wp--custom--pullquote--typography--text-align); // See https://github.com/WordPress/gutenberg/pull/31996 blockquote { padding: 0; margin: 0; diff --git a/blockbase/sass/blocks/_separator.scss b/blockbase/sass/blocks/_separator.scss index ab91e93f7f..9c080e2613 100644 --- a/blockbase/sass/blocks/_separator.scss +++ b/blockbase/sass/blocks/_separator.scss @@ -1,7 +1,7 @@ .wp-block-separator { - margin: var(--wp--custom--separator--margin); - opacity: var(--wp--custom--separator--opacity); // Mirror controls that Gutenberg theme.css offers: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/separator/theme.scss + margin: var(--wp--custom--separator--margin); // See https://github.com/WordPress/gutenberg/pull/30609 is merged + opacity: var(--wp--custom--separator--opacity); // Mirror controls that Gutenberg theme.css offers: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/separator/theme.scss - See: https://github.com/WordPress/gutenberg/issues/34637 &:not(.is-style-wide){ - width: var(--wp--custom--separator--width); + width: var(--wp--custom--separator--width); // See https://github.com/WordPress/gutenberg/issues/34638 } -} \ No newline at end of file +} diff --git a/blockbase/sass/blocks/_table.scss b/blockbase/sass/blocks/_table.scss index 10ca563382..f5ce87f595 100644 --- a/blockbase/sass/blocks/_table.scss +++ b/blockbase/sass/blocks/_table.scss @@ -1,15 +1,17 @@ +// See https://github.com/WordPress/gutenberg/issues/31261 .wp-block-table.is-style-stripes, .wp-block-table { - figcaption { + figcaption { // See https://github.com/WordPress/gutenberg/issues/34650 font-size: var(--wp--custom--table--figcaption--typography--font-size); text-align: center; } td, th { + // See https://github.com/WordPress/gutenberg/issues/31261 border: 1px solid; padding: calc(0.5*var(--wp--custom--margin--vertical)) calc(0.5*var(--wp--custom--margin--horizontal)); } - margin-bottom: 1em; + margin-bottom: 1em; // See https://github.com/WordPress/gutenberg/issues/34652 border-bottom: none; } diff --git a/blockbase/sass/blocks/_video.scss b/blockbase/sass/blocks/_video.scss index 96e333544c..3905d6b74f 100644 --- a/blockbase/sass/blocks/_video.scss +++ b/blockbase/sass/blocks/_video.scss @@ -1,5 +1,5 @@ .wp-block-video { - figcaption { + figcaption { // https://github.com/WordPress/gutenberg/issues/34642 margin: var(--wp--custom--video--caption--margin); text-align: var(--wp--custom--video--caption--text-align); }