Skip to content

Instantly share code, notes, and snippets.

@SandyLudosky
Last active August 29, 2015 14:10
Show Gist options
  • Save SandyLudosky/3e79e351b355e2428da1 to your computer and use it in GitHub Desktop.
Save SandyLudosky/3e79e351b355e2428da1 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class='container'>
<h1>SASS - Mixins</h1>
<h2><span>Basic</span> - Getting Started</h2>
<p id='mypara'>Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor <br>
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi</p>
<p>Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi</p>
<div class='footer'>
<p>&copy; Copyright</p>
</div>
</div><!--container-->
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
/*
* LESS Variables are defined with an @ character
* and can have different kinds of data types:
* color, string, boolean, multi-value
*/
$Color1: navy; // named color value
$Color2: #333333; // hex color value
$StringVar: " with Sass"; // string variable
$FontSize: 18px; // numeric value
$border: 1px solid $Color2; // multi-value variable
$padding: 15px 15px 15px 15px; // multi-value variable
@mixin radius ($radius) {
-webkit-border-radius:$radius;
-moz-border-radius: $radius;
-o-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
.container {
width: 960px;
margin: 0 auto;
padding: $padding;
color: $Color2;
h1 {
font-size: $FontSize*3;
color: $Color1;
border: $border;
text-align: center;
@include radius(10px);
}
h2 {
font-size: $FontSize;
span {
font-style: italic;
&:before {
content: '- ';
}
}
&:after {
content: $StringVar;
}
}
#mypara {
color: $Color1;
}
.footer {
color: $Color1;
border: $border;
text-align: center;
@include radius(10px);
p {
font-size: $FontSize;
}
}
}
/*
* LESS Variables are defined with an @ character
* and can have different kinds of data types:
* color, string, boolean, multi-value
*/
.container {
width: 960px;
margin: 0 auto;
padding: 15px 15px 15px 15px;
color: #333333;
}
.container h1 {
font-size: 54px;
color: navy;
border: 1px solid #333333;
text-align: center;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-o-border-radius: 10px;
-ms-border-radius: 10px;
border-radius: 10px;
}
.container h2 {
font-size: 18px;
}
.container h2 span {
font-style: italic;
}
.container h2 span:before {
content: '- ';
}
.container h2:after {
content: " with Sass";
}
.container #mypara {
color: navy;
}
.container .footer {
color: navy;
border: 1px solid #333333;
text-align: center;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-o-border-radius: 10px;
-ms-border-radius: 10px;
border-radius: 10px;
}
.container .footer p {
font-size: 18px;
}
<div class='container'>
<h1>SASS - Mixins</h1>
<h2><span>Basic</span> - Getting Started</h2>
<p id='mypara'>Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor <br>
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi</p>
<p>Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi</p>
<div class='footer'>
<p>&copy; Copyright</p>
</div>
</div><!--container-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment