Refactor buttons.less

pull/1/head
yflory 5 years ago
parent 70a4b3bdf2
commit 7245123061

@ -3,7 +3,6 @@
@import (reference) "./variables.less";
@import (reference) "./avatar.less";
@import (reference) "./tools.less";
@import (reference) "./buttons.less";
.alertify_main() {
--LessLoader_require: LessLoader_currentFile();
@ -272,7 +271,6 @@
}
}
.buttons_main();
input:not(.form-control), textarea {
margin-bottom: 15px;
}

@ -1,7 +1,6 @@
@import (reference) "./colortheme-all.less";
@import (reference) "./variables.less";
@import (reference) "./avatar.less";
@import (reference) "./buttons.less";
@import (reference) "./tools.less";
.comments_main() {
@ -22,8 +21,6 @@
}
.buttons_main();
.cp-comment-reply {
margin-left: 30px;
}

@ -1,7 +1,7 @@
@import (reference) "./colortheme-all.less";
@import (reference) "./variables.less";
.buttons_main() {
.forms_main() {
@alertify-fore: @colortheme_modal-fg;
@alertify-btn-fg: @alertify-fore;
@alertify-light-bg: fade(@alertify-fore, 25%);
@ -83,7 +83,7 @@
margin-bottom: 3px !important;
}
button:not(.pure-button):not(.md-button):not(.mdl-button) {
button.btn {
background-color: @colortheme_alertify-cancel;
box-sizing: border-box;

@ -16,6 +16,7 @@
@import (reference) "./cursor.less";
@import (reference) "./usergrid.less";
@import (reference) "./mentions.less";
@import (reference) "./forms.less";
@import (reference) "./modals-ui-elements.less";
.framework_main(@bg-color, @warn-color, @color) {
@ -48,6 +49,7 @@
);
.cursor_main();
.usergrid_main();
.forms_main();
.mentions_main();
.creation_main(
@bg-color: @bg-color,
@ -84,6 +86,7 @@
.checkmark_main(20px);
.password_main();
.usergrid_main();
.forms_main();
font: @colortheme_app-font;
}

@ -1,8 +1,5 @@
@import (reference) "./colortheme-all.less";
@import (reference) "./variables.less";
@import (reference) './buttons.less';
.modal_base() {
font-family: @colortheme_font;
@ -39,8 +36,6 @@
background-color: @colortheme_modal-dim;
.cp-modal {
.buttons_main();
background-color: @colortheme_modal-bg;
color: @colortheme_modal-fg;
box-shadow: @variables_shadow;

@ -1,6 +1,5 @@
@import (reference) "/customize/src/less2/include/colortheme-all.less";
@import (reference) "/customize/src/less2/include/leftside-menu.less";
@import (reference) "/customize/src/less2/include/buttons.less";
@import (reference) "/customize/src/less2/include/browser.less";
@sidebar_button-width: 400px;
@ -98,7 +97,6 @@
}
}
margin-bottom: 20px;
.buttons_main();
}
[type="text"], [type="password"], button {
vertical-align: middle;

@ -145,12 +145,12 @@ define([
};
dialog.okButton = function (content, classString) {
var sel = typeof(classString) === 'string'? 'button.ok.' + classString:'button.ok.primary';
var sel = typeof(classString) === 'string'? 'button.ok.' + classString:'button.btn.ok.primary';
return h(sel, { tabindex: '2', }, content || Messages.okButton);
};
dialog.cancelButton = function (content, classString) {
var sel = typeof(classString) === 'string'? 'button.' + classString:'button.cancel';
var sel = typeof(classString) === 'string'? 'button.' + classString:'button.btn.cancel';
return h(sel, { tabindex: '1'}, content || Messages.cancelButton);
};
@ -396,6 +396,7 @@ define([
buttons.forEach(function (b) {
if (!b.name || !b.onClick) { return; }
var button = h('button', { tabindex: '1', 'class': b.className || '' }, b.name);
button.classList.add('btn');
var todo = function () {
var noClose = b.onClick();
if (noClose) { return; }

@ -805,7 +805,7 @@ define([
id: 'cp-app-prop-change-password',
style: 'flex: 1;'
});
var passwordOk = h('button', Messages.properties_changePasswordButton);
var passwordOk = h('button.btn', Messages.properties_changePasswordButton);
var changePass = h('span.cp-password-change-container', [
newPassword,
passwordOk

@ -490,6 +490,7 @@ define([
}, {
typeInput: $select[0]
});
$select.find('button').addClass('btn');
});
toolbar.$drawer.append($export);
};

@ -1,7 +1,6 @@
@import (reference) '../../customize/src/less2/include/framework.less';
@import (reference) '../../customize/src/less2/include/messenger.less';
@import (reference) '../../customize/src/less2/include/avatar.less';
@import (reference) '../../customize/src/less2/include/buttons.less';
// body
&.cp-app-contacts {
@ -19,9 +18,6 @@
display: flex; // We need this to remove a 3px border at the bottom of the toolbar
}
.cp-app-contacts-friends {
.buttons_main();
}
.cp-contacts-muted-table {
.avatar_main(50px);
.cp-contacts-muted-user {
@ -33,8 +29,6 @@
}
}
.messenger_main();
}

@ -3,7 +3,6 @@
@import (reference) "../../customize/src/less2/include/tools.less";
@import (reference) "../../customize/src/less2/include/markdown.less";
@import (reference) "../../customize/src/less2/include/avatar.less";
@import (reference) "../../customize/src/less2/include/buttons.less";
// body
&.cp-app-kanban {
@ -310,7 +309,6 @@
position: relative;
min-height: 50px;
.cp-kanban-filterTags {
.buttons_main();
display: inline-flex;
align-items: center;
flex: 1;

@ -1,6 +1,5 @@
@import (reference) "../../customize/src/less2/include/framework.less";
@import (reference) "../../customize/src/less2/include/comments.less";
@import (reference) "../../customize/src/less2/include/buttons.less";
body.cp-app-pad {
.framework_main(
@ -71,7 +70,6 @@ body.cp-app-pad {
order: 1;
}
div.cp-comment-bubble {
.buttons_main();
position: relative;
order: 2;
button {

@ -8,6 +8,7 @@
@import (reference) '../../customize/src/less2/include/password-input.less';
@import (reference) '../../customize/src/less2/include/modals-ui-elements.less';
@import (reference) '../../customize/src/less2/include/usergrid.less';
@import (reference) '../../customize/src/less2/include/forms.less';
&.cp-app-secureiframe {
.modals-ui-elements_main();
@ -19,6 +20,7 @@
.password_main();
.modal_main();
.usergrid_main();
.forms_main();
#cp-filepicker-dialog {
display: none;

@ -1,6 +1,5 @@
@import (reference) '../../customize/src/less2/include/tools.less';
@import (reference) "../../customize/src/less2/include/framework.less";
@import (reference) "../../customize/src/less2/include/buttons.less";
&.cp-app-whiteboard {
@ -74,8 +73,6 @@
padding: 10px;
.buttons_main();
& > * + * {
margin: 0;
margin-left: 1em;

Loading…
Cancel
Save