From 971a7f1a5d2350f9f76c2bc3aa2fc8ddba2d84d5 Mon Sep 17 00:00:00 2001 From: FO-nTTaX Date: Mon, 19 Sep 2016 19:32:59 +0200 Subject: [PATCH] some optimising --- base.less | 260 +++++++++++++++++++++++++----------------------------- 1 file changed, 118 insertions(+), 142 deletions(-) diff --git a/base.less b/base.less index 6568cc3..10d7614 100644 --- a/base.less +++ b/base.less @@ -96,139 +96,63 @@ td.mw-label { @import "bootstrap/less/button-groups.less"; -.render-buttons(@btn-identifier) { - /* taken from bootstrap */ - @{btn-identifier} { - .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); - display:inline-block; - margin-bottom:0; - font-weight:normal; - text-align:center; - vertical-align:middle; - touch-action:manipulation; - cursor:pointer; +/* taken from bootstrap */ +#main-content-column button, +#main-content-column input[type=submit], +#main-content-column input[type=button] { + .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); + display:inline-block; + margin-bottom:0; + font-weight:normal; + text-align:center; + vertical-align:middle; + touch-action:manipulation; + cursor:pointer; + background-image:none; + border:1px solid transparent; + white-space:nowrap; + padding:6px 12px; + font-size:11pt; + line-height:1.42857143; + border-radius:0px; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + user-select:none; + &:focus, + &:active:focus, + &.active:focus, + &.focus, + &:active.focus, + &.active.focus { + outline:thin dotted; + outline:5px auto -webkit-focus-ring-color; + outline-offset:-2px; + } + &:hover, + &:focus, + &.focus { + color:#333333; + text-decoration:none; + } + &:active, + &.active { + outline:0; background-image:none; - border:1px solid transparent; - white-space:nowrap; - padding:6px 12px; - font-size:11pt; - line-height:1.42857143; - border-radius:0px; - -webkit-user-select:none; - -moz-user-select:none; - -ms-user-select:none; - user-select:none; - &:focus, - &:active:focus, - &.active:focus, - &.focus, - &:active.focus, - &.active.focus { - outline:thin dotted; - outline:5px auto -webkit-focus-ring-color; - outline-offset:-2px; - } - &:hover, - &:focus, - &.focus { - color:#333333; - text-decoration:none; - } - &:active, - &.active { - outline:0; - background-image:none; - -webkit-box-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125); - } - &.disabled, - &[disabled] { - cursor:not-allowed; - opacity:0.65; - filter:alpha(opacity=65); - -webkit-box-shadow:none; - box-shadow:none; - } + -webkit-box-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125); } -} -.render-buttons(~'#main-content-column button'); -.render-buttons(~'#main-content-column input[type=submit]'); -.render-buttons(~'#main-content-column input[type=button]'); - -.render-form-control(@form-control-identifier) { - /* taken from bootstrap */ - @{form-control-identifier} { - vertical-align:middle; - height:@input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) - padding:@padding-base-vertical @padding-base-horizontal; - font-size:@font-size-base; - line-height:@line-height-base; - color:@input-color; - background-color:@input-bg; - background-image:none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 - border:1px solid @input-border; - border-radius:@input-border-radius; // Note: This has no effect on s in CSS. - .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); - .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s"); - - // Customize the `:focus` state to imitate native WebKit styles. - .form-control-focus(); - - // Placeholder - .placeholder(); - - // Unstyle the caret on `s in some browsers, due to the limited stylability of `s in IE10+. + &::-ms-expand { + border:0; + background-color:transparent; + } + + // Disabled and read-only inputs + // + // HTML5 says that controls under a fieldset > legend:first-child won't be + // disabled if the fieldset is disabled. Due to implementation difficulty, we + // don't honor that edge case; we style them as disabled anyway. + &[disabled], + &[readonly], + fieldset[disabled] & { + background-color:@input-bg-disabled; + opacity:1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655 + } + + &[disabled], + fieldset[disabled] & { + cursor:@cursor-disabled; + } + + // Reset height for `textarea`s + textarea& { + height:auto; + } +} +#main-content-column textarea { + height:initial; +} +#main-content-column select[size] { + height:initial; } .oo-ui-textInputWidget.oo-ui-indicatorElement input, .oo-ui-textInputWidget.oo-ui-indicatorElement textarea { padding-right:2.4875em !important; @@ -467,17 +443,17 @@ td.mw-label { margin-left:0px; } -@import "bootstrap/less/breadcrumbs.less"; -@import "bootstrap/less/pagination.less"; -@import "bootstrap/less/pager.less"; +//@import "bootstrap/less/breadcrumbs.less"; +//@import "bootstrap/less/pagination.less"; +//@import "bootstrap/less/pager.less"; @import "bootstrap/less/labels.less"; .label-light { background-color:@gray-lighter; color:@text-color; } @import "bootstrap/less/badges.less"; -@import "bootstrap/less/jumbotron.less"; -@import "bootstrap/less/thumbnails.less"; +//@import "bootstrap/less/jumbotron.less"; +//@import "bootstrap/less/thumbnails.less"; @import "bootstrap/less/alerts.less"; .alert { @@ -485,24 +461,24 @@ td.mw-label { } @import "bootstrap/less/progress-bars.less"; -@import "bootstrap/less/media.less"; -@import "bootstrap/less/list-group.less"; +//@import "bootstrap/less/media.less"; +//@import "bootstrap/less/list-group.less"; @import "bootstrap/less/panels.less"; .panel { margin-bottom:10px; } -@import "bootstrap/less/responsive-embed.less"; -@import "bootstrap/less/wells.less"; -@import "bootstrap/less/close.less"; +//@import "bootstrap/less/responsive-embed.less"; +//@import "bootstrap/less/wells.less"; +//@import "bootstrap/less/close.less"; // Components w/ JavaScript -@import "bootstrap/less/modals.less"; -@import "bootstrap/less/tooltip.less"; +//@import "bootstrap/less/modals.less"; +//@import "bootstrap/less/tooltip.less"; @import "bootstrap/less/popovers.less"; -@import "bootstrap/less/carousel.less"; +//@import "bootstrap/less/carousel.less"; // Utility classes @import "bootstrap/less/utilities.less";