Build mobile apps with simple HTML, CSS, and JS components. http://goratchet.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.1 KiB

//
// Buttons
// --------------------------------------------------
12 years ago
[class*="button"] {
position: relative;
display: inline-block;
padding: 4px 12px;
margin: 0;
font-weight: bold;
line-height: 18px;
color: #333;
text-align: center;
vertical-align: top;
cursor: pointer;
background-color: transparent;
border: 1px solid rgba(0, 0, 0, .5);
border-radius: 4px;
12 years ago
// Active
&:active {
background-color: #333;
transition: background-color .1s linear;
}
12 years ago
}
// Buttons modifiers
// --------------------------------------------------
12 years ago
// Overriding styles for buttons with modifiers
12 years ago
.button-main,
.button-positive,
.button-negative {
color: #fff;
}
// Main button
12 years ago
.button-main {
color: $app-color;
border: 1px solid $app-color;
12 years ago
}
// Positive button
12 years ago
.button-positive {
color: #4cd964;
border: 1px solid #4cd964;
12 years ago
}
// Negative button
12 years ago
.button-negative {
color: #e71e1e;
12 years ago
border: 1px solid #b51a1a;
}
// Active state for buttons with modifiers
[class*="button"]:active,
12 years ago
.button-main:active,
.button-positive:active,
.button-negative:active {
color: #fff;
}
.button-main:active {
color: #fff;
background-color: $app-color;
12 years ago
}
.button-positive:active {
color: #fff;
background-color: #4cd964;
12 years ago
}
.button-negative:active {
background-color: #b21a1a;
}
// Block level buttons (full width buttons)
12 years ago
.button-block {
display: block;
padding: 11px 0 13px;
margin-bottom: 10px;
font-size: 16px;
}
// Make button elements go full width when given .button-block class
button.button-block {
width: 100%;
}
// Counts in buttons
// --------------------------------------------------
12 years ago
// Generic styles for all counts within buttons
12 years ago
[class*="button"] [class*="count"] {
padding-top: 2px;
padding-bottom: 2px;
margin-right: -4px;
margin-left: 4px;
background-color: rgba(0, 0, 0, .1);
12 years ago
}
// Position counts within block level buttons
// Note: These are absolutely positioned so that text of button isn't "pushed" by count and always
// stays at true center of button
12 years ago
.button-block [class*="count"] {
position: absolute;
right: 0;
padding-top: 4px;
padding-bottom: 4px;
margin-right: 10px;
}