Foxtrott has submitted this change and it was merged.
Change subject: Add styling for thumbnails
......................................................................
Add styling for thumbnails
Change-Id: I66ab6f96d6cd2dffad2abb255a2a2b8ff814cb7d
---
M src/SkinChameleon.php
M styles/screen.less
A styles/thumbnails.less
3 files changed, 78 insertions(+), 1 deletion(-)
Approvals:
Foxtrott: Verified; Looks good to me, approved
diff --git a/src/SkinChameleon.php b/src/SkinChameleon.php
index c90c394..ebedb78 100644
--- a/src/SkinChameleon.php
+++ b/src/SkinChameleon.php
@@ -41,7 +41,8 @@
*/
function setupSkinUserCss( OutputPage $out ) {
- parent::setupSkinUserCss( $out );
+ // do not use non-standard MW less files anymore
+// parent::setupSkinUserCss( $out );
// load Bootstrap styles
$out->addModuleStyles( 'ext.bootstrap.styles' );
diff --git a/styles/screen.less b/styles/screen.less
index 3392f6d..0882d78 100644
--- a/styles/screen.less
+++ b/styles/screen.less
@@ -22,6 +22,18 @@
* @ingroup Skins
*/
+@import "./thumbnails.less";
+
+.center {
+ text-align: center;
+ width: 100%;
+
+ * {
+ margin-left: auto;
+ margin-right: auto;
+ }
+}
+
// logo will be scaled down to this height to fit into the navbar (should be
<= navbar-height)
@navbar-logo-height: .9 * @navbar-height;
diff --git a/styles/thumbnails.less b/styles/thumbnails.less
new file mode 100644
index 0000000..e00da7a
--- /dev/null
+++ b/styles/thumbnails.less
@@ -0,0 +1,64 @@
+/* Thumbnails */
+
+@thumbnail-caption-padding: 3px;
+
+.thumbinner {
+ .thumbnail;
+}
+
+/* Default styles when there's no .mw-content-ltr or .mw-content-rtl,
overridden below */
+.thumbcaption {
+ .thumbnail > .caption;
+ text-align: left;
+}
+
+div.magnify {
+ float: right;
+ margin-left: 0.3em;
+ margin-right: 0;
+
+ a {
+ .glyphicon;
+ .glyphicon-zoom-in;
+
+ color: lighten( @thumbnail-caption-color, 15% );
+
+ &:hover {
+ text-decoration: none;
+ color: @text-color;
+ }
+
+ /* Don't annoy people who copy-paste everything too much */
+ .user-select(none);
+ }
+}
+
+
+/* Directionality-specific styles for thumbnails - their positioning depends
on content language */
+
+/* @noflip */
+.mw-content-ltr{
+ .thumbcaption {
+ text-align: left;
+ }
+
+ div.magnify {
+ float: right;
+ margin-left: 0.3em;
+ margin-right: 0;
+ }
+}
+
+/* @noflip */
+.mw-content-rtl{
+ .thumbcaption {
+ text-align: right;
+ }
+
+ div.magnify {
+ float: left;
+ margin-left: 0;
+ margin-right: 0.3em;
+ .scale(-1, 1); // flip magnifying glass
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/159193
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I66ab6f96d6cd2dffad2abb255a2a2b8ff814cb7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/chameleon
Gerrit-Branch: master
Gerrit-Owner: Foxtrott <[email protected]>
Gerrit-Reviewer: Foxtrott <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits