Greenshift framework element block is a universal block and a new workflow for building designs. Unlike other blocks, it doesn’t use WordPress wrappers and classes and has a vanilla HTML output.
Attribute system
Regular GS blocks are working based on attributes + you can add the class system to them. Element block doesn’t use attributes for saving styles, it uses a class system.
Element block has variations for each tag. For example, you add “DIV” block (which is variation of Element block). When you do this, on site you will have just DIV tag and nothing more. Then, you can assign local class to the block or attach local styles to block (then it will add a data-style attribute)
Let’s compare the output of 4 different blocks:
- Element DIV block without classes and styles
- Element DIV block with local class
- Element DIV block with local styles
- Container block with attributes
If you see, the Element block has cleaner output. This doesn’t mean that Container block is bad, as you can see, it also uses 1 DOM element, but at the same time, it uses auto ids, WordPress classes, etc. So, if you need perfect elements – Element Framework workflow is preferable
No WordPress wrapper
Element block has another thing to keep in mind. It has no wrappers, so, you can simply put, for example, several SPAN Elements near each other and they will work as a single line. Or you can use A Element and put other blocks inside. It will be still an Inline element.
When you use other blocks, they will have WordPress wrappers and they will be always Block Elements.
This has benefits and negative sides.
Benefits: you can mix several inline blocks together and they will work as a common inline element.
When you use Advanced text block – you can’t do this, because it will keep your own blocked area.
But in some situations, this makes negative side. It’s because you need to keep in mind that inline elements can’t keep a central space and you can’t align them relative to their space, so, you will need to put them in another Block with blocked structure.
Visual helpers
Greenshift has many visual helpers that can help to add attributes visually. But in fact the Element block doesn’t have wrappers, then it’s not possible to use visual helpers in this block.
Only HTML-related options
While regular blocks can have many different options for functionality, Element block has only options related to HTML and class system.
Interface options
Element block can be customized in Greeshift settings – Interface. There are two options there.
You can close local styles by default
When do you need this? It’s in cases when you prefer to use the CLASS first approach and you don’t plan to put anything inside local styles.
The second option is Priority for Element block. By default, all blocks are visible in the inserter, but you can change this and disable the Element block, or opposite, you can disable core Greenshift Content blocks (Image, Text, Heading, List). Disable doesn’t mean that they will be removed. It means that they will be not visible in Inserter.
Code helper for HTML/CSS fields
Element block can be used with regular HTML instead inner blocks.
If you want to enable code syntax helper for HTML, you need to install free Smart Code AI plugin
Layout options
When you use Row, Container or other Layout blocks, plugin will add several layers. In Element block, you have full control for each layer and you can build your own workflow, we also provide Content Area section that uses best web dev scenarios of organizing layout. It will also inherit automatically width from Blocksy, Astra, Kadence, block themes or you can set custom layout width in Greenshift – settings – CSS management. Element block has also Flex and Grid helpers