What Is Warn Error and Debug Rule in Saas?

Md Shahab Uddin
Plus Marketing
Published in
3 min readJun 10, 2021

SaaS Is a CSS Preprocessor Used To Help Write CSS More Efficiently and With Less Work. Today We Will Learn Three Important Rules of SaaS.

Previously I have written about Saas Variable which you can read to better understand Saas Variable. Also I wrote an article about on Saas Import rule. T

Today we will learn three important rules in SaaS. Let’s dig into them.

Debug rule

It’s like console.log in JavaScript. You can print any value of a variable or expression through @debug. Let’s see an example.

Example :

Style.scss

We are printing the variable color and expression at a time in the console through debug

Warn Rule

NO one can write perfect code. So sometimes you need to remind yourself or users what kind of code you can write. This rules gives some form of validation. Form official doucementatio we know htat

“When writing mixins and functions, you may want to discourage users from passing certain arguments or certain values. They may be passing legacy arguments that are now deprecated, or they may be calling your API in a way that’s not quite optimal”

But this rule doesn’t stop code from runnig, it jsut shows a warning .

Example:

Look at the above code. I made a function to test whether the value is right or wrong.Whenever i gave value less than 16 , i can see a warning in the cosole which tells me to input value larger than 16. The task of @warning is to give us warning in the code.

Error rule:

It is similiar as Warn RUle. But there is a diffenrtece. IF we use warn , it won’t stop code from running. But while using error, the code won’t run, instead it will give an error.

Thanks for reading my article. Follow me for more future articles.

--

--