Skip to content
This repository was archived by the owner on May 2, 2022. It is now read-only.

Feature/gutenberg theme support#106

Open
saltcod wants to merge 2 commits into10up:masterfrom
saltcod:feature/gutenberg-theme-support
Open

Feature/gutenberg theme support#106
saltcod wants to merge 2 commits into10up:masterfrom
saltcod:feature/gutenberg-theme-support

Conversation

@saltcod
Copy link

@saltcod saltcod commented Mar 4, 2019

Rationale:

Unless we enable responsive-embeds support, we should add our own styles for styling embeds responsively. I've added a new blocks.css file for this. My thought is that if we add more block-specific styles, we can then start splitting this out into more specific partials (perhaps embeds.css in this case).

add_theme_support( 'disable-custom-font-sizes' );
— Disables the custom font size input box.

add_theme_support( 'disable-custom-colors' );
— disables the core colour palette

add_theme_support( 'editor-color-palette', array() );
— if we disable the core colour palette, we need to pass in our own array of (0) colours.

As Damon and I discussed in Slack, further work needs to be broken out into separate issues so we can properly have discussion around them. this is meant to be a few obvious defaults.

@colorful-tones
Copy link
Contributor

colorful-tones commented Mar 4, 2019

Just digging in on this.

  1. I would recommend we normalize the user-agent figure element's margin's with this responsive addition. Basically, when I check out your changes in theme scaffold the oembed has side margins. So, I would add to the top of the blocks.css:

    .wp-has-aspect-ratio {
        margin-left: 0;
        margin-right: 0;
    }
    

    I'm attaching a Before and After screenshot to bottom.

  2. Adding in add_theme_support( 'disable-custom-font-sizes' );, add_theme_support( 'disable-custom-colors' );, and add_theme_support( 'editor-color-palette', array() ); disables these options from the Gutenberg editor, but already saved content is not affected. We would have to remove the enqueueing of Gutenberg's front-end styles to completely annihilate (should this be the desired approach) the affects of these settings.

    This was not something I had considered before. 🤔

    So, should we take on a redesign with lots of legacy Gutenberg content. And, we install the Theme
    Scaffold with these new filters then the styled content will still exist. I guess this is not so bad, but
    the user expectation might lead to a little confusion.

screenshot 2019-03-04 16 12 06
screenshot 2019-03-04 16 14 50

@timwright12 timwright12 requested a review from brentvr March 5, 2019 14:53
@timwright12
Copy link
Contributor

@saltcod is there a reason we can't add this stuff into the wordpress.css file?

@saltcod
Copy link
Author

saltcod commented Apr 2, 2019

@timwright12 we can, but there was thought that this file would grow and it would be nice to have this file as the placeholder for that growth.

@saltcod
Copy link
Author

saltcod commented Feb 3, 2020

I need to re-followup on this one.

@jeffpaul
Copy link
Member

@saltcod any ETA on updating this PR?

@jeffpaul jeffpaul requested a review from joesnellpdx November 13, 2020 16:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants