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

Bad coding paradigms in Gutenberg #38293

Closed
ordigital opened this issue Jan 27, 2022 · 2 comments
Closed

Bad coding paradigms in Gutenberg #38293

ordigital opened this issue Jan 27, 2022 · 2 comments
Labels
[Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable

Comments

@ordigital
Copy link

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

@mkkeck
Copy link

mkkeck commented Jan 27, 2022

See here too: #34613 (comment)

@carolinan carolinan added the [Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable label Jan 28, 2022
@mtias
Copy link
Member

mtias commented May 22, 2022

@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
Labels
[Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable
Projects
None yet
Development

No branches or pull requests

4 participants