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

Block: Separator style class #10569

Closed
webmandesign opened this issue Oct 12, 2018 · 5 comments
Closed

Block: Separator style class #10569

webmandesign opened this issue Oct 12, 2018 · 5 comments
Labels
[Feature] Blocks Overall functionality of blocks

Comments

@webmandesign
Copy link
Contributor

Bug description

Not sure why the "Short line" Separator block style produces is-style-default CSS class:

Expected behavior

Should produce is-style-short CSS class instead.
A theme can style the separator (<hr> tag) full width by default actually.

Screenshots

Separator block style CSS class

Additional context

Gutenberg version 4.0.0-rc.1

@Soean Soean added the [Feature] Blocks Overall functionality of blocks label Oct 12, 2018
@aduth
Copy link
Member

aduth commented Oct 15, 2018

cc @youknowriad re: #7362, Was it intentionally named "default"?

Regardless, this seems like it would be a breaking change for existing blocks to change without deprecation, and it's not obvious that we support migrations of styles.

@youknowriad
Copy link
Contributor

There was no particular reason for it to be named "default" aside from being the style that was already there for the separator. and yes there's no way to ensure style backward compatibility right now.

So I'm in the fence, I mean I can see the reasoning and we could argue that we're still early that we can afford to break compatibilty but in the other hand it's just a className, is it worth breaking backward compatibility?.

@webmandesign
Copy link
Contributor Author

Thanks for the input guys.

In my opinion, as the class is obviously wrong, confusing, it should be updated. (There is maybe possibility of something similar being applied in other blocks?)

I was actually pretty confused as theme developer about how the block is rendered and styled:
Without applying any custom block styles in my theme, the "Short Line" and "Wide Line" separators were actually the same. And when I dug deeper, I've spotted this "default" class which actually does not really tell me I should expect the "Short Line" styling as selected in Gutenberg editor by default.

And like I've mentioned, the "default" can and will mean something different in every theme.

@SnazzySnail8
Copy link

Hey guys,
I'm a wordpress user and currently the "Short Line" and "Wide Line" separators are displaying as the same Full Width separator on my site. Regardless of naming convention, it is a bug if it is not displaying as the names suggest.
Thanks!

@mapk
Copy link
Contributor

mapk commented Feb 5, 2019

@webmandesign Thanks for finding this problem!

In light of the discussion in the PR, I'm going to close this issue and reference the flipped solution provided by the issue #13660.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks
Projects
None yet
Development

No branches or pull requests

6 participants