-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Styles: add Editor Styles support (#9008)
* Styles: auto-wrap theme provided styles to avoid specifity in the theme stylesheets * Change the post-css plugin used (use a smarter one) * Add support for the editor styles * Refactor default Gutenberg editor styles to apply on the editor-block-list__block className This make those styles easily extendable in editor styles * Fix linting errors * Fix e2e tests * Use CSS AST instead of PostCSS * Fork css dependency to make it browser friendly * Adding documentation about how the editor styles work * Make the editor styles support opt-in * Use the editor styles to apply the default Gutenberg styles * Fix typo * Exclude built files from unit tests * Inherit color on headings placed in wp-block-heading. Allows using `.wp-block-heading { color: blue; }`. * Add the editor width smart transform * Use `.wp-block` instead of `html` to define the width * Fix unit tests
- Loading branch information
1 parent
ef25165
commit 4fec0d2
Showing
32 changed files
with
1,900 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
h4, | ||
h5, | ||
h6 { | ||
color: inherit; | ||
margin: 0; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.wp-block { | ||
width: 610px; | ||
} | ||
|
||
body { | ||
font-family: $editor-font; | ||
line-height: $editor-line-height; | ||
color: $dark-gray-700; | ||
font-size: $editor-font-size; | ||
} | ||
|
||
p { | ||
font-size: $editor-font-size; | ||
} | ||
|
||
|
||
ul, | ||
ol { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
ul:not(.wp-block-gallery) { | ||
list-style-type: disc; | ||
} | ||
|
||
ol { | ||
list-style-type: decimal; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Adapted from https://github.com/reworkcss/css | ||
// because we needed to remove source map support. | ||
|
||
export { default as parse } from './parse'; | ||
export { default as stringify } from './stringify'; |
Oops, something went wrong.