Bricks + BEM: Adding "modifier" CSS using the "root" feature

Поделиться
HTML-код
  • Опубликовано: 5 мар 2023
  • ⛑️ Services I am now offering:
    Get a Website Quote: wagepirate.com/?ff_landing=12
    WP Consulting (I offer advice, you do the work): wagepirate.com/?fluent-bookin...
    WP Support (I do the work for you): wagepirate.com/?ff_landing=15
    📩 Get my free WordPress Newsletter (join 1600+ other people)
    Subscribe ➜ wagepirate.com/subscribe/?utm...
    (I share tips covering Bricks, FunnelKit, WooCommerce, business & marketing strategy + WordPress news)

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

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

    Are you using BEM?

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

      I have never here of BEM until today

  • @GrantAmbrose
    @GrantAmbrose  Год назад +3

    I just realised that you will need to enable the new setting "Disable chaining element & global class" in WP Admin > Bricks > Settings > Performance for this to work.

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

    Great video as always!

  • @sevenelven
    @sevenelven 8 месяцев назад +1

    Is it valid to modify the modifier class through the Bricks UI instead of using root in the custom CSS box?

    • @GrantAmbrose
      @GrantAmbrose  8 месяцев назад +1

      Cwicly has what it calls "Relative Styling" which allows you to do it. Bricks doesn't. What I mean is, if you want to make a dark version of the card, you need to target the parent (make its background black) and then you need to target the children and do changes (text to white, maybe a few other things). but its the targeting children that Bricks can't do, unless that has been released recently?

    • @OneBrokeBloke
      @OneBrokeBloke 2 месяца назад

      Ty, i had no idea why you started writing CSS, but that makes sense.
      Also, RIP Cwicly

  • @farhan-app
    @farhan-app Год назад

    Site looks great pal!

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

      Thanks Farhan! I'm happy with it. Now I just have to add more content 😎

  • @Nima-Norouzi
    @Nima-Norouzi Год назад

    I started to use BEM recently and am trying to convert my old templates with this method. Regarding the inline CSS, you're right, that setting is new to bricks, I activated on my website, but honestly not sure how that affects.

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

      I read that Bricks are testing this "disable class chaining" feature and then they will move our Global CSS classes to their own CSS file if it all works OK. Fingers crossed!

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

    No worries, custom css is being rendered that way, even with Elementor. I believe it is due the fact that every time you save page/ template, Bricks should open the main css file for writing, delete an old code, put the new css to the right place in the main file and save. Many unnecessary requests.

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

      I read that Bricks are testing this "disable class chaining" feature and then they will move our Global CSS classes to their own CSS file if it all works OK. Fingers crossed!

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

    BEM not the best methodology for Bricks