Skip to content

Instantly share code, notes, and snippets.

@alxpsr
Last active April 28, 2016 12:14
Show Gist options
  • Save alxpsr/ece25caf30153ec607b8864e9f78bd0e to your computer and use it in GitHub Desktop.
Save alxpsr/ece25caf30153ec607b8864e9f78bd0e to your computer and use it in GitHub Desktop.
btn-close
<button class="_btn-close" data-ng-click="activeItem = undefined">
<span class="line-left"></span>
<span class="line-right"></span>
</button>
._btn-close {
position: absolute;
top: 5px;
right: 5px;
display: inline-block;
width: 20px;
height: 20px;
background: none;
font-size: 0;
line-height: 0;
padding: 0;
margin: 0;
z-index: 10;
span {
display: inline-block;
width: 80%;
height: 3px;
background: #d4cece;
position: absolute;
top: 50%;
left: 50%;
margin-left: -8px;
margin-top: -2px;
&.line-left {
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
&.line-right {
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
}
}
}
common/shared/_buttons.scss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment