Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
some optimising
Browse files Browse the repository at this point in the history
  • Loading branch information
FO-nTTaX committed Sep 19, 2016
1 parent d42c29f commit 971a7f1
Showing 1 changed file with 118 additions and 142 deletions.
260 changes: 118 additions & 142 deletions base.less
Original file line number Diff line number Diff line change
Expand Up @@ -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 <select>s in some browsers, due to the limited stylability of <select>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 `<select>`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;
}
&.disabled,
&[disabled] {
cursor:not-allowed;
opacity:0.65;
filter:alpha(opacity=65);
-webkit-box-shadow:none;
box-shadow:none;
}
}
.render-form-control(~'#main-content-column textarea');
#main-content-column textarea {
height:initial;
}
.render-form-control(~'#main-content-column select');
#main-content-column select[size] {
height:initial;
}
.render-form-control(~'#main-content-column input[type=date]');
.render-form-control(~'#main-content-column input[type=datetime]');
.render-form-control(~'#main-content-column input[type=datetime-local]');
.render-form-control(~'#main-content-column input[type=email]');
.render-form-control(~'#main-content-column input[type=month]');
.render-form-control(~'#main-content-column input[type=number]');
.render-form-control(~'#main-content-column input[type=password]');
.render-form-control(~'#main-content-column input[type=range]');
.render-form-control(~'#main-content-column input[type=search]');
.render-form-control(~'#main-content-column input[type=tel]');
.render-form-control(~'#main-content-column input[type=text]');
.render-form-control(~'#main-content-column input[type=time]');
.render-form-control(~'#main-content-column input[type=url]');
.render-form-control(~'#main-content-column input[type=week]');
.render-form-control(~'#main-content-column input:not([type])');

/* taken from bootstrap */
#main-content-column textarea,
#main-content-column select,
#main-content-column input[type=date],
Expand All @@ -247,6 +171,58 @@ td.mw-label {
#main-content-column input[type=week],
#main-content-column input:not([type]) {
max-width:100%;
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 <select>s in some browsers, due to the limited stylability of <select>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 `<select>`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;
Expand Down Expand Up @@ -467,42 +443,42 @@ 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 {
margin-bottom:5px;
}

@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";
Expand Down

0 comments on commit 971a7f1

Please sign in to comment.