forked from brenna/csshexagon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
css-shadow.html
31 lines (27 loc) · 906 Bytes
/
css-shadow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.hexagon {
position: relative;
width: {{size}}px;
height: {{getHeight(size) | number:2}}px;
background-color: {{color}};
margin: {{getHeight(size)/2 | number:2}}px 0;{{shadowRule()}}{{borderRule()}}
}
.hexagon:before,
.hexagon:after {
content: "";
position: absolute;
z-index: 1;
width: {{getCapWidth(size) | number:2}}px;
height: {{getCapWidth(size) | number:2}}px;
-webkit-transform: scaleY({{scaleFactor | number:4 }}) rotate(-45deg);
-ms-transform: scaleY({{scaleFactor | number:4 }}) rotate(-45deg);
transform: scaleY({{scaleFactor | number:4 }}) rotate(-45deg);
background-color: inherit;
left: {{(size - getCapWidth(size))/2 - borderWidth | number:4 }}px;{{shadowRule()}}
}
.hexagon:before {
top: -{{getCapWidth(size)/2 | number:4}}px;{{borderRuleTop()}}
}
.hexagon:after {
bottom: -{{getCapWidth(size)/2 | number:4}}px;{{borderRuleBottom()}}
}
{{coverRule()}}