@taupecat @erikteichmann @getpantheon To stick to the theme of your Twitter handle, it’s the cat’s pajamas
@WordCampLanc @erikteichmann Another core difference is instead of actually pulling in a stylesheet you’re bringing in inline styles when that block is loaded.
@WordCampLanc @erikteichmann What is the core difference between doing editor styles in classic editor versus Gutenberg editor?
tinyMCE was a walled garden. You could put any styles within that iframe and do whatever you want. Gutenberg is more open. It takes more care and forethought.
@WordCampLanc @erikteichmann “What about Google fonts or any custom fonts?”
“You can enqueue them just like any other CSS file. Gutenberg will wrap the styles in an editor-styles wrapper and then you can use it.”
@WordCampLanc @erikteichmann Slides are available at eriktdesign.com/styling-blocks/
@WordCampLanc @erikteichmann mutationObersvers in JavaScript == when something changes, do something.
@WordCampLanc @erikteichmann By giving context in the editor it will become more apparent to person editing the page that a white image behind white text isn’t going to work and they shouldn’t publish the page like that.
@WordCampLanc @erikteichmann Some advanced styling you can do: When you add a featured image, update the header of the editor using that featured image as a background image.
@WordCampLanc @erikteichmann “When I’m looking for best practices, I look to default themes like twentynineteen to see how things are done” – @erikteichmann
@WordCampLanc @erikteichmann Now with Gutenberg adding a stylesheet allows for conflicting styles between blocks. We need some more specific targeting.
@WordCampLanc @erikteichmann What we used to do with the classic editor: Use add_editor_style() and boom we’re done.
@WordCampLanc @erikteichmann “Clients hate surprises. They want to know what they’re going to get before they hit publish” @erikteichmann
@WordCampLanc @erikteichmann Gutenberg is beginning to address trusting that your editor looks like your website.
@WordCampLanc @erikteichmann Does your editor look just like the frontend of your website?
(No one raises their hand)
@WordCampLanc @erikteichmann WYSIWYG (what you see if what you get)? More like WYS is? WYG (what you see, is it, what you get?)
@WordCampLanc @erikteichmann A lot of developers use a default WordPress theme to go along with the “cobbler’s children have no shoes” expression.
@WordCampLanc @erikteichmann We’re building things that are getting more and more complicated and we’re not providing enough feedback in the backend to show what the frontend is going to look like!
@WordCampLanc @erikteichmann Why put work into styling the backend?
Because every client asks “What is it [the content] actually going to look like?”
@WordCampLanc @erikteichmann Poll:
Who here would call themselves a theme editor? (about half of the room)
Who here has used the Gutenberg editor? (a lot less)
Who has developed a block? (not much)