Skip to content

Instantly share code, notes, and snippets.

@Cartman0
Created September 22, 2015 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cartman0/dfce85582c6845d3b9ab to your computer and use it in GitHub Desktop.
Save Cartman0/dfce85582c6845d3b9ab to your computer and use it in GitHub Desktop.
cssで切手風デザイン
@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