I just used it in a good case: with a switch button, I choose dynamically if I want to display one out of 2 blocks or not. so if the switch is off, my_awesome_custom_field:value shows 0 as a value. and with the data attribute, I target the class with [data-attribute="0"] and change the layout. so whereverIi hide, or display a section/block/ via a switch button, I can easily change the layout of other blocks that are shown =)
giving the option to publish opening times, and adress and contact details. they are both in the same block. soif one of them is not existing via the switch button, and its not rendred, it looks little odd. so thanks to the data atributes and the values from the switch 0 and 1 i can adjust the css for each of the block parts. love it, first i was happy to saw kevin gearys video about data attributes, and your video gave me also new thoughts and where opening my brain like crazy =) @@aperturedigitalmarketing
why not using comma to the selectors so it is less bloaded, like [data-bg-color="light"], [data-bg-color="light"] button,[data-bg-color="light"] span { background-color: var(-alert-color); color: var(white-color); } do I miss something?
Wonderful!
Thank you! Cheers!
How do u put a gutenberg content into and styled by bricks ?
I am using attributes and ACF to set a custom header. My problem is I cannot set the attributes on a bricks template.
is it possible to control h tag type in Bricks via custom field?
Yes, actually...you can do this with HTML tag: custom and then select dynamic data on the custom tag input.
I modified my answer after looking more at the Bricks options.
I just used it in a good case: with a switch button, I choose dynamically if I want to display one out of 2 blocks or not. so if the switch is off, my_awesome_custom_field:value shows 0 as a value.
and with the data attribute, I target the class with [data-attribute="0"] and change the layout. so whereverIi hide, or display a section/block/ via a switch button, I can easily change the layout of other blocks that are shown =)
Way to go! Sounds interesting 🤔 that's like a multi step condition it sounds like?
giving the option to publish opening times, and adress and contact details. they are both in the same block. soif one of them is not existing via the switch button, and its not rendred, it looks little odd. so thanks to the data atributes and the values from the switch 0 and 1 i can adjust the css for each of the block parts. love it, first i was happy to saw kevin gearys video about data attributes, and your video gave me also new thoughts and where opening my brain like crazy =)
@@aperturedigitalmarketing
why not using comma to the selectors so it is less bloaded, like [data-bg-color="light"],
[data-bg-color="light"] button,[data-bg-color="light"] span {
background-color: var(-alert-color);
color: var(white-color);
}
do I miss something?
You could do that if you want, sure. 👍🏻