mediawiki-extensions-Multim.../resources/mmv/ui/mmv.ui.metadataPanelScroller.less
Gergő Tisza 5e3808a14e Make the metadata panel opening affordance more obvious
- rearrange DOM structure of above-fold part of the metadata panel:
  - rename .mw-mmv-controls to .mw-mmv-above-fold
  - the above-fold part is a single positioned div now, with height
    explitcitly set
  - less LESS gymnastics, above-fold height is a single variable
  - add paddings to the p elements instead of the containers
  - make all title elements align to baseline (except the logo which
    would look horrible)
- discard some CSS which was superfluous
  - overspecified sizes/positions
  - some top/bottoms for staticly positioned elements
- get rid of the .mw-mmv-drag-affordance div, since a full-width bar
  wouldn't really make sense on the bottom of the above-fold section
- flip the chevron and place it to the bottom of the above-fold part;
  add colors etc. per spec
- fix stripe button horizontal spacing

Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/706
Change-Id: Ic37b4150288055c3fae8d22919ed7b1249db1f09
2014-06-19 21:14:56 +00:00

140 lines
2.6 KiB
Plaintext

@import "../mmv.globals";
@import "../mmv.mixins";
@import "mediawiki.mixins.animation";
@drag-icon-width: 64px;
@drag-icon-height: 18px;
@drag-icon-color: #e6e6e6;
@drag-icon-invite-color: #347bff;
.mw-mmv-post-image {
.animation( mw-mmv-appear-animation 0.5s ease 0s 1 normal forwards );
&.invite {
.animation( mw-mmv-invite-animation 1s ease 0s 1 normal forwards );
}
.jq-fullscreened & {
.animation(none);
}
}
.mw-mmv-appear-animation() {
0% {
opacity: 0.6;
}
50% {
opacity: 0.9;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes mw-mmv-appear-animation {
.mw-mmv-appear-animation;
}
@-moz-keyframes mw-mmv-appear-animation {
.mw-mmv-appear-animation;
}
@-o-keyframes mw-mmv-appear-animation {
.mw-mmv-appear-animation;
}
@keyframes mw-mmv-appear-animation {
.mw-mmv-appear-animation;
}
.mw-mmv-invite-animation() {
0% {
margin-top: 0px;
}
33% {
margin-top: -30px;
}
100% {
margin-top: 0;
}
}
@-webkit-keyframes mw-mmv-invite-animation {
.mw-mmv-invite-animation;
}
@-moz-keyframes mw-mmv-invite-animation {
.mw-mmv-invite-animation;
}
@-o-keyframes mw-mmv-invite-animation {
.mw-mmv-invite-animation;
}
@keyframes mw-mmv-invite-animation {
.mw-mmv-invite-animation;
}
.mw-mmv-drag-icon {
width: @drag-icon-width;
height: @drag-icon-height;
position: absolute;
left: 50%;
bottom: 0;
margin: 0 0 0 -(@drag-icon-width / 2);
/* @embed */
background-image: url(img/drag.svg);
background-repeat: no-repeat;
background-position: center bottom;
background-color: @drag-icon-color;
cursor: pointer;
z-index: 1; // make sure it is above the text - the icon is visually at the bottom but in the DOM at the top
.opacity(0.7);
transition: opacity 0.25s;
&-pointing-down { // use single-class selector - chevron direction is important enough to make it IE6-compatible
background-position: center top;
.rotate(180deg);
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-moz-border-radius-bottomleft: 3px;
-moz-border-radius-bottomright: 3px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
.mw-mmv-post-image:hover & {
.opacity(1);
}
}
&-pointing-up {
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-moz-border-radius-topleft: 3px;
-moz-border-radius-topright: 3px;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
&:hover {
.opacity(1);
}
}
&.panel-open {
display: none;
}
&.panel-never-opened {
/* @embed */
background-image: url(img/drag-active.svg);
background-color: @drag-icon-invite-color;
.opacity(1);
}
.jq-fullscreened & {
display: none;
}
}