This is the fourth part of our Sass series. This part covers built-in modules, functions, and modularization in Sass. Part 1 – Introduction, variables, and nesting in Sass. Part 2 – @-rules and Directives. Part 3 – Operators and control directives in Sass WHAT YOU WILL LEARN Sass modularization, built-in modules, and functions in Sass. Writing custom functions in Sass. Sass modularization Sass moved built-in functions into separate built-in modules in its Dart version DartSass. The C++ version of the preprocessor LibSass and the Ruby version of the preprocessor RubySass do not have this modification. Sass introduces @use and @forward which can be used to create custom modules. @forward makes mixins, variables, and functions in your Sass module available in other Sass sheets. The modules with these forwarded variables, mixins, and functions, are loaded to Sass sheets using @use. The built-in modules have functions and mixins which can be used to work on data types and selectors. Functions to observe the internal operations of Sass are also combined into a module. Functions can be classified into three types. Functions to work with values of different data types, selector functions, and introspection functions….
Did you find this content useful?If yes please donate and help us maintain Truetocode
[paypal-donation purpose="A good cause" reference="Ref123" return_page="https://truetocode.com/thanks-you/" button_url="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif"]
Share this page in social media platforms