gaf-mobile
Version:
GAF mobile Web site
389 lines (359 loc) • 8.77 kB
text/less
@import (reference) '../libs/mixins';
@import (reference) '../themes/variables';
@import (reference) 'loadingicon';
/**
* Buttons
*
* .btn can be applied to `<a>`, `<button>` and `<label>` elements.
*
* Styleguide 2
*/
/**
* Button Skins
*
* .btn-primary - Primary button color
* .btn-secondary - Secondary button color
* .btn-tertiary - Tertiary button color
* .btn-alt - A bordered button with white background
* .btn-text - Make buttons appear as inline text or anchors (link)
* .btn-facebook - For any button whose action relates to facebook
* .btn-edit-text - Edit text button for content editable elements
*
* Markup: buttons/button.html
*
* Styleguide 2.1
*/
/**
* Button Size/s
*
* .btn-small - Smaller version of the button
*
* Markup: buttons/button.html
*
* Styleguide 2.2
*/
/**
* Other buttons
*
* .btn-circle - A circular button with no text
* .btn-close - Close Button
*
* Markup: buttons/button-noText.html
*
* Styleguide 2.3
*/
.btn {
display: inline-block;
padding: 0.85em 2em;
zoom: 1;
white-space: nowrap;
text-align: center;
font-size: @type-size;
border-radius: 3px;
font-weight: bold;
text-decoration: none;
color: @septenary-color-xxxlight;
cursor: pointer;
-webkit-user-drag: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: @septenary-color-light;
background-image: none;
border: 1px solid darken(@septenary-color-light, 4%);
outline: none;
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
text-decoration: none;
background-color: lighten(@septenary-color-light, 4%);
border-color: darken(@septenary-color-light, 2%);
}
/* BUTTON COLOUR VARIANTS */
// Green
&-primary {
background-color: @quinary-color;
border-color: @quinary-color-dark;
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
background-color: @quinary-color-light;
border-color: darken(@quinary-color-light, 4%);
}
}
// Blue
&-secondary {
background-color: @primary-color;
border-color: @primary-color-dark;
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
background-color: @primary-color-light;
border-color: darken(@primary-color-light, 4%);
}
}
// Orange
&-tertiary {
background-color: @tertiary-color;
border-color: darken(@tertiary-color, 8%);
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
background-color: @tertiary-color-light;
border-color: darken(@tertiary-color-light, 4%);
}
}
// Red
&-senary {
background-color: @senary-color;
border-color: darken(@senary-color, 8%);
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
background-color: @senary-color-light;
border-color: darken(@senary-color-light, 4%);
}
}
// White
&-alt {
background-color: @septenary-color-xxxlight;
border-color: @septenary-color;
color: @septenary-color-xxdark;
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
background-color: @septenary-color-xxxlight;
color: @septenary-color;
}
}
&-small {
padding: 5px 15px;
font-size: 12px;
}
&-large {
font-size: @type-size-lge;
}
&-no-border {
border: 0;
}
&-text,
&-link {
display: inline-block;
width: auto;
line-height: 1;
padding: 4px 0;
background: none;
border: none;
font-weight: normal;
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
background-color: transparent;
border: none;
}
}
&-link {
color: @link-color;
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
color: @link-color-hover;
}
}
&-hollow {
border-color: @septenary-color-xxxlight;
color: @septenary-color-xxxlight;
background-color: transparent;
}
&-wide {
width: 100%;
}
// ulitity states
.btn-disabled {
background-color: @septenary-color-xxlight;
border-color: darken(@septenary-color-xxlight, 10%);
color: darken(@septenary-color-xxlight, 20%);
pointer-events: none;
&:focus,
&:active,
&.fl-touch-active,
html.no-touch &:hover {
background-color: @septenary-color-xxlight;
border-color: darken(@septenary-color-xxlight, 10%);
color: darken(@septenary-color-xxlight, 20%);
cursor: not-allowed;
}
}
&-processing {
.btn-disabled;
position: relative;
z-index: 1;
color: @septenary-color-xxlight ;
pointer-events: none;
&:hover {
color: @septenary-color-xxlight ;
}
&::after {
.loadingicon;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 22px ;
height: 22px ;
margin: auto;
z-index: 2;
content: '';
}
}
&[disabled] {
.btn-disabled();
}
}
@media only screen and (max-width : 440px) {
.btn {
width: 100%;
}
}
@media only screen and (max-width : 440px) {
.btn-small,
.btn-text,
.btn-link {
width: auto;
}
}
.btn-edit-text {
.link-button;
float: right;
margin-left: 5px;
}
.small-link {
margin: 0 3px;
font-size: @type-size-sml;
text-transform: uppercase;
text-decoration: none;
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
text-decoration: underline;
}
}
.btn-close {
.link-button;
display: block;
padding: 10px;
text-align: center;
.icon-circled-plus {
display: inline-block;
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
font-size: @type-size-xxlge;
color: @septenary-color;
}
&:active,
&:focus,
&.fl-touch-active,
html.no-touch &:hover {
.icon-circled-plus {
color: @link-color;
}
}
}
.btn-circle {
width: 22px;
height: 22px;
padding: 1px;
font-weight: bold;
font-size: 20px;
line-height: 1;
color: @septenary-color-light;
background-color: transparent;
border: none;
&:active,
&:focus,
html.no-touch &:hover {
outline: none;
color: @link-color;
background-color: transparent;
}
}
.btn-group {
display: block;
}
/* BRANDED BUTTONS */
// Facebook
.btn-facebook {
display: block;
margin: 0 auto;
position: relative;
background-color: @facebook-color;
border-color: darken(@facebook-color, 5%);
font-weight: normal;
padding-left: 70px;
padding-right: 20px;
text-align: center;
&:hover,
&:active,
&:focus,
html.no-touch &:hover {
background-color: lighten(@facebook-color, 4%);
border-color: @facebook-color;
&:before {
background-color: darken(@facebook-color, 1%);
}
}
&:before {
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 50px;
background-color: darken(@facebook-color, 5%);
font-size: 20px;
padding-top: 14px;
color: @septenary-color-xxxlight;
font-family: "icomoon";
content: "\f09a";
}
&.btn-processing {
background-color: lighten(@facebook-color, 50%);
border-color: lighten(@facebook-color, 45%);
color: @septenary-color-xxxlight;
&:before {
background-color: lighten(@facebook-color, 45%);
}
}
}
@media only screen and (max-width : 360px) {
.btn-facebook {
padding-left: 50px;
padding-right: 0;
&:before {
width: 50px;
}
}
}
@media only screen and (min-width : 360px) and (max-width : 440px) {
.btn-facebook {
padding-left: 65px;
padding-right: 0;
&:before {
width: 65px;
}
}
}