Skip to content

Commit

Permalink
List block: add color controls (#21387)
Browse files Browse the repository at this point in the history
* List block: add color controls.

* Workaround for default editor styles overriding padding.
  • Loading branch information
ZebulanStanphill authored Aug 27, 2020
1 parent 80777ae commit 7fef85b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/block-library/src/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
@import "./latest-comments/editor.scss";
@import "./latest-posts/editor.scss";
@import "./legacy-widget/editor.scss";
@import "./list/editor.scss";
@import "./media-text/editor.scss";
@import "./more/editor.scss";
@import "./navigation/editor.scss";
Expand Down
8 changes: 4 additions & 4 deletions packages/block-library/src/list/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"source": "html",
"selector": "ol,ul",
"multiline": "li",
"__unstableMultilineWrapperTags": [
"ol",
"ul"
],
"__unstableMultilineWrapperTags": [ "ol", "ul" ],
"default": ""
},
"type": {
Expand All @@ -30,6 +27,9 @@
"supports": {
"anchor": true,
"className": false,
"__experimentalColor": {
"gradients": true
},
"__unstablePasteTextInline": true,
"lightBlockWrapper": true
}
Expand Down
7 changes: 7 additions & 0 deletions packages/block-library/src/list/editor.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Extra specificity required to override default editor styles, which are
// loaded after core block styles. If the load order changes, this rule can be
// removed. See https://github.com/WordPress/gutenberg/issues/24011.
ol.has-background.has-background,
ul.has-background.has-background {
padding: $block-bg-padding--v $block-bg-padding--h;
}
4 changes: 4 additions & 0 deletions packages/block-library/src/list/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ol.has-background,
ul.has-background {
padding: $block-bg-padding--v $block-bg-padding--h;
}
1 change: 1 addition & 0 deletions packages/block-library/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@import "./image/style.scss";
@import "./latest-comments/style.scss";
@import "./latest-posts/style.scss";
@import "./list/style.scss";
@import "./media-text/style.scss";
@import "./navigation/style.scss";
@import "./navigation-link/style.scss";
Expand Down

0 comments on commit 7fef85b

Please sign in to comment.