MarkTraceur has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/111107

Change subject: Use LESS instead of CSS
......................................................................

Use LESS instead of CSS

Because we're that cool of a startup apparently

Also because organization and easy code manipulation.

Change-Id: I81ca302b6848f83034f7efed2443757bb045c4f1
---
M MultimediaViewer.php
R resources/mmv/mmv.less
2 files changed, 91 insertions(+), 95 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/07/111107/1

diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index 7162e92..ce14970 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -36,6 +36,7 @@
                return array(
                        'localBasePath' => __DIR__ . "/resources/$path",
                        'remoteExtPath' => "MultimediaViewer/resources/$path",
+
                );
        };
 
@@ -222,7 +223,7 @@
                ),
 
                'styles' => array(
-                       'mmv.css',
+                       'mmv.less',
                ),
 
                'dependencies' => array(
diff --git a/resources/mmv/mmv.css b/resources/mmv/mmv.less
similarity index 69%
rename from resources/mmv/mmv.css
rename to resources/mmv/mmv.less
index dd89f2a..a50a14b 100644
--- a/resources/mmv/mmv.css
+++ b/resources/mmv/mmv.less
@@ -1,10 +1,6 @@
 /**
  * Override multilightbox styles that don't apply to us
  */
-.mlb-main .jq-fullscreened {
-       background-color: black;
-}
-
 .mlb-wrapper {
        position: absolute;
        bottom: auto;
@@ -12,6 +8,10 @@
 
 .mlb-main {
        height: auto;
+
+       .jq-fullscreened {
+               background-color: black;
+       }
 }
 
 .mlb-image-wrapper,
@@ -44,15 +44,15 @@
 
 .mw-mlb-controls {
        border: none;
+
+       div {
+               border: none;
+               display: block;
+       }
 }
 
 body.mobile .mw-mlb-controls,
 .mw-mlb-controls-position:hover .mw-mlb-controls {
-       display: block;
-}
-
-.mw-mlb-controls div {
-       border: none;
        display: block;
 }
 
@@ -125,20 +125,14 @@
        position: fixed;
        background-repeat: no-repeat;
        opacity: 0.8;
+       border: none;
+       z-index: 1003;
 }
 
 .mlb-close:hover,
 .mw-mlb-next-image:hover,
 .mw-mlb-prev-image:hover {
        opacity: 1;
-}
-
-.mlb-close,
-.mlb-fullscreen,
-.mw-mlb-next-image,
-.mw-mlb-prev-image {
-       border: none;
-       z-index: 1003;
 }
 
 .mw-mlb-license,
@@ -194,51 +188,57 @@
        color: #555555;
 }
 
-.mw-mlb-image-links li {
-       list-style: none;
-       font-size: 0.8em;
-       color: #3f4040;
-}
+.mw-mlb-image-links {
+       li {
+               list-style: none;
+               font-size: 0.8em;
+               color: #3f4040;
 
-.mw-mlb-image-links li:before {
-       display: inline-block;
-       vertical-align: middle;
-       height: 16px;
-       width: 16px;
-       content: ' ';
-       margin-right: 10px;
-       background-size: contain;
-       background-position: right center;
-       background-repeat: no-repeat;
-}
+               &.empty {
+                       display: none;
+               }
 
-.mw-mlb-image-links li.mw-mlb-repo-li:before {
-       /* @embed */
-       background-image: url(img/repo.svg);
-}
+               &:before {
+                       display: inline-block;
+                       vertical-align: middle;
+                       height: 16px;
+                       width: 16px;
+                       content: ' ';
+                       margin-right: 10px;
+                       background-size: contain;
+                       background-position: right center;
+                       background-repeat: no-repeat;
+               }
 
-.mw-mlb-image-links li.mw-mlb-datetime-li:before {
-       /* @embed */
-       background-image: url(img/time.svg);
-}
+               &.mw-mlb-repo-li:before {
+                       /* @embed */
+                       background-image: url(img/repo.svg);
+               }
 
-.mw-mlb-image-links li.mw-mlb-username-li:before {
-       /* @embed */
-       background-image: url(img/user-ltr.svg);
-}
+               &.mw-mlb-datetime-li:before {
+                       /* @embed */
+                       background-image: url(img/time.svg);
+               }
 
-.mw-mlb-image-links li.mw-mlb-location-li:before {
-       /* @embed */
-       background-image: url(img/location.svg);
-}
+               &.mw-mlb-username-li:before {
+                       /* @embed */
+                       background-image: url(img/user-ltr.svg);
+               }
 
-.mw-mlb-image-links li.mw-mlb-usefile-li:before {
-       /* @embed */
-       background-image: url(img/use-ltr.svg);
-}
+               &.mw-mlb-location-li:before {
+                       /* @embed */
+                       background-image: url(img/location.svg);
+               }
 
-.mw-mlb-image-links li.empty:before {
-       background-image: none !important;
+               &.mw-mlb-usefile-li:before {
+                       /* @embed */
+                       background-image: url(img/use-ltr.svg);
+               }
+
+               &.empty:before {
+                       background-image: none !important;
+               }
+       }
 }
 
 .mw-mlb-license,
@@ -256,31 +256,27 @@
        font-size: 0.9em;
        padding-left: 10px;
        vertical-align: baseline;
-}
 
-.mw-mlb-license.empty {
-       display: none;
-}
+       &.empty {
+               display: none;
+       }
 
-.mw-mlb-license.cc-license:before {
-       background-size: contain;
-       /* @embed */
-       background-image: url(img/cc.svg);
-       display: inline-block;
-       vertical-align: text-bottom;
-       height: 20px;
-       width: 20px;
-       content: ' ';
-       margin-right: 5px;
+       &.cc-license:before {
+               background-size: contain;
+               /* @embed */
+               background-image: url(img/cc.svg);
+               display: inline-block;
+               vertical-align: text-bottom;
+               height: 20px;
+               width: 20px;
+               content: ' ';
+               margin-right: 5px;
+       }
 }
 
 .mw-mlb-license-contain,
 .mw-mlb-license {
        text-align: right;
-}
-
-.mw-mlb-image-links li.empty {
-       display: none;
 }
 
 .mw-mlb-use-file-dialog label {
@@ -339,14 +335,11 @@
        height: 120px;
        cursor: pointer;
        transition: opacity 0.25s, margin 0.25s;
-}
 
-.mw-mlb-next-image:hover {
-       margin-right: -4px;
-}
-
-.mw-mlb-prev-image:hover {
-       margin-left: -4px;
+       &.disabled {
+               display: none;
+               cursor: none;
+       }
 }
 
 .mw-mlb-next-image {
@@ -354,6 +347,10 @@
        background-image: url(img/next-ltr.svg);
        background-position: right;
        right: 18px;
+
+       &:hover {
+               margin-right: -4px;
+       }
 }
 
 .mw-mlb-prev-image {
@@ -361,12 +358,10 @@
        background-image: url(img/prev-ltr.svg);
        background-position: left;
        left: 18px;
-}
 
-.mw-mlb-next-image.disabled,
-.mw-mlb-prev-image.disabled {
-       display: none;
-       cursor: none;
+       &:hover {
+               margin-left: -4px;
+       }
 }
 
 .mw-mlb-drag-affordance {
@@ -385,16 +380,16 @@
        margin: 0 auto;
        opacity: 0.6;
        transition: opacity 0.25s;
-}
 
-.mw-mlb-drag-icon.pointing-down {
-       background-position: center top;
-       transform: rotate(180deg);
-       -moz-transform: rotate(180deg);
-       -o-transform: rotate(180deg);
-       -webkit-transform: rotate(180deg);
-       filter:  progid:DXImageTransform.Microsoft.BasicImage(rotation=2.0);
-       -ms-filter: 
"progid:DXImageTransform.Microsoft.BasicImage(rotation=2.0)";
+       &.pointing-down {
+               background-position: center top;
+               transform: rotate(180deg);
+               -moz-transform: rotate(180deg);
+               -o-transform: rotate(180deg);
+               -webkit-transform: rotate(180deg);
+               filter:  
progid:DXImageTransform.Microsoft.BasicImage(rotation=2.0);
+               -ms-filter: 
"progid:DXImageTransform.Microsoft.BasicImage(rotation=2.0)";
+       }
 }
 
 .mlb-post-image:hover .mw-mlb-drag-icon {

-- 
To view, visit https://gerrit.wikimedia.org/r/111107
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81ca302b6848f83034f7efed2443757bb045c4f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to