[MediaWiki-commits] [Gerrit] Move HTMLForm-specific styles out of mediawiki.legacy.shared - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Move HTMLForm-specific styles out of mediawiki.legacy.shared .. Move HTMLForm-specific styles out of mediawiki.legacy.shared Bug: T89981 Change-Id: Idcd20b4a776fe6741462b09885e05d1e08f67334 --- M includes/htmlform/HTMLForm.php M resources/Resources.php M resources/src/mediawiki.legacy/shared.css R resources/src/mediawiki/images/question.png R resources/src/mediawiki/images/question.svg A resources/src/mediawiki/mediawiki.htmlform.css 6 files changed, 56 insertions(+), 46 deletions(-) Approvals: Jforrester: Looks good to me, approved Umherirrender: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index da58f20..ad650d4 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -868,6 +868,7 @@ # 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 d575c8d..ddf69ed 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1011,6 +1011,10 @@ '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/shared.css b/resources/src/mediawiki.legacy/shared.css index 7e171cf..4fb6ac7 100644 --- a/resources/src/mediawiki.legacy/shared.css +++ b/resources/src/mediawiki.legacy/shared.css @@ -265,54 +265,8 @@ 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 { diff --git a/resources/src/mediawiki.legacy/images/question.png b/resources/src/mediawiki/images/question.png similarity index 100% rename from resources/src/mediawiki.legacy/images/question.png rename to resources/src/mediawiki/images/question.png Binary files differ diff --git a/resources/src/mediawiki.legacy/images/question.svg b/resources/src/mediawiki/images/question.svg similarity index 100% rename from resources/src/mediawiki.legacy/images/question.svg rename to resources/src/mediawiki/images/question.svg diff --git a/resources/src/mediawiki/mediawiki.htmlform.css b/resources/src/mediawiki/mediawiki.htmlform.css new file mode 100644 index 000..e41248c --- /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
[MediaWiki-commits] [Gerrit] Move HTMLForm-specific styles out of mediawiki.legacy.shared - change (mediawiki/core)
Bartosz DziewoĆski has uploaded a new change for review. https://gerrit.wikimedia.org/r/231885 Change subject: Move HTMLForm-specific styles out of mediawiki.legacy.shared .. Move HTMLForm-specific styles out of mediawiki.legacy.shared Bug: T89981 Change-Id: Idcd20b4a776fe6741462b09885e05d1e08f67334 --- M includes/htmlform/HTMLForm.php M resources/Resources.php M resources/src/mediawiki.legacy/shared.css R resources/src/mediawiki/images/question.png R resources/src/mediawiki/images/question.svg A resources/src/mediawiki/mediawiki.htmlform.css 6 files changed, 56 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/85/231885/1 diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index da58f20..ad650d4 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -868,6 +868,7 @@ # 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 ec1523e..4965dd2 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1009,6 +1009,10 @@ '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/shared.css b/resources/src/mediawiki.legacy/shared.css index a761ea5..5aafdf1 100644 --- a/resources/src/mediawiki.legacy/shared.css +++ b/resources/src/mediawiki.legacy/shared.css @@ -253,54 +253,8 @@ vertical-align: middle; } -.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 { diff --git a/resources/src/mediawiki.legacy/images/question.png b/resources/src/mediawiki/images/question.png similarity index 100% rename from resources/src/mediawiki.legacy/images/question.png rename to resources/src/mediawiki/images/question.png Binary files differ diff --git a/resources/src/mediawiki.legacy/images/question.svg b/resources/src/mediawiki/images/question.svg similarity index 100% rename from resources/src/mediawiki.legacy/images/question.svg rename to resources/src/mediawiki/images/question.svg diff --git a/resources/src/mediawiki/mediawiki.htmlform.css b/resources/src/mediawiki/mediawiki.htmlform.css new file mode 100644 index 000..e41248c --- /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