Artinov / home-work-7-kramarmm

home-work-7-kramarmm created by GitHub Classroom
0 stars 0 forks source link

Sharing variables #6

Closed eko24ive closed 7 years ago

eko24ive commented 7 years ago

SASS gives you ability to share variable across other .sass files. For example.

//style.sass
$primaryColor: green;
@import "typography"
//_typography.sass
body
  color: $primaryColor;

This feature is available since you import any sass file after variable declaration, for example this code wouldn't work

@import "typography"// _typography.sass don't know about $primaryColor yet
$primaryColor: green;

You can refactor this code:

@import url('../vendor/fonts/OpenSans-Bold.ttf')
@import 'mobile'
@import 'ipad'

$myFont: 'Open Sans'
$navColor: #2C3E50
$whiteColor: #FEFEFE
$green-blockColor: #18BC9C
$greyColor: #333333
$placeholderColor: #A39CAB

And get rid of $greyColor declaration in _mobile.sass

kramarmm commented 7 years ago

Fixed

eko24ive commented 7 years ago

Good job