// ---------------------------------------------------------------------------- // Form styling mixins // ---------------------------------------------------------------------------- .agora-label-styling() { font-size: 0.9em; color: @colorText; * { font-weight: normal; } } .agora-inline-label-styling() { margin-bottom: 0.5em; cursor: pointer; vertical-align: bottom; line-height: normal; font-weight: normal; & > input[type="checkbox"], & > input[type="radio"] { width: auto; height: auto; margin: 0 0.1em 0 0; padding: 0; border: 1px solid @colorFieldBorder; cursor: pointer; } } // ---------------------------------------------------------------------------- // Button styling // ---------------------------------------------------------------------------- .button-colors(@bgColor, @highlightColor, @activeColor) { background: @bgColor; &:hover { // The inner bottom bevel should match the active background color. background-color: @highlightColor; } &:focus { border-color: @colorWhite; box-shadow: 0 0 0 1px @highlightColor; outline: none; // remove outline in Firefox &::-moz-focus-inner { border-color: transparent; } } &:active, &.mw-ui-checked { background: @activeColor; box-shadow: none; } } .button-colors(@bgColor, @highlightColor, @activeColor) when (lightness(@bgColor) >= 70%) { color: @colorButtonText; border: 1px solid @colorGray12; &:hover, &:active, &:visited { // make sure that is isn't inheriting from a general rule color: @colorButtonText; } &:focus { background-color: @highlightColor; } &:disabled { color: @colorDisabledText; // make sure disabled buttons don't have hover and active states &:hover, &:active { background: @bgColor; box-shadow: none; } } } .button-colors(@bgColor, @highlightColor, @activeColor) when (lightness(@bgColor) < 70%) { color: #fff; // border of the same color as background so that light background and // dark background buttons are the same height and width border: 1px solid @bgColor; text-shadow: 0 1px rgba(0, 0, 0, .1); &:disabled { background: @colorGray13; border-color: @colorGray13; // make sure disabled buttons don't have hover and active states &:hover, &:active, &.mw-ui-checked { box-shadow: none; } } } .button-colors-quiet(@textColor, @highlightColor, @activeColor) { // Quiet buttons all start gray, and reveal // constructive/progressive/destructive color on hover and active. color: @colorButtonText; &:hover, &:focus { color: @textColor; } &:active, &.mw-ui-checked { color: @activeColor; } &:disabled { color: @colorDisabledText; } }