Go ProSign in
Convert SCSS (Sass) to CSS-in-JS

Convert SCSS (Sass) to CSS-in-JS


    Use JavaScripts Spread Operator to Apply Style Objects Returned from CSS-in-JS Mixins

    Oleg IsonenOleg Isonen

    When defining CSS-in-JS style to use JavaScript Object Notation, mixins can no longer return strings as they can't be added to the object.

    In this lesson, you will convert the boxShadow and buttonSize mixins that return strings to return objects instead and spread those objects into the style object we are applying to an HTML Element.

    You must be a Member to view code