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

Style Modifyer to go with Styles #27384

Closed
nickfmc opened this issue Nov 30, 2020 · 5 comments
Closed

Style Modifyer to go with Styles #27384

nickfmc opened this issue Nov 30, 2020 · 5 comments
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Enhancement A suggestion for improvement.

Comments

@nickfmc
Copy link

nickfmc commented Nov 30, 2020

Currently we have the block Styles setting which is just applying a class. For good reason to not have any conflicting styles we only allow one Style per block to be selected. It would be really nice if there was another group option we could add for Style Modifiers, that allowed users to select multiple options per block.

Take to column block for instance, I usually register a block style for a "No gutter" version then I also have one for "break early" that goes to stacked columns earlier than the default. Now there is no way for my client to click No gutter and Break Early so I have to manually add classes to make it work.

If there was a "Style" that only allows either or and and then an additional option for "Style Modifiers" a lot more could be done out of the box with the current blocks making them a lot less limiting.

@mapk
Copy link
Contributor

mapk commented Dec 1, 2020

Related: #19367

I'd like to just open this up to adding multiple classes.

@mapk mapk added [Feature] UI Components Impacts or related to the UI component system [Type] Enhancement A suggestion for improvement. labels Dec 1, 2020
@nickfmc
Copy link
Author

nickfmc commented Dec 1, 2020

perhaps, however for the client using a theme the styles are so easy. having a style modifier would allow the developer to only have options available on a per block basis and gives you a user friendly name to use associated with your class. Across a site just using classes it's not very end user friendly.

@mapk
Copy link
Contributor

mapk commented Dec 1, 2020

In that case, should the developer just provide "Style variations" for the client if they want to restrict the ways in which the block is displayed?

I think the Advanced section should allow more advanced configuring. Like adding classes for CSS that maybe you wrote yourself.

@nickfmc
Copy link
Author

nickfmc commented Dec 1, 2020

right, I'm just thinking a lot of developer workflow is to create a site that is going to be built out by an end user. style variation only allow one per block to be selected, taking the Column block for instance I would register the following "style modifies" attached to the Column block type

  • No Gutter
  • Stack Early
  • Reverse Order on Mobile

My Client may need any combination of these for what they are doing. currently giving them a page full of class names and which blocks they work on is a messy process. With a Style modifier even simple blocks would become a lot more flexible for developers to provide a nice user experience for their clients.

@mtias
Copy link
Member

mtias commented Jul 14, 2021

Closing as overlapping with #14598.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants