Copy block class styles to a global class?

Still learning here! Just styled my first real-world page, updating the class names to something meaningful. I wrongfully assumed that the block class was globally scoped, not restricted to the page. I can see now that I need to create an additional class if I want it to be globally available.

Question 1: can I make/copy the block class styles and make them global, or do I have to recreate them as global classes?

Question 2: What does the dot show/hide toggle in the block class field do? Toggling it, even when there are styles applied to the block class, doesn’t appear to toggle the styles on and off?

Hi @Graphnic,

There is currently an open feature request for this:

Please see this post for a working solution in the meantime:

For classes they automatically become active when any styles are added to them - the dot is there if you want to manually activate the class even before it has become automatically active.

Please see this discussion for more insights:

Thanks, all very helpful! Much appreciated.

I have upvoted the feature. My instinct is that block classes should be global by default, as they would be when hand coding a page. There isn’t really a paradigm for page-specific style sheets in the old world. I suppose it helps reduce bloat which is a good thing. It’s just not at all obvious that the class style is ONLY loaded on the current page. Perhaps instead of ‘Class’ being the label, it should be ‘Block Class’ or ‘Local Class’, or some such derivative, with the section below being labelled as ‘Global Classes’.

The dot toggles is still confusing me though… it doesn’t appear to do anything when styles are set to the class. Literally nothing! What am I missing?

Hi,

The toggle allows you to have the class/ID appear on the frontend even if there are no styles applied to the block.
Block classes and IDs don’t appear by default on the frontend. Only when styles have been added on the block level the class will appear.
If you have styles applied, toggling the class won’t do anything.

For copy/paste block styles to global classes I usually do this:

Best regards,
Johnny

Oh I see! Thanks!

Why doesn’t the dot disappear when styles are applied then? That would give a clue to the user that the feature only applies when there are no styles applied to the block class.

Additionally, I see now how to copy block styles into a global class… Is it however not possible to copy ‘grid’ styles in this manner? They don’t seem to carry over.

Why should it?
If anything, it should activate automatically when styles are applied to the block which would result in turning green.

While this would give the user a better idea and direct visual feedback, I’m not sure if that would be a proper solution, since there are more things to consider in direct relation.

Because, according to the above “If you have styles applied, toggling the class won’t do anything.” It’s not an indicator that styles are applied, nor is it a toggle to show/hide the styles in the editor… it’s a toggle that optionally enables a class name to be rendered on the element on the front end, in the event that it is empty of styles.

A toggle that behaves like an on/off but doesn’t actually do anything in a particular context is quite confusing. It needs to be only visible contextually to make sense, IMO.

Dots elsewhere clear values, which adds further confusion.

But perhaps I’m still misunderstanding it’s full purpose? Which is kinda my point, and why I asked!

Some people we introduced to Cwicly had exactly the same response, which is why I originally suggested this:

Agreed, like I stated in my previous post, but your proposition doesn’t make any sense to me.
Something like this would make more sense.
While writing this post, @StrangeTech shared the exact same thought.

Disagreed, there is a clear UI language to differentiate these.
Also, the color is quite descriptive. In addition, there is a tooltip available.
Didn’t read something like this here, ever.

Automating it makes total sense. The bit that threw me off entirely was that the control is still visible when there are active styles, but of course doesn’t do anything in this state.

I guess that would be alleviated if the control was hidden when styles are added, and only reappears if all styles are removed again. That’s assuming I have understood it correctly, and it doesn’t serve another function in that state.

Can you explain the differentiated UI language to me? I missed the colour differentiation, but I am colour blind, and tiny spots of colour are indistinguishable. The tooltips are a lifesaver. I’d be lost without them.

I’ve honestly not come here to criticise, or even propose a solution. My original post was to seek understanding of something I was struggling with. Now (I think) I understand the purpose of the control, that one aspect of the UX pattern seems counter intuitive… that the toggle can be showing as ‘hidden’, but the class is actually still active. It would make more sense to me, at least, that the control is invisible in this state, as interacting with it is purposeless.

Hi,

This is a valid point. I’ll add it to the bug tracker.

Thanks for the info about the trouble this can potentially create. I have also added this to the bug tracker as a priority.

Best regards,
Johnny

Thanks, FYI, it’s always good (as per WCAG) to use a visual differentiator as well as colour, for example a change of shape, and underline etc. My colour vision impairment is fairly mild, so I tend to struggle more in low light or when the colour is only present in small amount (like a dot!). Others will have far more difficulty. 1 in 12 men, and 1 in 200 women have some form of colour blindness!

Hi,

Very important info, thanks!
We are currently trying to improve accessibility within the editor. Please don’t hesitate to let us know if you notice other things that stick out.

Best regards,
Johnny

1 Like

Very impressed with the frontend accessibility so far, and by Louis’ fast response on the one #a11y issue I did raise. Backend, well, core isn’t great to start with is it! I have no idea how someone with a screen reader could begin to use it.

The biggest thing as far as Cwicly is concerned, other than use of colour, would be to consider those with cognitive differences or limited vision.

By that I mean the UI while, very orderly, relies upon developing visual memory of where the various functions are, in which of the various panels they reside, and indeed what the icon for a particular feature is. Without text indicators, this can be an issue for some both in the cognitive and visual realms. Tooltips help of course, but they add friction. It would really benefit from some more text signposts, but I know that’s not easy.

It’s a really hard one to balance. I know the original UI featured a more typical ‘drawers’ arrangement, and that comes with its own challenges and the current setup is MUCH neater. I don’t know what the answer is, to be honest, but thanks for considering it all! I’m not an expert in this by any stretch, but do do strive for inclusivity in my client work, which is mainly in the not-for-profit sector.

1 Like