diff --git a/css/_base.scss b/css/_base.scss index 6491bcbb0..64dfcd203 100644 --- a/css/_base.scss +++ b/css/_base.scss @@ -29,36 +29,6 @@ html, body, input, textarea, keygen, select, button { color: #636363; } -input[type='text'], input[type='password'], textarea { - display: inline-block; - width: 100%; - padding: 5px 7px; - color: $inputColor; - border-radius: $borderRadius; - line-height: 32px; - height: 32px; - text-align: left; - border:1px solid $inputBorderColor; - background-color: $inputBackground; - outline: none; /* removes the default outline */ - resize: none; /* prevents the user-resizing, adjust to taste */ -} - -@include placeholder { - color: $placeHolderColor; -} - -textarea { - overflow: hidden; - word-wrap: break-word; - resize: none; - line-height: 1.5em; -} - -button.no-icon { - padding: 0 1em; -} - button, input, select, textarea { margin: 0; vertical-align: baseline; @@ -75,10 +45,26 @@ input[type="reset"], input[type="submit"] { cursor: pointer; } +textarea { + overflow: hidden; + word-wrap: break-word; + resize: none; + line-height: 1.5em; +} + +input[type='text'], input[type='password'], textarea { + outline: none; /* removes the default outline */ + resize: none; /* prevents the user-resizing, adjust to taste */ +} + button { color: #FFF; background-color: $buttonBackground; border-radius: $borderRadius; + + &.no-icon { + padding: 0 1em; + } } button, @@ -132,42 +118,6 @@ form { font-size: 12px; } -/** - * Hides an element. - */ -.hide { - display: none !important; -} - -/** - * Shows an element. - */ -.show { - display: block !important; -} - -/** - * Shows an inline element. - */ -.show-inline { - display: inline-block !important; -} - -.show-list-item { - display: list-item !important; -} - -/** - * Shows a flex element. - */ -.show-flex { - display: -webkit-box !important; - display: -moz-box !important; - display: -ms-flexbox !important; - display: -webkit-flex !important; - display: flex !important; -} - /** * Tooltips **/ @@ -189,18 +139,6 @@ form { visibility: visible; } -.link { - cursor: pointer; - color: $linkFontColor; - @include transition(color .1s ease-out); - - &:hover { - color: $linkHoverFontColor; - text-decoration: underline; - @include transition(color .1s ease-in); - } -} - #inviteLinkRef { -webkit-user-select: text; user-select: text; diff --git a/css/_side_toolbar_container.scss b/css/_side_toolbar_container.scss index caa36a476..f6a11afe3 100644 --- a/css/_side_toolbar_container.scss +++ b/css/_side_toolbar_container.scss @@ -30,16 +30,6 @@ width: 80%; } - /** - * Specify colors for edit elements. - */ - select, input[type="button"], input[type="text"], input[type="reset"], - input[type="submit"] { - color: $inputColor; - background: $inputBackground; - border: none; - } - /** * Specify styling of elements inside a block. */ diff --git a/css/_utils.scss b/css/_utils.scss new file mode 100644 index 000000000..33524eea4 --- /dev/null +++ b/css/_utils.scss @@ -0,0 +1,38 @@ +/** + * Hides an element. + */ +.hide { + display: none !important; +} + +/** + * Shows an element. + */ +.show { + display: block !important; +} + +/** + * Shows an inline element. + */ +.show-inline { + display: inline-block !important; +} + +/** +* Shows as a list item +**/ +.show-list-item { + display: list-item !important; +} + +/** + * Shows a flex element. + */ +.show-flex { + display: -webkit-box !important; + display: -moz-box !important; + display: -ms-flexbox !important; + display: -webkit-flex !important; + display: flex !important; +} \ No newline at end of file diff --git a/css/components/_form-control.scss b/css/components/_form-control.scss index 54486687e..227312162 100644 --- a/css/components/_form-control.scss +++ b/css/components/_form-control.scss @@ -19,24 +19,6 @@ font-weight: $labelFontWeight; } - &__input { - margin-bottom: 8px; - @include transition(all .2s ease-in); - - &:last-child { - margin-bottom: inherit; - } - - &::selection { - background-color: $defaultDarkSelectionColor; - } - - &.error { - color: $errorColor; - border-color: $errorColor; - } - } - &__em { color: $inputControlEmColor; } diff --git a/css/components/_input-control.scss b/css/components/_input-control.scss index 8e86e7b73..f13566606 100644 --- a/css/components/_input-control.scss +++ b/css/components/_input-control.scss @@ -1,3 +1,32 @@ .input-control { - + @include transition(all .2s ease-in); + display: inline-block; + width: 100%; + padding: 5px 7px; + color: $inputColor; + border-radius: $borderRadius; + line-height: 32px; + height: 32px; + text-align: left; + border:1px solid $inputBorderColor; + background-color: $inputBackground; + margin-bottom: 8px; + + &:last-child { + margin-bottom: inherit; + } + + &::selection { + background-color: $defaultDarkSelectionColor; + } + + + &.error { + color: $errorColor; + border-color: $errorColor; + } +} + +@include placeholder { + color: $placeHolderColor; } \ No newline at end of file diff --git a/css/components/_link.scss b/css/components/_link.scss new file mode 100644 index 000000000..c8631350f --- /dev/null +++ b/css/components/_link.scss @@ -0,0 +1,11 @@ +.link { + cursor: pointer; + color: $linkFontColor; + @include transition(color .1s ease-out); + + &:hover { + color: $linkHoverFontColor; + text-decoration: underline; + @include transition(color .1s ease-in); + } +} \ No newline at end of file diff --git a/css/main.scss b/css/main.scss index dfb80a1eb..ae22301cf 100644 --- a/css/main.scss +++ b/css/main.scss @@ -33,6 +33,7 @@ @import 'toastr'; @import 'base'; +@import 'utils'; @import 'overlay/overlay'; @import 'inlay'; @import 'reload_overlay/reload_overlay'; @@ -56,8 +57,10 @@ @import 'keyboard-shortcuts'; @import 'redirect_page'; @import 'components/form-control'; +@import 'components/link'; @import 'shortcuts/main'; @import 'components/button-control'; +@import 'components/_input-control.scss'; @import "modals/invite/invite"; @import "connection-info"; @import 'aui-components/dropdown'; diff --git a/modules/UI/UI.js b/modules/UI/UI.js index b3735aeca..ff2932cfd 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -84,8 +84,7 @@ function promptDisplayName() { + class="input-control" autofocus> ` ); @@ -742,9 +741,11 @@ UI.showLoginPopup = function(callback) { let message = ( ` + placeholder="user@domain.net" + class="input-control" autofocus> ` ); diff --git a/modules/UI/authentication/LoginDialog.js b/modules/UI/authentication/LoginDialog.js index 8915fde69..535731e73 100644 --- a/modules/UI/authentication/LoginDialog.js +++ b/modules/UI/authentication/LoginDialog.js @@ -11,10 +11,10 @@ function getPasswordInputHtml() { return ` `; } diff --git a/modules/UI/feedback/FeedbackWindow.js b/modules/UI/feedback/FeedbackWindow.js index 1354336b3..35a444028 100644 --- a/modules/UI/feedback/FeedbackWindow.js +++ b/modules/UI/feedback/FeedbackWindow.js @@ -66,7 +66,7 @@ function createRateFeedbackHTML() {
-
`; diff --git a/modules/UI/invite/InviteDialogView.js b/modules/UI/invite/InviteDialogView.js index 40acaccad..ad4cbaed6 100644 --- a/modules/UI/invite/InviteDialogView.js +++ b/modules/UI/invite/InviteDialogView.js @@ -124,7 +124,7 @@ export default class InviteDialogView {
- @@ -155,7 +155,8 @@ export default class InviteDialogView { for="newPasswordInput" data-i18n="dialog.addPassword">
-