Use Attribute Selectors To Style Elements In Bricks Builder

Поделиться
HTML-код
  • Опубликовано: 21 янв 2025

Комментарии • 12

  • @DimitryChamy
    @DimitryChamy Год назад +1

    Wonderful!

  • @user-mfsc-2024
    @user-mfsc-2024 Год назад

    How do u put a gutenberg content into and styled by bricks ?

  • @AlwaysSlimShadyBro
    @AlwaysSlimShadyBro 11 месяцев назад

    I am using attributes and ACF to set a custom header. My problem is I cannot set the attributes on a bricks template.

  • @noipowszystkim
    @noipowszystkim Год назад +1

    is it possible to control h tag type in Bricks via custom field?

    • @aperturedigitalmarketing
      @aperturedigitalmarketing  Год назад +2

      Yes, actually...you can do this with HTML tag: custom and then select dynamic data on the custom tag input.

    • @aperturedigitalmarketing
      @aperturedigitalmarketing  Год назад +1

      I modified my answer after looking more at the Bricks options.

  • @dynamic-homepages
    @dynamic-homepages Год назад +2

    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 =)

    • @aperturedigitalmarketing
      @aperturedigitalmarketing  Год назад +1

      Way to go! Sounds interesting 🤔 that's like a multi step condition it sounds like?

    • @dynamic-homepages
      @dynamic-homepages Год назад

      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

  • @konstantinosntamadakis9439
    @konstantinosntamadakis9439 Год назад

    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?