Difference Between CSS and SCSS
CSS is a stylesheet language whereas SCSS is a preprocessor scripting language that is a superset of CSS. This article will cover the detailed differences between CSS and SCSS....
read more
if/else condition in CSS
Given an HTML file and we need to apply using if-else conditions in CSS.No, We can not use if-else conditions in CSS as CSS doesn’t support logics. But we can use some alternatives to if-else which are discussed below:Method 1: In this method, we will use classes in HTML file to achieve this. We will define different class names according to the conditions which we want to apply in CSS....
read more
What is the difference between SCSS and SASS ?
SCSS and SASS are both syntaxes of the SASS preprocessor, enhancing CSS with advanced features. SCSS uses a CSS-like syntax and file extension `.scss`, making it easier for developers familiar with CSS. SASS, using `.sass`, has a more concise, indentation-based syntax....
read more
Last-child and last-of-type selector in SASS
SASS is also called Syntactically Awesome Stylesheet. It is a programming language that is interpreted into CSS. The Last Child selector is a selector that allows the user to target the last element inside the containing element. This selector is also known as a Structural Pseudo class which means it is used for styling content on the basis of parent and child content. The Last type of selector is used to match the last occurrence of an element within the container. Both selectors work in the same way but have a slight difference i.e the last type is less specified than the last-child selector....
read more
@include vs @extend in SASS
@include keyword is used to include the code written in a mixin block. @mixin is used to group css code that has to be reused a no of times. Whereas the @extend is used in SASS to inherit(share) the properties from another css selector. @extend is most useful when the elements are almost same or identical. The main difference between the two is in their compiled CSS file....
read more
SASS | Use variables across multiple files
Syntax:...
read more
SASS variable for images path
Whenever we want to add an image to our webpage, we need not always write the full path of our images when using SASS. We can rather store the path to the images folder in a variable. It is always good to add the path of a folder to a variable....
read more
How to use SCSS mixins with angular 7?
When working with the Angular CLI, the default stylesheets have the .css extension....
read more
How to import SASS through npm ?
Introduction to SASS: SASS stands for ‘Syntactically awesome style sheets’. It is an extension of CSS, that makes it easy to use variables of CSS, nested rules, inline import, and many other important features...
read more
What are the differences between LESS and SASS ?
This article aims to emphasize the key features & differences between the two CSS pre-processors, LESS and SASS. Before diving directly into the difference section, first, let’s talk about these two pre-processors. If you don’t know the basics of this pre-processor, then please refer to LESS & SASS....
read more
How to use Sass Variables with CSS3 Media Queries ?
SASS Variables: SASS Variables are very simple to understand and use. SASS Variables assign a value to a name that begins with $ sign, and then just refer to that name instead of the value. Despite this, they are one of the most useful tools SASS provides. SASS Variables provide the following features:...
read more
Convert Hex to RGBa for background opacity using SASS
Sass rgba function uses Red-green-blue-alpha model to describe colours where alpha is used to add opacity to the color. It’s value ranges between 0.0 (completely transparent) to 1.0 (completely opaque). The function takes two input values- the hex color code and alpha and converts Hex code to RGBa format....
read more