// Copyright (C) YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */ // // Component: Button // // ======================================================================== // Variables // ======================================================================== @button-height: @global-height; @button-mini-height: @global-height-mini; @button-small-height: @global-height-small; @button-large-height: @global-height-large; @button-line-height: @global-height; @button-mini-line-height: @global-height-mini; @button-small-line-height: @global-height-small; @button-large-line-height: @global-height-large; @button-padding-horizontal: round((@button-height / 1.2)); @button-large-padding-horizontal: round((@button-large-height / 1.2)); @button-small-padding-horizontal: round((@button-small-height / 1.2)); @button-mini-padding-horizontal: round((@button-mini-height / 1.2)); @button-font-size: 14px; @button-mini-font-size: 12px; @button-small-font-size: 13px; @button-large-font-size: 16px; @button-background: darken(@global-light-background, 5%); @button-color: @global-color; @button-hover-background: darken(@button-background, 4%); @button-hover-color: @global-color; @button-active-color: @global-color; @button-primary-background: @global-primary-background; @button-primary-color: @global-contrast-color; @button-primary-hover-background: @global-primary-hover-background; @button-primary-hover-color: @global-contrast-color; @button-primary-active-background: @global-primary-active-background; @button-primary-active-color: @global-contrast-color; @button-success-background: @global-success-background; @button-success-color: @global-contrast-color; @button-success-hover-background: @global-success-hover-background; @button-success-hover-color: @global-contrast-color; @button-success-active-background: @global-success-active-background; @button-success-active-color: @global-contrast-color; @button-danger-background: @global-danger-background; @button-danger-color: @global-contrast-color; @button-danger-hover-background: @global-danger-hover-background; @button-danger-hover-color: @global-contrast-color; @button-danger-active-background: @global-danger-active-background; @button-danger-active-color: @global-contrast-color; @button-disabled-color: @global-muted-color; @button-link-color: @global-link-color; @button-link-hover-color: @global-link-hover-color; @button-link-disabled-color: @global-muted-color; // // New // @button-group-padding-horizontal: (@button-height / 2); @button-group-large-padding-horizontal: (@button-large-height / 2); @button-group-small-padding-horizontal: (@button-small-height / 2); @button-group-mini-padding-horizontal: (@button-mini-height / 2); @button-font-family: 'Raleway', Helvetica, Arial, sans-serif; @button-font-weight: @global-button-font-weight; @button-text-transform: @global-text-transform; @button-letter-spacing: @global-letter-spacing; @button-border-radius: @button-height; @button-large-border-radius: @button-large-height; @button-group-border-witdth: 1px; @button-group-border: rgba(0,0,0,0.1); // Component // ======================================================================== .hook-button() { font-family: @button-font-family; font-weight: @button-font-weight; text-transform: @button-text-transform; letter-spacing: @button-letter-spacing; border-radius: @button-border-radius; } .hook-button-hover() {} .hook-button-active() {} // Color modifiers // ======================================================================== // // Modifier: `uk-button-primary` // .hook-button-primary() {} .hook-button-primary-hover() {} .hook-button-primary-active() {} // // Modifier: `uk-button-success` // .hook-button-success() {} .hook-button-success-hover() {} .hook-button-success-active() {} // // Modifier: `uk-button-danger` // .hook-button-danger() {} .hook-button-danger-hover() {} .hook-button-danger-active() {} // Disabled state // ======================================================================== .hook-button-disable() {} // Modifier: `uk-button-link` // ======================================================================== .hook-button-link() {} // Size modifiers // ======================================================================== .hook-button-large() {} // Miscellaneous // ======================================================================== .hook-button-misc() { // Padding modifications .uk-button-small { padding: 0 @button-small-padding-horizontal; } .uk-button-mini { padding: 0 @button-mini-padding-horizontal; } // Sub-object `uk-button-group` // ========================================================================== // Reset border-radius .uk-button-group > .uk-button:not(:first-child):not(:last-child), .uk-button-group > div:not(:first-child):not(:last-child) .uk-button { border-radius: 0; } .uk-button-group > .uk-button:first-child, .uk-button-group > div:first-child .uk-button { border-top-right-radius: 0; border-bottom-right-radius: 0; } .uk-button-group > .uk-button:last-child, .uk-button-group > div:last-child .uk-button { border-top-left-radius: 0; border-bottom-left-radius: 0; } // Collapse border .uk-button-group > .uk-button:nth-child(n+2), .uk-button-group > div:nth-child(n+2) .uk-button { border-left: @button-group-border-witdth solid @button-group-border; } .uk-button-group .uk-button:active { position: relative; } // Padding modifications .uk-button-group { .uk-button { padding: 0 @button-group-padding-horizontal; } .uk-button-large { padding: 0 @button-group-large-padding-horizontal; } .uk-button-small { padding: 0 @button-group-small-padding-horizontal; } .uk-button-mini { padding: 0 @button-group-mini-padding-horizontal; } } }