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

Is there a way to remove the .is-style prefix in an element? #17554

Closed
pmqa opened this issue Sep 24, 2019 · 3 comments
Closed

Is there a way to remove the .is-style prefix in an element? #17554

pmqa opened this issue Sep 24, 2019 · 3 comments
Labels
[Feature] Block API API that allows to express the block paradigm. [Feature] Theme Style Variations Related to style variations provided by block themes Needs Technical Feedback Needs testing from a developer perspective. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.

Comments

@pmqa
Copy link

pmqa commented Sep 24, 2019

I'm using wp.blocks.registerBlockStyle to add a style variation to a text element:

wp.blocks.registerBlockStyle( 'core/heading', { name: 'default', label: 'Default', isDefault: true, } );

Is there an option to remove the .is-style prefix that appears in this element, in this case .is-style-default?

Maybe we could add a hasPrefix: false parameter?

@swissspidy
Copy link
Member

What‘s the use case for that?

The default style doesn‘t add a class name anyway AFAIK.

@pmqa
Copy link
Author

pmqa commented Sep 25, 2019

A cleaner style (sass) codebase. Being able to use the same clean style classes everywhere: .page-title instead of .is-style-page-title.

@swissspidy swissspidy added [Feature] Theme Style Variations Related to style variations provided by block themes [Type] Enhancement A suggestion for improvement. [Feature] Block API API that allows to express the block paradigm. Needs Technical Feedback Needs testing from a developer perspective. labels Sep 25, 2019
@jstrangfeld
Copy link

This is a duplicate of #11763

@swissspidy swissspidy added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Feature] Theme Style Variations Related to style variations provided by block themes Needs Technical Feedback Needs testing from a developer perspective. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants