Created
September 22, 2015 10:44
-
-
Save Cartman0/dfce85582c6845d3b9ab to your computer and use it in GitHub Desktop.
cssで切手風デザイン
This file contains 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
@mixin stamp($size: 100px, $padding_size: 10px, $color: hsl(0, 0, 50%), $circle_num: 4) { | |
padding: $padding_size; | |
background: radial-gradient( | |
circle closest-side, | |
transparent, | |
transparent 50%, | |
$color 50%, | |
$color | |
); | |
$tile_size: ($size + $padding_size * 2) / $circle_num; | |
background-size: $tile_size $tile_size; | |
background-position: -1*$tile_size/2 -1*$tile_size/2; | |
} | |
.stamp-default{ | |
$size: 100px; | |
$padding_size: 10px; | |
$color: gray; | |
$circle_num: 4; | |
@include stamp($size, $padding_size, $color, $circle_num); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment