Search
 
SCRIPT & CODE EXAMPLE
 

CSS

sass example html

/*
SASS default file *.scss must be converted to *.css to use in html

Installation: 
npm install -g sass
*/
<head>
	<link rel="stylesheet" href="styles.css">
</head>
/* create new file styles.scss and fill */
$myColor: red;

body {
  color: $myColor;
}
/*
in terminal run: sass --watch styles.scss styles.css

info from https://sass-lang.com/install
*/
Comment

include sass in html

You have to use a build tool like Gulp which will convert the SASS file to CSS file , then you just have to link the CSS file in your HTML.
What’s interesting is that you don’t have to do this everytime you make a change in your SASS file. Gulp has a watch function which monitors the SASS files for changes and generate CSS file on the fly.
To use SASS with gulp , follow this tutorial - http://ryanchristiani.com/getting-started-with-gulp-and-sass/

Aditya Agarwal
Comment

PREVIOUS NEXT
Code Example
Css :: initialize toast 
Css :: hover on father elemet activates a child element css 
Css :: margin 
Css :: select custom css 
Css :: id selector css 
Css :: what is the difference between relative and absolute css 
Css :: how to watch sass in multiple pathes 
Css :: how to make jest parse the imported css modules in create react app 
Css :: align center without using margin 
Css :: media query not working with rem 
Css :: progress bar with width gradient 
Css :: css: custom font and color 
Css :: how to use animista css in html 
Css :: grippy css 
Css :: -webkit-animation css 
Css :: make all elements in a div share same css 
Css :: fix materialize form label not working 
Css :: @keyframes opact 
Css :: Responsive testimonial slider HTML CSS 
Css :: framework grille scss 
Css :: css address by id 
Css :: how to disable margin collapse between parent and child 
Css :: hover above image tip tool 
Css :: Définir le nombre minimum de mots sur les publications WordPress 
Css :: how to remove underline of link in css 
Css :: if else in golang 
Css :: allvarliga symtom på järnbrist 
Css :: cop pics css 
Css :: tailwindcss class order 
Css :: verified icon css 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =