Mailspring/internal_packages/preferences/stylesheets/preferences.less

285 lines
5.9 KiB
Text
Raw Normal View History

@import "ui-variables";
@import "ui-mixins";
// Preferences Specific
.preferences-wrap {
input[type=checkbox] { margin: 0 7px 0 0; position: relative; top: -1px; }
input[type=radio] { margin: 0 7px 0 0; position: relative; top: -1px; }
select { margin: 4px 0 0 8px; }
height: 100%;
background-color: @background-primary;
color: @text-color;
h6 {
color: @text-color-very-subtle;
margin-top: 20px;
margin-bottom: 10px;
}
section:first-child h6:first-child {
margin-top: 0;
}
p {
color: @text-color-very-subtle;
font-size: @font-size-smaller;
a {
color: @text-color-very-subtle;
font-weight: bold;
text-decoration: underline;
}
}
*[contenteditable] {
p {
color: @text-color;
font-size: @font-size-base;
}
}
section {
padding-bottom: @padding-base-vertical;
.item {
padding-top: @padding-small-vertical;
padding-bottom: @padding-small-vertical;
}
}
.container-preference-tabs {
width: 100%;
background-color: @source-list-bg;
border-bottom: 1px solid @border-color-divider;
.preferences-tabs {
padding-top: 10px;
background-color: @source-list-bg;
.item {
cursor: default;
margin: 0 auto;
flex: 1.3;
min-width: 54px;
max-width: 120px;
text-align: center;
&:active {
img {
-webkit-filter: brightness(40%);
}
}
&.active {
background: darken(@background-primary, 10%);
border-radius: @border-radius-large @border-radius-large 0 0;
box-shadow: @shadow-border;
}
.tab-icon {
2016-04-07 04:08:37 +08:00
padding-top: 8px;
padding-bottom: 8px;
display: block;
margin: auto;
}
.name {
padding: @padding-base-vertical @padding-base-horizontal * 0.3 @padding-large-vertical @padding-base-horizontal * 0.3;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: @font-size-small;
line-height: @font-size-small;
}
}
}
}
.preferences-content {
flex: 8;
background-color: lighten(@background-secondary, 1%);
feat(account-prefs): Adds new page for Account in preferences Summary: Adds the new Account preferences page. This consists of two major React components, PreferencesAccountList and PreferencesAccountDetails, both of which use EditableList. I added a bunch of fixes and updated the API for EditableList, plus a bit of refactoring for PreferencesAccount component, and a bunch of CSS so its a big diff. The detailed changelog: Updates to EditableList: - Fix bug updating selection state when arrows pressed to move selection - Add new props: - allowEmptySelection to allow the list to have no selection - createInputProps to pass aditional props to the createInput - Add scroll region for list items - Update styles and refactor render methods Other Updates: - Updates Account model to hold aliases and a label - Adds getter for label to default to email - Update accountswitcher to display label, update styles and spec - Refactor PreferencesAccounts component: - Splits it into smaller components, - Removes unused code - Splits preferences styelsheets into smaller separate stylesheet for account page. Adds some updates and fixes (scroll-region padding) - Update AccountStore to be able to perform updates on an account. - Adds new Action to update account, and an action to remove account to be consistent with Action usage - Adds components for Account list and Aliases list using EditableList Test Plan: - All specs pass, but need to write new tests! Reviewers: bengotow, evan Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D2332
2015-12-10 04:35:40 +08:00
&>.scroll-region-content {
padding: @padding-large-vertical * 3 @padding-large-horizontal * 3;
}
.container-dropdown {
margin: 5px 0;
.dropdown {
padding-left: 10px;
}
}
}
.container-general {
width: 40%;
min-width: 400px;
margin: 0 auto;
.local-data {
.btn {
margin: 4px 0 0 8px;
border: 1px solid @dropdown-default-border-color;
box-shadow: none;
border-radius: 5px;
}
}
}
.container-appearance {
2016-04-07 04:08:37 +08:00
width: 400px;
margin: 0 auto;
.appearance-mode-switch {
max-width: 400px;
text-align: right;
margin: 10px 0;
.appearance-mode {
background-color: @background-off-primary;;
border-radius: 10px;
border: 1px solid @background-tertiary;
text-align: center;
flex: 1;
padding: 25px;
padding-bottom: 9px;
margin-right: 10px;
margin-bottom: 7px;
margin-top: 0;
img {
background-color: @background-tertiary;
}
div {
margin-top: 15px;
text-transform: capitalize;
cursor: default;
}
&:last-child {
margin-right: 0;
}
}
.appearance-mode.active {
border: 1px solid @component-active-color;
color: @component-active-color;
img { background-color: @component-active-color; }
}
}
}
.container-keymaps {
width: 40%;
min-width: 460px;
margin: 0 auto;
.col-left {
text-align: right;
flex: 1;
margin-right: 20px;
}
.col-right {
text-align: left;
flex: 1;
select {
width: 75%;
}
}
.shortcut-section-title {
border-bottom: 1px solid @border-color-divider;
margin: @padding-large-vertical * 1.5 0;
}
.shortcut {
padding: 3px 0;
color: @text-color-very-subtle;
.values {
font-family: monospace;
font-weight: 600;
color: @text-color;
display: inline-block;
padding-left: @padding-small-horizontal;
padding-right: @padding-small-horizontal;
cursor: text;
.shortcut-value {
.then {
font-size:0.9em;
color: @text-color-very-subtle;
}
&:after {
content: ", "
}
&:last-child:after {
content: "";
}
}
}
&.editing {
.values {
background: @input-bg;
color: @component-active-color;
border-radius: @border-radius-base;
outline: 1px solid @input-border-color;
}
}
}
}
.platform-note {
padding: @padding-base-vertical @padding-base-horizontal;
background: fade(@black, 4%);
border-left: 3px solid @color-info;
margin: @padding-base-vertical 0;
font-size: 0.95em;
&:before {
color: @color-info;
font-weight: 600;
content: "NOTE: ";
}
}
.platform-linux-only {
display: none;
}
}
body.platform-win32 {
.preferences-wrap {
.well {
border-radius: 0;
}
.container-appearance {
.appearance-mode {
border-radius: 0;
}
}
}
}
body.platform-linux {
.preferences-wrap {
.platform-linux-only {
display: block;
}
}
}
2016-04-07 04:08:37 +08:00
@media (-webkit-min-device-pixel-ratio: 2) {
.preferences-tabs {
.tab-icon {
padding-top: 15px !important;
}
}
}
@media (max-width: 600px) {
.preferences-tabs .item .name {
display:none;
}
.preferences-wrap .preferences-content > .scroll-region-content {
padding-left: @padding-large-horizontal * 1;
padding-right: @padding-large-horizontal * 1;
}
}