Yurik has uploaded a new change for review.
https://gerrit.wikimedia.org/r/210079
Change subject: Added class="mw-wiki-graph-img" to the graph <img>
......................................................................
Added class="mw-wiki-graph-img" to the graph <img>
Existing code had <div class="mw-wiki-graph">, but whenever
it was replaced with an <img> tag, it had no class.
Added class to allow for easier styling.
Change-Id: I238c6de35af278a99701fcfd849c0c328735d1ff
---
M Graph.body.php
M styles/common.less
2 files changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph
refs/changes/79/210079/1
diff --git a/Graph.body.php b/Graph.body.php
index 18531d3..034e782 100644
--- a/Graph.body.php
+++ b/Graph.body.php
@@ -111,7 +111,10 @@
// TODO: Use "width" and "height" from the definition
if available
// In some cases image might still be larger - need to
investigate
- $imgTag = Html::rawElement( 'img', array( 'src' => $url
) );
+ $imgTag = Html::rawElement( 'img', array(
+ 'class' => 'mw-wiki-graph-img',
+ 'src' => $url,
+ ) );
} else {
$imgTag = false;
}
diff --git a/styles/common.less b/styles/common.less
index 5f32fa3..7f96437 100644
--- a/styles/common.less
+++ b/styles/common.less
@@ -1,3 +1,3 @@
-.mw-wiki-graph {
+.mw-wiki-graph, .mw-wiki-graph-img {
display: inline-block
}
--
To view, visit https://gerrit.wikimedia.org/r/210079
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I238c6de35af278a99701fcfd849c0c328735d1ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits