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

Give theme.json elements the same name as the HMTL element (if exist) #53957

Open
huubl opened this issue Aug 25, 2023 · 0 comments
Open

Give theme.json elements the same name as the HMTL element (if exist) #53957

huubl opened this issue Aug 25, 2023 · 0 comments
Labels
[Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.

Comments

@huubl
Copy link
Contributor

huubl commented Aug 25, 2023

Give Gutenberg theme.json elements the same name as the HMTL element (if exist).

Why?

  • The theme.json caption element is referencing to the HTML element figcaption. This is confusing, because there is a HTML caption element that can be used in tables.
  • I think it's best to stay as close to existing standards as possible.
  • People editing the theme.json directly are most likely familiar with HTML tags. So they know <a> is a link element. But someone new to Gutenberg may not know that 'link' must be used to target the <a> tag.
  • Plus: why not use the HTML-elements naming? Since more human readable names can be used in the editor, e.g. h1 > Heading 1

If the 'link' element is to remain, I would suggest adding this as an alias to the (to be added) theme.json 'a' element.

Gutenberg element HTML element Is same
link a
heading non existing ✔️
h1 h1
h2 h2
h3 h3
h4 h4
h5 h5
h6 h6
button button
caption figcaption
cite cite
@jordesign jordesign added [Type] Enhancement A suggestion for improvement. [Package] Style Engine /packages/style-engine labels Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.
2 participants