From: Bartosz DziewoƄski Date: Sun, 16 Aug 2015 14:37:31 +0000 (+0200) Subject: Move HTMLForm-specific styles out of mediawiki.legacy.shared X-Git-Tag: 1.31.0-rc.0~10108^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=d302cb2de8744325c2cebda60069cc44c15d7e5f;p=lhc%2Fweb%2Fwiklou.git Move HTMLForm-specific styles out of mediawiki.legacy.shared Bug: T89981 Change-Id: Idcd20b4a776fe6741462b09885e05d1e08f67334 --- diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index da58f20d24..ad650d4528 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -868,6 +868,7 @@ class HTMLForm extends ContextSource { # For good measure (it is the default) $this->getOutput()->preventClickjacking(); $this->getOutput()->addModules( 'mediawiki.htmlform' ); + $this->getOutput()->addModuleStyles( 'mediawiki.htmlform.styles' ); $html = '' . $this->getErrors( $submitResult ) diff --git a/resources/Resources.php b/resources/Resources.php index d575c8d6db..ddf69edcd6 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1011,6 +1011,10 @@ return array( 'colon-separator', ), ), + 'mediawiki.htmlform.styles' => array( + 'styles' => 'resources/src/mediawiki/mediawiki.htmlform.css', + 'position' => 'top', + ), 'mediawiki.htmlform.ooui.styles' => array( 'styles' => 'resources/src/mediawiki/mediawiki.htmlform.ooui.css', 'position' => 'top', diff --git a/resources/src/mediawiki.legacy/images/question.png b/resources/src/mediawiki.legacy/images/question.png deleted file mode 100644 index f7405d2626..0000000000 Binary files a/resources/src/mediawiki.legacy/images/question.png and /dev/null differ diff --git a/resources/src/mediawiki.legacy/images/question.svg b/resources/src/mediawiki.legacy/images/question.svg deleted file mode 100644 index 98fbe8dd75..0000000000 --- a/resources/src/mediawiki.legacy/images/question.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/resources/src/mediawiki.legacy/shared.css b/resources/src/mediawiki.legacy/shared.css index 7e171cffa3..4fb6ac7160 100644 --- a/resources/src/mediawiki.legacy/shared.css +++ b/resources/src/mediawiki.legacy/shared.css @@ -265,56 +265,10 @@ td.mw-label { width: auto; } -.mw-icon-question { - /* SVG support using a transparent gradient to guarantee cross-browser - * compatibility (browsers able to understand gradient syntax support also SVG). - * http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique */ - background-image: url(images/question.png); - background-image: -webkit-linear-gradient(transparent, transparent), url(images/question.svg); - background-image: linear-gradient(transparent, transparent), url(images/question.svg); - background-repeat: no-repeat; - background-size: 13px 13px; - display: inline-block; - height: 13px; - width: 13px; - margin-left: 4px; -} - -.mw-icon-question:lang(ar), -.mw-icon-question:lang(fa), -.mw-icon-question:lang(ur) { - -webkit-transform: scaleX(-1); - -ms-transform: scaleX(-1); - transform: scaleX(-1); -} - td.mw-submit { white-space: nowrap; } -table.mw-htmlform-nolabel td.mw-label { - width: 1px; -} - -tr.mw-htmlform-vertical-label td.mw-label { - text-align: left !important; -} - -.mw-htmlform-invalid-input td.mw-input input { - border-color: red; -} - -.mw-htmlform-flatlist div.mw-htmlform-flatlist-item { - display: inline; - margin-right: 1em; - white-space: nowrap; -} - -.mw-htmlform-matrix td { - padding-left: 0.5em; - padding-right: 0.5em; -} - input#wpSummary { width: 80%; margin-bottom: 1em; diff --git a/resources/src/mediawiki/images/question.png b/resources/src/mediawiki/images/question.png new file mode 100644 index 0000000000..f7405d2626 Binary files /dev/null and b/resources/src/mediawiki/images/question.png differ diff --git a/resources/src/mediawiki/images/question.svg b/resources/src/mediawiki/images/question.svg new file mode 100644 index 0000000000..98fbe8dd75 --- /dev/null +++ b/resources/src/mediawiki/images/question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/src/mediawiki/mediawiki.htmlform.css b/resources/src/mediawiki/mediawiki.htmlform.css new file mode 100644 index 0000000000..e41248c1be --- /dev/null +++ b/resources/src/mediawiki/mediawiki.htmlform.css @@ -0,0 +1,51 @@ +/* HTMLForm styles */ + +table.mw-htmlform-nolabel td.mw-label { + width: 1px; +} + +.mw-htmlform-invalid-input td.mw-input input { + border-color: red; +} + +.mw-htmlform-flatlist div.mw-htmlform-flatlist-item { + display: inline; + margin-right: 1em; + white-space: nowrap; +} + +/* HTMLCheckMatrix */ + +.mw-htmlform-matrix td { + padding-left: 0.5em; + padding-right: 0.5em; +} + +tr.mw-htmlform-vertical-label td.mw-label { + text-align: left !important; +} + +.mw-icon-question { + /* SVG support using a transparent gradient to guarantee cross-browser + * compatibility (browsers able to understand gradient syntax support also SVG). + * http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique */ + background-image: url(images/question.png); + /* @embed */ + background-image: -webkit-linear-gradient(transparent, transparent), url(images/question.svg); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(images/question.svg); + background-repeat: no-repeat; + background-size: 13px 13px; + display: inline-block; + height: 13px; + width: 13px; + margin-left: 4px; +} + +.mw-icon-question:lang(ar), +.mw-icon-question:lang(fa), +.mw-icon-question:lang(ur) { + -webkit-transform: scaleX(-1); + -ms-transform: scaleX(-1); + transform: scaleX(-1); +}