@David CSS can be applied to HTML elements (div, p, ul, etc…), ID’s (#id), and classes (.class), so you’re right, CSS can be applied to ID’s. I think it’s more of a best practice to avoid being over specific in CSS. ID’s have a very high specificity, so a class can’t override an ID without adding !important. Adding !important is a bad habit to get into, so adding CSS to classes keeps things a bit cleaner and makes the CSS reusable in different areas. This is an oversimplification, but that’s kind of the idea. The highest specificity, I think, is adding inline styles directly into your HTML tag, which is not really a best practice these days either. It all technically works, but you can run into trouble (specificity wars) when you’re having to increase specificity more and more to override things.
So, the class field is basically applying a class to a block, where the CSS is tied to that block (similar to an ID, but less specific). You can apply that same class elsewhere, but it’s still tied to block it was created with. It’s similar to if you tried adding custom CSS to the Custom CSS section of a block. It’s tied to that block, so if the block gets deleted, so do the custom CSS properties.
I think Cwicly does this right because you can have your specific block class styling, additional classes for use when you create a custom class in the stylesheet (or pull in classes from a framework), and global classes, which are similar to “additional classes”, only you’re able to style them directly in the visual editor.
@Louis I don’t think you necessarily need to change anything, but making the documentation clear on exactly how things work, with examples (like the Tailwind documentation), would be best. I’ve been following along with the Bricks development, but it’s honestly turned into a circus in my opinion. Too many people trying to turn Bricks into Oxygen or Elementor, and too many people who don’t really understand how HTML, CSS, and JS work trying to make the builder do things that are way overkill.
Case in point is the new Bricks Section, Div, and Block elements… Before, they had a wonderful “Container” block that could be any of those things, but people didn’t understand how it was supposed to work, so now they have 4 blocks, when all you really needed was the one. It was a case where I think the effort could have been better spent educating the users on how things are supposed to work.
I think with Cwicly, as in life, @Louis, you should stay true to your vision. Try documenting things clearly so it’s easy for people to look up exactly how something’s supposed to work. Don’t go down the rabbit hole of trying to make everyone happy or you’ll end up with a Frankenstein product that you will not longer enjoy working on. I appreciate the way you think and how you create the minimum pieces to get the most things done. People are used to page builders and don’t like Gutenburg, but that will change more and more as time goes on. People are already making the switch to Gutenburg because it’s where WP is going. Some people just get stuck in their ways and don’t want to change, but if you keep moving with your vision, the day will come when people will start realizing that page builders are kind of old fashioned.
I could feel your frustration in the live stream today and I feel the same way when people, who really don’t have a clue, are essentially shaping the future of other tools like Bricks. Oxygen was almost the opposite where they didn’t really listen to what people wanted and did it their way. Obviously they listened some, but they made it the way they wanted. Apple does the same thing. A good product will be used by the right people. It’s probably easier to support a product when most of the users are half way saavy anyway, and not when you have a bunch of people who don’t really understand how to build a website.
Anyway, sorry @David for hijacking your thread, but I wanted to also help clarify things and let @Louis know that he doesn’t have to turn Cwicly into a monster just to try to please the people who really don’t understand in the first place. Build a product for people who “get it” and fill that niche that Oxygen is losing and then look for ways to maybe simplify and refine things over time. These are just my thoughts, but look at GeneratePress too, that guy doesn’t add anything that he doesn’t want to have to support later.
To sum up, haha, don’t lose your vision because you CAN’T make everyone happy. Keep things as minimal, simple, and clean as possible, with really good documentation, and the right people will figure it out and use it. Everyone else will be playing in the circus of madness over at Bricks, Breakdance, and wherever. Too many cooks in the kitchen is never a good thing!