Gutenberg: Question/Suggestion; Drop 'Drop Cap' feature

Created on 15 Apr 2018  路  13Comments  路  Source: WordPress/gutenberg

Overview

I've searched a bit around, but couldn't find any resources on this. My main question here is;

  • Where does the need for a 'Drop cap' feature come from?

Doing some research it doesn't seem there's any real need for this feature. The most used WP plugin has only 7,000 active installs, and a post by WP Beginner (first Google result) has 4 comments > which to me indicates there's very little interest for such option.

Only reasonable explanation I can imagine is to have a example of a checkbox/toggle option (which would be a bad reason to leave this in, IMHO)


I'd love to learn more about why this was added, or if there's no real reason / need, propose it to be removed.

[Type] Question

Most helpful comment

Is there a way to disable the drop caps feature? I also question the inclusion of this feature, however as long as there is a way to disable it (and other text settings) then this is fine. However, I'm struggling to find information about disabling specific options. I regularly remove features like text colouring, sizing etc from the classic editor to prevent clients from getting "creative" with their type colours and sizes so I'd see these abilities as really important in my development / deployment workflow.

All 13 comments

@JeroenSormani Medium has the feature.
2018-04-19 16_35_24

I hope that isn't the only/best argument for adding the feature 馃槄

So I've not seen the point in adding a feature like this for all while used by little. Its just a waste of space / setting and effort in BC in the future (when people realize it shouldn't be a setting anymore 馃)

In my mind adding such feature without real demand / need would mean leaving a door open for other useless settings that little use.
I see drop capping is a theme/style thing, not a content thing.

Hi @JeroenSormani,

Thanks for the suggestion! At this point, we're unlikely to remove the drop cap feature. However, we appreciate you taking the time to open this issue, and support your suggestion with research.

@danielbachhuber I'd love to get to know the thinking behind the feature though - is it indeed solely because Medium has it? I couldn't find a path back to where the idea came from, so I can't ask directly to anyone 馃

My own thinking is that this time (pre WP include) would be the best time possible time to deprecate a feature like this. Doing when its in WP core will likely never happen or bring bigger pains for the people involved with it at that time.

I suppose it's far too late for this, but this does feel like something that should be enabled via add_theme_support, not on-by-default.

I wouldn't say its too late, with the GB plugin active installs 'only' being at 10,000 (~ish) the impact of users using the drop cap feature is very minimal. If you wait till its in WP Core you'll have a real nightmare at hand removing it.

Is there a way to disable the drop caps feature? I also question the inclusion of this feature, however as long as there is a way to disable it (and other text settings) then this is fine. However, I'm struggling to find information about disabling specific options. I regularly remove features like text colouring, sizing etc from the classic editor to prevent clients from getting "creative" with their type colours and sizes so I'd see these abilities as really important in my development / deployment workflow.

It鈥檚 actually a showstopper for me. I code for three designers and none wants to move to Gutenberg unless I can kill the drop caps in the editor.

For those like me who ended up here while looking for a way to disable the drop cap toggle (which seems a very esoteric thing to include in core without at the very least an easy way to disable it), there are potentially related discussions going on here - https://github.com/WordPress/gutenberg/issues/15450 about a consistent way of controlling common block functionality. However, I'm not entirely sure that this will be dealt with there, given that it seems pretty specific to the paragraph block type.

Because there's no clear resolution in sight, this is what I've done for now:

```php
add_action('admin_head', 'biro_gutenberg_remove_drop_cap');
function biro_gutenberg_remove_drop_cap() {
echo '';
}
````

Being relatively new to Gutenberg I'm not entirely sure whether it will have knock-on effects in other areas. The class names are pretty generic, so it's not specifically targeting the drop cap field, just a toggle control in a blocks-font-size block.

Thanks @adriantoll; Try as I might, I found no combination of supplied filter, unregisterBlockStyle, etc that would achieve this. As dirty as it feels, forcing a hide via your editor css is the only way I could remove Drop Caps...

add_action('admin_head', 'biro_gutenberg_remove_drop_cap');
function biro_gutenberg_remove_drop_cap() {
    echo '<style>.blocks-font-size .components-base-control:first-of-type { margin-bottom: 0; } .blocks-font-size .components-toggle-control { display: none; }</style>';
}

The above mentioned solution is brilliant. I'm in the process of removing all the core blocks, font sizes/colors etc and only adding in the few I want. There are a few little options which can't be removed like the dropcaps, but hiding it works for me.

add_action('admin_head', 'biro_gutenberg_remove_drop_cap');
function biro_gutenberg_remove_drop_cap() {
    echo '<style>.blocks-font-size .components-base-control:first-of-type { margin-bottom: 0; } .blocks-font-size .components-toggle-control { display: none; }</style>';
}

This didn't work anymore for me (WP 5.5.1, Gutenberg 9.0.0). And from a first look there are no fitting CSS selectors to do this anymore. Waiting for theme.json to be finalized to remove this.

Looks like an experimental feature was added in WordPress 5.5 that can be used to disable the drop cap, I created a plugin that accomplishes this: https://github.com/joppuyo/remove-drop-cap

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nylen picture nylen  路  3Comments

wpalchemist picture wpalchemist  路  3Comments

jasmussen picture jasmussen  路  3Comments

mhenrylucero picture mhenrylucero  路  3Comments

BE-Webdesign picture BE-Webdesign  路  3Comments