{"id":7086,"date":"2024-04-24T10:26:28","date_gmt":"2024-04-24T04:56:28","guid":{"rendered":"https:\/\/weblizar.com\/blog\/?p=7086"},"modified":"2025-08-11T11:58:16","modified_gmt":"2025-08-11T06:28:16","slug":"what-is-sass","status":"publish","type":"post","link":"https:\/\/weblizar.com\/blog\/what-is-sass\/","title":{"rendered":"What is SASS (Syntactically Awesome Style Sheet)"},"content":{"rendered":"<h2>What is SASS?<\/h2>\n<p>What is SASS:\u00a0 SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor, which is very helpful in reducing repetition with CSS and saving time. It is a more stable and powerful CSS extension language that describes the style of the document structurally.<\/p>\n<h2>Reasons To Use Sass<\/h2>\n<p>Following are some reasons behind using Sass:<\/p>\n<p>Sass is a pre-processing language and it has its syntax for CSS.<br \/>\n1. It is easy, short, and clean in a programming form.<br \/>\n2. It has some features that are used for creating CSS facilitates writing code more efficiently and is easy to maintain.<br \/>\n3. It contains all the features of CSS along with some advanced features.<br \/>\n4. It provides document-style presentation better than flat CSS.<br \/>\n5. It facilitates reusability methods, logic statements, and some of the built-in functions like color manipulation, mathematics, and parameter lists.<br \/>\n6. It facilitates you to keep your responsive design project more organized.<br \/>\n7. You don&#8217;t need to repeat similar CSS again and again in your project.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Recommended Post:<\/strong><\/span>\u00a0<a title=\"How to Pass Data in PHP, Javascript and CSS\" href=\"https:\/\/weblizar.com\/blog\/how-to-pass-data-in-php-java-and-css\/\" target=\"_blank\" rel=\"bookmark noopener\">How to Pass Data in PHP, Javascript, and CSS<\/a><\/p>\n<h2>Advantages of SASS<\/h2>\n<p>1. It helps in writing clean CSS in a programming form which helps designers and developers work more efficiently and quickly.<br \/>\n2. It allows one to write CSS quickly.<br \/>\n4. Sass is suited to all versions of CSS, we can use any available CSS libraries.<\/p>\n<h2>Needs for SASS<\/h2>\n<p>1. <strong>Operating System<\/strong> \u2212 Cross-platform<br \/>\n2. <strong>Browser Support<\/strong> \u2212 IE (Internet Explorer 8+), Firefox, Google Chrome, Safari, Opera<br \/>\n3. <strong>Programming Language<\/strong> \u2212 Ruby<\/p>\n<h2>The installation process of Ruby<\/h2>\n<p>Download Ruby from <a href=\"https:\/\/rubyinstaller.org\/downloads\/\">here<\/a> and run the .exe file.<\/p>\n<p>after completing the Installation. go to the start menu and open the command prompt with ruby.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7088\" src=\"https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/sass-install8-300x72.png\" alt=\"\" width=\"300\" height=\"72\" srcset=\"https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/sass-install8-300x72.png 300w, https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/sass-install8.png 622w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Run the following command: gem install sass<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7089\" src=\"https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/sass-install9-300x114.png\" alt=\"\" width=\"300\" height=\"114\" srcset=\"https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/sass-install9-300x114.png 300w, https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/sass-install9.png 623w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2>SASS Example<\/h2>\n<p>Create an HTML file having the following code:<\/p>\n<p><strong>Also Checkout: <\/strong><a title=\"The Present And The Future Of SaaS\" href=\"https:\/\/weblizar.com\/blog\/present-future-saas\/\" rel=\"bookmark\">The Present And The Future Of SaaS<\/a><\/p>\n<p><code><br \/>\n&lt;html&gt;<br \/>\n&lt;head<span class=\"tag\">&gt;<\/span><br \/>\n&lt;title<span class=\"tag\">&gt;<\/span>\u00a0example\u00a0of\u00a0sass<span class=\"tag\">&lt;\/<\/span>title<span class=\"tag\">&gt;<\/span><br \/>\n&lt;link\u00a0rel=\"stylesheet\"\u00a0type=\"text\/css\"\u00a0<span class=\"attribute\">href<\/span>=<span class=\"attribute-value\">\"style.css\"\u00a0<\/span><span class=\"tag\">\/&gt;<\/span><br \/>\n<span class=\"tag\">&lt;\/<\/span><span class=\"tag-name\">head&gt;<\/span><\/code><\/p>\n<p><code><\/code><code><span class=\"tag\">&lt;<\/span><span class=\"tag-name\">body<\/span><span class=\"tag\">&gt;<\/span><br \/>\n<span class=\"tag\">&lt;<\/span><span class=\"tag-name\">h1<\/span><span class=\"tag\">&gt;Weblizar\u00a0<\/span>Sass\u00a0Example<span class=\"tag\">&lt;\/<\/span><span class=\"tag-name\">h1<\/span><span class=\"tag\">&gt;<\/span><br \/>\n<\/code><br \/>\n<code><br \/>\n<span class=\"tag\">&lt;<\/span><span class=\"tag-name\">h3<\/span><span class=\"tag\">&gt;<\/span>Welcome\u00a0to Weblizar<span class=\"tag\">&lt;\/<\/span><span class=\"tag-name\">h3<\/span><span class=\"tag\">&gt;<\/span><br \/>\n<span class=\"tag\">&lt;<\/span><span class=\"tag-name\">p<\/span><span class=\"tag\">&gt;Web<\/span>\u00a0solution for all .<span class=\"tag\">&lt;\/<\/span><span class=\"tag-name\">p<\/span><span class=\"tag\">&gt;<\/span><br \/>\n<span class=\"tag\">&lt;\/<\/span><span class=\"tag-name\">body<\/span><span class=\"tag\">&gt;<\/span><br \/>\n<span class=\"tag\">&lt;\/<\/span><span class=\"tag-name\">html<\/span><span class=\"tag\">&gt;<\/span><br \/>\n<\/code><br \/>\nNow create a file named &#8220;style.scss&#8221;. It is similar to a CSS file. The only difference is that it is saved with the &#8220;.scss&#8221; extension. Put Both, .htm and .scss files inside the folder ruby. You can save your .scss file in the folder ruby\\lib\\sass\\ (before this process, create a folder as sass in the lib directory).<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Suggested Post:<\/strong><\/span>\u00a0<a title=\"How To Minify CSS And JavaScript Of Your WordPress Website\" href=\"https:\/\/weblizar.com\/blog\/minify-css-javascript-files\/\" target=\"_blank\" rel=\"bookmark noopener\">How To Minify CSS And JavaScript Of Your WordPress Website<\/a><\/p>\n<p>Now, execute the following code: sass &#8211;watch style.scss:style.css<\/p>\n<p>It will create a new CSS file named &#8220;style.css&#8221; inside the root folder automatically. Whenever you change the SCSS file, the style.css file will be changed automatically.<\/p>\n<p>The style.css file will have the following code when you run the above-given command<\/p>\n<p><code><br \/>\n<span class=\"pln\">h1<\/span><span class=\"pun\">{<\/span><span class=\"pln\"><br \/>\ncolor<\/span><span class=\"pun\">:<\/span> <span class=\"com\">#AF80ED;<\/span><span class=\"pln\"><br \/>\n<\/span><span class=\"pun\">}<\/span><\/code><\/p>\n<p><code>h3<span class=\"pun\">{<\/span><span class=\"pln\"><br \/>\ncolor<\/span><span class=\"pun\">:<\/span> <span class=\"com\">#DE5E85;<\/span><span class=\"pln\"><br \/>\n<\/span><span class=\"pun\">}<\/span><\/code><\/p>\n<h2>Sass Syntax<\/h2>\n<p><strong>SCSS Syntax:<\/strong> The SCSS (Sassy CSS) can be specified as an extension of CSS syntax. It simply means that every valid CSS is a valid SCSS. SCSS makes it easy to maintain large style sheets. It uses the extension &#8220;.scss&#8221;.<\/p>\n<p><strong>Indented syntax:<\/strong> Indented syntax is the older syntax and is called Sass. You have to write CSS concisely for using this type of syntax. It uses the extension .sass&#8221;.<\/p>\n<h2 class=\"h2\">Sass Indented Syntax<\/h2>\n<p>SASS Indented syntax or SASS is an alternative to CSS-based SCSS syntax. It has the following features:<\/p>\n<p>1. It uses indentation rather than {and} to delimit blocks.<br \/>\n2. It uses newlines instead of semicolons (;) to separate statements.<br \/>\n3. Property declaration and selectors must be placed on their line and statements within {and} must be placed on a new line and indented.<\/p>\n<p>See the following SCSS code:<br \/>\n<code>.weblizar_id<\/code><code>{<br \/>\n<span class=\"attribute\">color\u00a0<\/span>=\u00a0<span class=\"attribute-value\">red<\/span>;<br \/>\n<span class=\"attribute\">font-size<\/span>= px;<br \/>\n}<br \/>\n<\/code><br \/>\nThis syntax is older so it is not recommended to use new Sass files. If you use this file, you will get a display error.<\/p>\n<h2 class=\"h2\">Syntax Differences of Sass<\/h2>\n<p>Most of the CSS and SCSS syntaxes are compatible with SASS but there are some differences also. You can see the differences in the following sections:<\/p>\n<p><strong>People Also Check: <\/strong><a title=\"How to Pass Data in PHP, JavaScript and CSS\" href=\"https:\/\/weblizar.com\/blog\/how-to-pass-data-in-php-java-and-css\/\" rel=\"bookmark\">How to Pass Data in PHP, JavaScript, and CSS<\/a><\/p>\n<p><strong>1. Property syntax:<\/strong><\/p>\n<p>You can declare Sass properties in two ways:<\/p>\n<ul>\n<li>Declare properties similar to CSS but without semicolon (;).<\/li>\n<li>Declare a colon ( : ) as a prefix to every property name.<\/li>\n<\/ul>\n<p><strong>For example:<\/strong><\/p>\n<p><code>.weblizar_id<\/code><code>{<br \/>\n<span class=\"attribute\">:color\u00a0<\/span><span class=\"attribute-value\">red<\/span>;<br \/>\n<span class=\"attribute\">:font-size\u00a0<\/span>px;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>Both property declaration methods i.e. without semicolon and colon prefixed to property name can be used by default but you should use only one property syntax to specify when you use the: property_syntax option.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is SASS? What is SASS:\u00a0 SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor, which is very helpful in reducing repetition with CSS and saving time. It is a more stable and powerful CSS extension language that describes the style of the document structurally. Reasons To Use Sass Following are some reasons behind using Sass:<\/p>\n","protected":false},"author":5,"featured_media":7095,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[77],"tags":[1140,1139,1141,1138],"class_list":["post-7086","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-how-to-use-sass-css","tag-sass-css","tag-syntactically-awesome-stylesheet","tag-what-is-sass"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is SASS (Syntactically Awesome Style Sheet) - Weblizar Blog<\/title>\n<meta name=\"description\" content=\"What is SASS? SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor, which is very helpfull in to reduce repetition with CSS and saves time.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is SASS (Syntactically Awesome Style Sheet) - Weblizar Blog\" \/>\n<meta property=\"og:description\" content=\"What is SASS? SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor, which is very helpfull in to reduce repetition with CSS and saves time.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/\" \/>\n<meta property=\"og:site_name\" content=\"Weblizar Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/weblizarwp\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-24T04:56:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T06:28:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/what-is-sass.jpg?fit=900%2C563&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Danish Ansari\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@weblizar\" \/>\n<meta name=\"twitter:site\" content=\"@weblizar\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Danish Ansari\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is SASS (Syntactically Awesome Style Sheet) - Weblizar Blog","description":"What is SASS? SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor, which is very helpfull in to reduce repetition with CSS and saves time.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/","og_locale":"en_US","og_type":"article","og_title":"What is SASS (Syntactically Awesome Style Sheet) - Weblizar Blog","og_description":"What is SASS? SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor, which is very helpfull in to reduce repetition with CSS and saves time.","og_url":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/","og_site_name":"Weblizar Blog","article_publisher":"http:\/\/www.facebook.com\/weblizarwp","article_published_time":"2024-04-24T04:56:28+00:00","article_modified_time":"2025-08-11T06:28:16+00:00","og_image":[{"width":900,"height":563,"url":"https:\/\/i0.wp.com\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/what-is-sass.jpg?fit=900%2C563&ssl=1","type":"image\/jpeg"}],"author":"Danish Ansari","twitter_card":"summary_large_image","twitter_creator":"@weblizar","twitter_site":"@weblizar","twitter_misc":{"Written by":"Danish Ansari","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/#article","isPartOf":{"@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/"},"author":{"name":"Danish Ansari","@id":"https:\/\/weblizar.com\/blog\/#\/schema\/person\/d317218747ba5e5aa51886062ac0b628"},"headline":"What is SASS (Syntactically Awesome Style Sheet)","datePublished":"2024-04-24T04:56:28+00:00","dateModified":"2025-08-11T06:28:16+00:00","mainEntityOfPage":{"@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/"},"wordCount":696,"commentCount":1,"image":{"@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/#primaryimage"},"thumbnailUrl":"https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/what-is-sass.jpg","keywords":["how to use sass css","sass css","Syntactically Awesome Stylesheet","what is sass"],"articleSection":["Php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/","url":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/","name":"What is SASS (Syntactically Awesome Style Sheet) - Weblizar Blog","isPartOf":{"@id":"https:\/\/weblizar.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/#primaryimage"},"image":{"@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/#primaryimage"},"thumbnailUrl":"https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/what-is-sass.jpg","datePublished":"2024-04-24T04:56:28+00:00","dateModified":"2025-08-11T06:28:16+00:00","author":{"@id":"https:\/\/weblizar.com\/blog\/#\/schema\/person\/d317218747ba5e5aa51886062ac0b628"},"description":"What is SASS? SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor, which is very helpfull in to reduce repetition with CSS and saves time.","breadcrumb":{"@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/#primaryimage","url":"https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/what-is-sass.jpg","contentUrl":"https:\/\/weblizar.com\/blog\/wp-content\/uploads\/2017\/11\/what-is-sass.jpg","width":900,"height":563,"caption":"what is sass"},{"@type":"BreadcrumbList","@id":"https:\/\/weblizar.com\/blog\/what-is-sass-syntactically-awesome-stylesheet\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/weblizar.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What is SASS (Syntactically Awesome Stylesheet)"}]},{"@type":"WebSite","@id":"https:\/\/weblizar.com\/blog\/#website","url":"https:\/\/weblizar.com\/blog\/","name":"Weblizar Blog","description":"Update yourself with all the latest tech news revolving around wordpress all at one place","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/weblizar.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/weblizar.com\/blog\/#\/schema\/person\/d317218747ba5e5aa51886062ac0b628","name":"Danish Ansari","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8578053f8112ac6a0c136fbc87a10af48375433622bcb3df612e573bd2513ef6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8578053f8112ac6a0c136fbc87a10af48375433622bcb3df612e573bd2513ef6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8578053f8112ac6a0c136fbc87a10af48375433622bcb3df612e573bd2513ef6?s=96&d=mm&r=g","caption":"Danish Ansari"}}]}},"_links":{"self":[{"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/posts\/7086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/comments?post=7086"}],"version-history":[{"count":0,"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/posts\/7086\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/media\/7095"}],"wp:attachment":[{"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/media?parent=7086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/categories?post=7086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/weblizar.com\/blog\/wp-json\/wp\/v2\/tags?post=7086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}