Created
October 30, 2015 03:38
-
-
Save feload/e1959f8114ee8cb75806 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header> | |
<h1>Demo</h1> | |
</header> | |
<section class="content"> | |
<p>Hello There!</p> | |
<a href="#">Click me!</a> | |
</section> | |
<footer> | |
<p>This is a footer</p> | |
</footer> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
// This function will return true/false depending on wheter the site is defined in $sites list or not. | |
@function contains($sites, $site) { | |
@return (null != index($sites, $site)); | |
} | |
// This function will return de properties selected according to the site index. | |
@function pick($site_index, $props...){ | |
@return nth($props, $site_index); | |
} | |
@mixin variables(){} | |
// This mixing defines all the styles for horizon. | |
@mixin horizon($site, $sites){ | |
// Picks the corresponding index of the site. | |
$site_index: if(contains($sites, $site), index($sites, $site), 1); | |
body { | |
background: pick($site_index, #000, #95F18F, #E7143F); | |
color: pick($site_index, #fff, #33323A, #000); | |
font-family: "Helvetica"; | |
a{ | |
color: pick($site_index, #f00, #33323A, #fff); | |
} | |
} | |
header { | |
padding-top: 20px; | |
} | |
.content { | |
display: inline-block; | |
border-top: 10px; | |
border: 0px; | |
} | |
footer { | |
font-size: 10px; | |
margin-top: 30px; | |
} | |
} | |
// Order matters... | |
$sites: (defaults, hometribe, redman); | |
$site: redman; | |
@include horizon($site, $sites); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background: #E7143F; | |
color: #000; | |
font-family: "Helvetica"; | |
} | |
body a { | |
color: #fff; | |
} | |
header { | |
padding-top: 20px; | |
} | |
.content { | |
display: inline-block; | |
border-top: 10px; | |
border: 0px; | |
} | |
footer { | |
font-size: 10px; | |
margin-top: 30px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header> | |
<h1>Demo</h1> | |
</header> | |
<section class="content"> | |
<p>Hello There!</p> | |
<a href="#">Click me!</a> | |
</section> | |
<footer> | |
<p>This is a footer</p> | |
</footer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment