Skip to content

Instantly share code, notes, and snippets.

@Abdo-Hassan
Last active November 26, 2018 19:26
Show Gist options
  • Save Abdo-Hassan/dcab91611a639e1ffb5a10e8914222fc to your computer and use it in GitHub Desktop.
Save Abdo-Hassan/dcab91611a639e1ffb5a10e8914222fc to your computer and use it in GitHub Desktop.
test sass each
// ----
// Sass (v3.5.6)
// Compass (vundefined)
// ----
/*
test sass each list
$socialList : facebook
twitter
youtube
codepen
test
abdo;*/
@each $social , $color, $hover in
(facebook, blue, black),
(youtube, red, yellow),
(twitter, green, white) {
.#{$social} {
background: url('images/#{$social}.png');
font-size : 30px;
color:$color;
border:2px solid $color;
&:hover{
background-color:$hover;
}
}
}
/*
test sass each list
$socialList : facebook
twitter
youtube
codepen
test
abdo;*/
.facebook {
background: url("images/facebook.png");
font-size: 30px;
color: blue;
border: 2px solid blue;
}
.facebook:hover {
background-color: black;
}
.youtube {
background: url("images/youtube.png");
font-size: 30px;
color: red;
border: 2px solid red;
}
.youtube:hover {
background-color: yellow;
}
.twitter {
background: url("images/twitter.png");
font-size: 30px;
color: green;
border: 2px solid green;
}
.twitter:hover {
background-color: white;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment