Skip to content

Instantly share code, notes, and snippets.

@hidoos
Created March 12, 2014 09:23
Show Gist options
  • Save hidoos/9503561 to your computer and use it in GitHub Desktop.
Save hidoos/9503561 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="message">
测试一下这些内容
</div>
// ----
// Sass (v3.3.1)
// Compass (v1.0.0.alpha.18)
// ----
// sass 编写组件
//========================================
%message{
padding:0.5em;
margin:0.5em;
border-radius:0.15em;
border:1px solid;
}
@mixin message($color){
@extend %message;
color:$color;
border-color: lighten($color, 20%);
background: lighten($color, 40%);
}
.message{
@include message(#f3f3f3);
}
.message {
padding: 0.5em;
margin: 0.5em;
border-radius: 0.15em;
border: 1px solid;
}
.message {
color: #f3f3f3;
border-color: white;
background: white;
}
<div class="message">
测试一下这些内容
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment