Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css sass scss

/*SMART DIFFERENCE*/
/*CSS*/
body {
  font: 100% Helvetica, sans-serif;
  color: #333;
}

/*SCSS*/

$font-stack:    Helvetica, sans-serif;
$primary-color: #333;

body {
  font: 100% $font-stack;
  color: $primary-color;
}


/*SASS*/
$font-stack:    Helvetica, sans-serif
$primary-color: #333

body
  font: 100% $font-stack
  color: $primary-color


Comment

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 :: page html css template 
Css :: scrollbar style 
Css :: css button type 
Css :: bulma lowercase 
Css :: css elementos 
Css :: select custom css 
Css :: css code for margin 
Css :: css loader 
Css :: faire rectangle qui prend toute la largeur css 
Css :: how long ago was 1993 years 
Css :: divi submenu collapse by default 
Css :: text-overflow ellipsis css 
Css :: css conflicting styles 
Css :: cl image tag width 
Css :: span flex height 
Css :: pacSelectFirst( submit button 
Css :: flex index css 
Css :: moving nested element up css 
Css :: contact form 7 error styles css 
Css :: lier class et css 
Css :: how to add new items on top of old ones in css 
Css :: bast css 3d images gallery code 
Css :: nav items moving when hover 
Css :: use PurifyCSS with hugo 
Css :: twig data uri 
Css :: Add border to the array 
Css :: how to change the theme of a website using css 
Css :: bolock rotating the screen on your website with css 
Css :: mouse hover text zoom effect 
Css :: how to change margin radius in css 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =