Skip to content

Instantly share code, notes, and snippets.

@f8lrebel
Created March 28, 2015 20:09
Show Gist options
  • Save f8lrebel/15b2a39c442da39fe877 to your computer and use it in GitHub Desktop.
Save f8lrebel/15b2a39c442da39fe877 to your computer and use it in GitHub Desktop.
iOS style action button
<ul>
<li class="delete">Delete</li>
<li class="cancel">Cancel</li>
</ul>
body{
display: box;
height: 300px;
background-color: hsla(217, 6%, 41%, 1);
box-orient: vertical;
box-pack: center;
box-align: center;
}
.actionButton(@color){
box-sizing: border-box;
margin: 20px;
padding: 0 10px 0 10px;
width: 300px;
height: 44px;
border: none;
border-radius: 10px;
background-color: @color;
background-image: linear-gradient(
top,
lighten(@color, 20%) 0%,
lighten(@color, 5%) 40%,
@color 80%,
lighten(@color, 8%) 100%
);
box-shadow:
inset 0 1px 1px hsla(0,0,100%,.2),
0 1px 2px hsla(0,0,0,.8),
0 1px 0 4px hsla(0,0,100%,.15),
0 0 0 4px hsla(220, 8%, 10%, 0.8);
color:#fff;
list-style-type: none;
text-align:center;
text-shadow: 0 -1px 0 darken(@color, 40%);
font-weight: bold;
font-size: 18px;
line-height: 44px;
}
.delete{
.actionButton(hsla(0, 92%, 38%, 1));
}
.cancel{
.actionButton(hsla(215, 12%, 19%,1));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment