Mixin doesn't accept a content block

hau.nguyen
hau.nguyen Posts: 23 🧑🏻‍🚀 - Cadet

hi team,

We have followed instructions (https://docs.spryker.com/docs/scos/dev/front-end-development/202307.0/yves/yves-multi-themes.html#extending-scss) on how to extend SCSS, but there seems to be a bug related to the SCSS mixin

SassError: Mixin doesn't accept a content block.

In case I remove the 2 {} marks in the body of basic-typography it works well for me

Thanks

Hau Nguyen

Tagged:

Answers

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 81 🏛 - Council (mod)
    edited September 2023

    The widget you´re using, doesn´t take a content selector, @content, that´s why you cannot use it the way you did before. The on you used you can just include it like you did in the first example.

    This following mixin can accept a content


    @mixin product-group-widget-product-item-color-selector($name: '.product-item-color-selector') {

    @include product-group-widget-color-selector($name) {
    
    @content;
    
    }
    
    }