Skip to content

Bad coding paradigms in Gutenberg #38293

Closed

Description

@ordigital

Description

  • Styles should be kept in stylesheet and not in page content. Attribute style should not be added to any tag! Any hardcoded values for colors, fonts etc. are unacceptable because they destroy website style consistency i.e. when using alternative hi-contrast css that inverts text/background colors for accessibility or when there's a button for changing global font size.
  • There is no easy way to customize toolbar and navigator to get rid of all of this bad formatting options and to replace them with classes that would do the same but in a proper way.
  • It is not possible to add custom button with more than one class.

This all makes Gutenberg a step backward in terms of coding standards. This problems could be easily avoided in TinyMCE by js but in Gutenberg it is just impossible to make editor produce proper HTML code.

Why Gutenberg devs focus only visual aspects and not on accessibility, customizability and separation of code and styles?

Step-by-step reproduction instructions

  1. Turn on Gutenberg
  2. Watch how you website content mixes with hardcoded styles

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. mkkeck commented on Jan 27, 2022

    @mkkeck

    See here too: #34613 (comment)

  2. added
    [Type] Feedback
    on Jan 28, 2022
  3. mtias commented on May 22, 2022

    @mtias
    Member

    @ordigital check this post that includes various examples of how you can control and disable style controls globally or on a per block basis.

    You can also add custom classes in the advanced panel, if that's what you refer to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] Feedback

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions