Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish editor style documentation #12381

Merged
merged 2 commits into from
Nov 28, 2018

Conversation

jasmussen
Copy link
Contributor

This includes a section on how to actually enqueue your stylesheet, because this has changed a number of times over the year and hasn't been updated.

This includes a section on how to actually enqueue your stylesheet, because this has changed a number of times over the year and hasn't been updated.
@jasmussen jasmussen added the [Type] Developer Documentation Documentation for developers label Nov 28, 2018
@jasmussen jasmussen self-assigned this Nov 28, 2018
@jasmussen jasmussen requested a review from a team November 28, 2018 11:57
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

In the classic editor, the editor stylesheet is loaded directly into the iframe of the WYSIWYG editor, with no changes. Gutenberg, however, doesn't use iframes. To make sure your styles are applied only to the content of the editor, we automatically transform your editor styles by selectively rewriting or adjusting certain CSS selectors.
In the classic editor, the editor stylesheet is loaded directly into the iframe of the WYSIWYG editor, with no changes. Gutenberg, however, doesn't use iframes. To make sure your styles are applied only to the content of the editor, we automatically transform your editor styles by selectively rewriting or adjusting certain CSS selectors. This also allows Gutenberg to leverage your editor style in block variation previews.

For example, if you write `body { ... }` in your editor style, this is rewritten to `.editor-styles-wrapper { ... }`. This also means that you should _not_ target any of the editor classnames directly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: should it "editor class names directly" instead of "editor classnames directly"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed! Thanks. Merging when the checks pass.

Does this need to be in a milestone since it's documentation?

@jasmussen jasmussen merged commit e4fd51c into master Nov 28, 2018
@jasmussen jasmussen added this to the 4.6 milestone Nov 28, 2018
@mtias mtias deleted the docs/update-editor-styles-documentation branch November 28, 2018 17:58
@youknowriad youknowriad modified the milestones: 4.6, 4.7 Nov 29, 2018
daniloercoli added a commit that referenced this pull request Nov 29, 2018
…rnmobile/danilo-try-to-fix-undo-redo

* 'master' of https://github.com/WordPress/gutenberg:
  Avoid changing default wpautop priority (#11722)
  Try fixing the tab navigation issue (#12390)
  Polish editor style documentation (#12381)
@mtias mtias modified the milestones: 4.7, Documentation & Handbook Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants