sogo/UI/WebServerResources/scss/components/chips/chips.scss
2016-01-08 22:06:35 -05:00

90 lines
1.9 KiB
SCSS

/// chips.scss -*- Mode: scss; indent-tabs-mode: nil; basic-offset: 2 -*-
@import 'extends';
md-chips {
// Remove the line under the tags of the message viewer
&.sg-readonly {
.md-chips {
box-shadow: none;
&.md-focused {
box-shadow: none;
}
.md-chip-content {
max-width: initial; // fix bug in ng-material
}
// Custom 'chip remove' button used with chips in readonly mode
.sg-chip-remove {
&:hover {
cursor: pointer;
}
height: $chip-delete-icon-size;
width: $chip-delete-icon-size;
line-height: $chip-delete-icon-size;
}
}
}
.sg-chip-progress {
border-radius: $chip-height / 2;
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
top: 0;
transition: $swift-ease-in-out;
&.ng-hide {
background-color: #fff;
}
span {
bottom: 0;
left: 0;
opacity: 0.5;
position: absolute;
top: 0;
transition: $swift-ease-in-out;
width: 0;
}
}
.sg-chip-color {
@extend .sg-chip-progress;
span {
width: 100%;
}
}
}
// Enlarge the default autocompletion menu
.sg-chips-autocomplete {
width: (3 * $contact-chip-name-width);
@media (max-width: $layout-breakpoint-xs) {
// Enlarge the autocompletion menu on small devices to fit the entire screen
left: 0;
right: 0;
width: auto;
}
}
// Adjust avatar size according to chips dimensions
.md-contact-chips {
.md-chips {
.md-chip {
.md-contact-avatar {
md-icon {
height: ($chip-height * .75);
margin: ($chip-height * .25/2);
}
}
}
}
}
// In the autocompletion menu, don't limit the contact name to a fixed width
// and show the email address right after it
.md-contact-suggestion {
.md-contact-name {
width: auto;
}
.md-contact-email {
margin-left: $contact-chip-suggestion-margin;
}
}