Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Commit

Permalink
Blockbase: Add comments to Blockbase for the respective Gutenberg iss…
Browse files Browse the repository at this point in the history
…ues (#4551)

* Blockbase: Add comments to Blockbase for the respective Gutenberg issues

* update image alignment issue
  • Loading branch information
scruffian authored Sep 9, 2021
1 parent 88f21e0 commit bbdb749
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 25 deletions.
4 changes: 3 additions & 1 deletion blockbase/sass/blocks/_button-mixins.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -76,4 +78,4 @@
padding-left: var(--wp--custom--button--spacing--padding--left);
padding-right: var(--wp--custom--button--spacing--padding--right);
}
}
}
4 changes: 2 additions & 2 deletions blockbase/sass/blocks/_code.scss
Original file line number Diff line number Diff line change
@@ -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
}
3 changes: 2 additions & 1 deletion blockbase/sass/blocks/_columns.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
2 changes: 1 addition & 1 deletion blockbase/sass/blocks/_file.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blockbase/sass/blocks/_gallery.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
}
}
3 changes: 2 additions & 1 deletion blockbase/sass/blocks/_html.scss
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
9 changes: 5 additions & 4 deletions blockbase/sass/blocks/_image.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
4 changes: 2 additions & 2 deletions blockbase/sass/blocks/_latest-posts.scss
Original file line number Diff line number Diff line change
@@ -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);
}
color: var(--wp--custom--latest-posts--meta--color--text); // See https://github.com/WordPress/gutenberg/issues/34647.
}
1 change: 1 addition & 0 deletions blockbase/sass/blocks/_list.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// See https://github.com/WordPress/gutenberg/pull/27511
ul,
ol {
padding-left: var(--wp--custom--list--spacing--padding--left);
Expand Down
3 changes: 2 additions & 1 deletion blockbase/sass/blocks/_navigation.scss
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -9,4 +10,4 @@
.has-child .wp-block-navigation-link__container{
display: revert;
}
}
}
2 changes: 0 additions & 2 deletions blockbase/sass/blocks/_paragraph.scss
Original file line number Diff line number Diff line change
@@ -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) );
Expand Down
2 changes: 1 addition & 1 deletion blockbase/sass/blocks/_post-author.scss
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion blockbase/sass/blocks/_pullquote.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
8 changes: 4 additions & 4 deletions blockbase/sass/blocks/_separator.scss
Original file line number Diff line number Diff line change
@@ -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
}
}
}
6 changes: 4 additions & 2 deletions blockbase/sass/blocks/_table.scss
Original file line number Diff line number Diff line change
@@ -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;
}
2 changes: 1 addition & 1 deletion blockbase/sass/blocks/_video.scss
Original file line number Diff line number Diff line change
@@ -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);
}
Expand Down

0 comments on commit bbdb749

Please sign in to comment.