sogo/UI/WebServerResources/scss/components/card/card.scss

97 lines
2.2 KiB
SCSS
Raw Normal View History

2015-05-20 15:31:53 +02:00
/// card.scss -*- Mode: scss; indent-tabs-mode: nil; basic-offset: 2 -*-
2015-02-03 16:17:15 +01:00
@import 'extends';
md-card {
md-card-content {
overflow-y: auto;
2015-03-31 16:50:05 +02:00
transition: $swift-ease-in-out;
}
md-card-actions:not(.layout-column) {
.md-button {
// "last-of-type" doesn't work well when we have multiple types so we overwrite md's directive
&.md-icon-button,
&.md-icon-button:last-of-type,
&.sg-icon-button,
&.sg-icon-button:last-of-type {
margin: 0 $baseline-grid * .5;
}
&:hover {
// When using ui-sref from ui-router, buttons become links and the background becomes grey
// when the cursor is over the button. We force the normal behaviour of buttons.
background-color: transparent;
}
}
}
.md-secondary {
@extend .md-secondary;
}
2016-05-17 22:35:47 +02:00
// Collapsed/expanded states for cards in ACL editor and user folders (subscriptions)
2015-06-23 17:21:50 +02:00
&.sg-collapsed, &.sg-expanded {
2016-05-17 22:35:47 +02:00
background-color: transparent;
2015-06-23 17:21:50 +02:00
transition: $swift-ease-in-out;
transition-delay: 0s;
> .md-button {
margin: 0;
flex-direction: row;
}
2015-10-09 22:10:39 +02:00
.md-icon-button {
transition: $swift-linear;
transition-duration: 0.2s;
2015-10-09 22:10:39 +02:00
transition-delay: 0.2s;
opacity: 1;
&.ng-hide {
transition: $swift-linear;
opacity: 0;
}
}
2015-06-23 17:21:50 +02:00
md-card-content {
order: 1;
transition: $swift-ease-in-out;
transition-delay: 0.1s;
max-height: 500px;
&.ng-hide {
max-height: 0;
padding-bottom: 0;
padding-top: 0;
}
}
2016-06-20 22:10:52 +02:00
// Animate item removal
&.ng-leave {
transform: translateX(0%);
transition-duration: 500ms;
&.ng-leave-active {
.md-button:not([disabled]):hover {
background-color: transparent;
}
transform: translateX(-70%);
}
}
2015-06-23 17:21:50 +02:00
}
2015-05-28 20:20:25 +02:00
&.sg-collapsed {
border-radius: 0;
box-shadow: none;
2015-05-28 20:20:25 +02:00
margin-top: 0;
margin-bottom: 0;
2015-05-28 20:20:25 +02:00
}
&.sg-expanded {
@extend .md-whiteframe-z2;
margin: 0 0 1px 0;
&-remove { // ngAnimate with ngClass
2015-10-09 22:10:39 +02:00
transition-delay: 0.5s;
}
2015-05-28 20:20:25 +02:00
}
.md-button {
.sg-tile-content {
text-align: left;
text-transform: none;
}
}
}