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

Reusable FontSettings and Theme customization #5714

Closed
mtias opened this issue Mar 20, 2018 · 2 comments
Closed

Reusable FontSettings and Theme customization #5714

mtias opened this issue Mar 20, 2018 · 2 comments
Assignees
Labels
Customization Issues related to Phase 2: Customization efforts [Feature] Block API API that allows to express the block paradigm. [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@mtias
Copy link
Member

mtias commented Mar 20, 2018

Follow up tasks from #5269.

Allow themes to specify the set of font size values. (Right now it defaults to pixels, but we might extend this.)

// $font_sizes = array(
//    'small' => 14,
//    'regular' => 16,
//    'large' => 36,
//    'larger' => 48,
// };

$font_sizes = get_theme_support( 'editor-font-sizes' );

Allow themes to disable custom font sizes (the slider and arbitrary input).

get_theme_support( 'disable-custom-font-sizes' );

Create reusable block component for font settings:

import FontSettings from '@wordpress/blocks/font-settings';

Here we could see whether we prefer a FontSize component or a full FontSettings with props for dropCap support, etc. Maybe FontSize scales better (like ColorPalette?).

@mtias mtias added [Type] Task Issues or PRs that have been broken down into an individual action to take [Feature] Block API API that allows to express the block paradigm. Customization Issues related to Phase 2: Customization efforts labels Mar 20, 2018
@mtias mtias changed the title Reusable FontSettings and Theme cusotmization Reusable FontSettings and Theme customization Mar 21, 2018
@jorgefilipecosta jorgefilipecosta self-assigned this Mar 21, 2018
@jorgefilipecosta jorgefilipecosta added the [Status] In Progress Tracking issues with work in progress label May 8, 2018
@rchipka
Copy link

rchipka commented May 23, 2018

Related to #6651

Perhaps this component should be grouped into a BlockStyling component.

Also see the notes about how we should be doing class names and class injection to properly support extensibility.

@forsvunnet
Copy link

forsvunnet commented Aug 14, 2018

@mtias @jorgefilipecosta It doesn't look like this issue has been fully solved. It looks like the theme support to remove custom font sizes hasn't been implemented yet.

get_theme_support( 'disable-custom-font-sizes' );

Is there another way to remove/disable the font size control?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customization Issues related to Phase 2: Customization efforts [Feature] Block API API that allows to express the block paradigm. [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

4 participants