mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-06 04:20:33 +00:00
Fine-tune presentation of Mailer UI
- Colors - Icons - Dimmensions - Typography
This commit is contained in:
committed by
Francis Lachapelle
parent
16f275af52
commit
cd32bcf961
@@ -9,18 +9,61 @@
|
||||
// The only selector for vs-repeat lists is this id, we use attributes selector to
|
||||
// avoid overspecifying
|
||||
// todo: create new classes and refactor templates markup
|
||||
// ----------------------------------------------------------------------------
|
||||
[id='messagesList'] {
|
||||
border-top: 44px solid transparent; // padding for the header.subheader,
|
||||
border-bottom: 2px solid transparent; //close to a hack
|
||||
z-index: 10;
|
||||
|
||||
// In use in MAILER messages list but re-usable
|
||||
// --------------------------------------------
|
||||
md-item-content {
|
||||
padding: $layout-gutter-width;
|
||||
padding: 0 0 0 $mg;
|
||||
margin: $mg 0;
|
||||
transition: all 0.35s $swift-ease-in-timing-function 0.15s;
|
||||
&:hover {
|
||||
background-color: sg-color($sogoPaper, 300);
|
||||
color: sg-color($sogoBlue, 800);
|
||||
cursor: pointer;
|
||||
}
|
||||
&:active {
|
||||
color: sg-color($sogoBlue, 800);
|
||||
}
|
||||
&:focus {
|
||||
background-color: sg-color($sogoBlue, 100);
|
||||
}
|
||||
}
|
||||
.sg-md-subhead-solo {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.sg {
|
||||
&-tile-content {
|
||||
@extend .md-tile-content;
|
||||
.name {
|
||||
font-weight: $sg-font-light;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.subject {
|
||||
font-weight: $sg-font-medium;
|
||||
// dirty fix for vs-repeat damages
|
||||
max-width: 75%;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
p {
|
||||
margin: $list-p-margin;
|
||||
font-size: sg-size(body);
|
||||
}
|
||||
.msg-date {
|
||||
font-size: sg-size(body);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sg-tile-content {
|
||||
padding: 0 0 0 $layout-gutter-width;
|
||||
.sg-md-subhead-multi,
|
||||
@@ -33,6 +76,7 @@
|
||||
a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,17 @@
|
||||
/// Definitions for button extends
|
||||
///
|
||||
@import 'extends';
|
||||
.sg-active button {
|
||||
color: $primary-color;
|
||||
|
||||
// Buttons for the sidenav folder tree
|
||||
// ------------------------------------
|
||||
sg-folder-tree .md-button {
|
||||
outline: none;
|
||||
color: inherit;
|
||||
font-size: sg-size(button);
|
||||
padding: 0;
|
||||
-webkit-font-smoothing: auto;
|
||||
|
||||
}
|
||||
.sg-active .md-button {
|
||||
color: sg-color($sogoBlue, 800);
|
||||
}
|
||||
@@ -36,4 +36,4 @@ src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAjEMAAsAA
|
||||
src: url('#{$md-font-path}/Material-Design-Iconic-Font.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,30 +4,29 @@
|
||||
/// Module: List
|
||||
/// Main definitions for List
|
||||
////
|
||||
|
||||
@import 'extends';
|
||||
.sg {
|
||||
&-tile-content {
|
||||
@extend .md-tile-content;
|
||||
.name {
|
||||
margin: $list-h3-margin;
|
||||
font-weight: $list-h3-font-weight;
|
||||
font-size: $list-h3-font-size;
|
||||
}
|
||||
.subject {
|
||||
margin: $list-h4-margin;
|
||||
font-weight: $list-h4-font-weight;
|
||||
font-size: $list-h4-font-size;
|
||||
// dirty fix for vs-repeat damages
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
p {
|
||||
margin: $list-p-margin;
|
||||
font-size: $list-p-font-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
// List variables
|
||||
// ----------------------------------------------------------------------------
|
||||
//$list-h3-font-size: 1.1em !default;
|
||||
//$list-h3-margin: 0 0 3px 0 !default;
|
||||
//$list-h3-font-weight: 400 !default;
|
||||
//$list-h4-font-size: 0.9em !default;
|
||||
//$list-h4-font-weight: 400 !default;
|
||||
//$list-h4-margin: 0 0 3px 0 !default;
|
||||
//$list-p-font-size: 0.75em !default;
|
||||
//$list-p-margin: 0 0 3px 0 !default;
|
||||
//
|
||||
//$list-padding-top: $baseline-grid !default;
|
||||
//$list-padding-right: 0px !default;
|
||||
//$list-padding-left: 0px !default;
|
||||
//$list-padding-bottom: $baseline-grid !default;
|
||||
//
|
||||
//$item-padding-top: 0px !default;
|
||||
//$item-padding-right: 0px !default;
|
||||
//$item-padding-left: 0px !default;
|
||||
//$item-padding-bottom: 0px !default;
|
||||
|
||||
|
||||
// The right tile for a list item.
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -49,6 +48,23 @@
|
||||
.md-tile-right {
|
||||
margin-right: -$layout-gutter-width;
|
||||
}
|
||||
// Overqualifying to override a rule in source
|
||||
div.md-tile-left {
|
||||
min-width: $sg-md-grid-pitch + $baseline-grid;
|
||||
}
|
||||
.sg-tile-icons {
|
||||
font-size: $sg-font-size-1;
|
||||
color: $colorGray;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: (2 * $mg);
|
||||
height:(7 * $line);
|
||||
|
||||
}
|
||||
// Avatar placeholder
|
||||
// ------------------------------------
|
||||
.md-tile-left:before {
|
||||
content: "\f251";
|
||||
font-family: 'Material Design Iconic Font';
|
||||
|
||||
@@ -101,11 +101,65 @@ md-sidenav {
|
||||
width: 85%;
|
||||
}
|
||||
}
|
||||
|
||||
// MAIN SIDENAV, actually to the left
|
||||
// ----------------------------------------------------------------------------
|
||||
.md-sidenav-left {
|
||||
border-right: 1px solid sg-color($sogoPaper, 500);
|
||||
& md-content,
|
||||
& md-toolbar {
|
||||
background-color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// MAILER Folder tree (in the left sidenav
|
||||
// ---------------------------------------
|
||||
$i: 1;
|
||||
@while $i < 12 {
|
||||
md-item-content .sg-child-level-#{$i} { padding-left: 2em * $i; }
|
||||
$i: $i + 1;
|
||||
}
|
||||
|
||||
// Folder and mailboxes icons
|
||||
// ---------------------------------------
|
||||
[class*="sg-child-level"] {
|
||||
margin-right: 1em;
|
||||
};
|
||||
// This hack is so BAD I'm ashame putting it in the shame file
|
||||
// -----------------------------------------------------------
|
||||
// Folder tree's controler function are very intricate, the way
|
||||
// elements are marked as 'active reminds me of good old time JQuery
|
||||
// There must be a more straigthforward, angular-way to swap classes
|
||||
// selection, but I don't wan't to mess in that script.
|
||||
// Here's the hack : on selection I use the parent > child selector to
|
||||
// change the definition of the icon's class. Yes, this means that
|
||||
// md-icon-folder:before as the value of md-icon-folder:before:before,
|
||||
// and this is wrong !
|
||||
|
||||
.sg-active i.md-icon-folder:before {
|
||||
@extend .md-icon-folder-open:before;
|
||||
}
|
||||
|
||||
.md-sidenav-left {
|
||||
|
||||
md-item-content {
|
||||
line-height: $sg-line-height-6; // 40px eg. display-1
|
||||
padding: 0 $mg;
|
||||
transition: background-color $swift-ease-in-duration $swift-ease-in-timing-function;
|
||||
&:hover {
|
||||
background-color: sg-color($sogoPaper, 500);
|
||||
cursor: pointer;
|
||||
}
|
||||
&.sg-active {
|
||||
color: sg-color($sogoBlue, 800);
|
||||
}
|
||||
&.sg-loading {
|
||||
color: sg-color($sogoBlue, 500);
|
||||
}
|
||||
.sg-item-name {
|
||||
text-align: left;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,35 @@
|
||||
md-toolbar {
|
||||
z-index: 20;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
header {
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
}
|
||||
hgroup {
|
||||
align-items: center;
|
||||
flex: 1 1 auto;
|
||||
&h3 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.sg-icon-bar {
|
||||
font-size: $sg-font-size-5;
|
||||
color: $colorGray;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: ($pitch);
|
||||
height:(3 * $pitch);
|
||||
margin-right: $mg * -1;
|
||||
}
|
||||
.sg-icon-bar *.button {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
width: (2 * $mg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user