jenkins-bot has submitted this change and it was merged.

Change subject: mw.UploadWizardLicenseInput: Tweak custom textarea styling
......................................................................


mw.UploadWizardLicenseInput: Tweak custom textarea styling

* Move inline styles to stylesheet. This fixes an issue with
  unreliable autosizing of the textarea (the hidden field had
  different styles, so its dimensions did not always match).
* Use 'monospace, monospace' hack to prevent some browsers
  from choosing a different font size for monospace text.
* Use simpler clearfix method and simpler structure.

Change-Id: Icdede051ba5beac898110028f1adcc264c4bfe6b
---
M resources/mw.UploadWizardLicenseInput.js
M resources/uploadWizard.css
2 files changed, 23 insertions(+), 7 deletions(-)

Approvals:
  Matthias Mullie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mw.UploadWizardLicenseInput.js 
b/resources/mw.UploadWizardLicenseInput.js
index de7942d..59f092d 100644
--- a/resources/mw.UploadWizardLicenseInput.js
+++ b/resources/mw.UploadWizardLicenseInput.js
@@ -327,9 +327,6 @@
                                                function () { input.emit( 
'change' ); },
                                                2000
                                        );
-                               } )
-                               .css( {
-                                       'font-family': 'monospace'
                                } );
 
                        button = new OO.ui.ButtonWidget( {
@@ -339,10 +336,9 @@
                                input.showPreview( textarea.getValue() );
                        } );
 
-                       return $( '<div></div>' ).css( { width: '100%' } 
).append(
-                               $( '<div></div>' ).css( { float: 'right', 
width: '9em', 'padding-left': '1em' } ).append( button.$element ),
-                               $( '<div></div>' ).css( { 'margin-right': 
'10em' } ).append( textarea.$element ),
-                               $( '<div></div>' ).css( { clear: 'both' } )
+                       return $( '<div>' ).addClass( 
'mwe-upwiz-license-custom' ).append(
+                               button.$element,
+                               textarea.$element
                        );
                },
 
diff --git a/resources/uploadWizard.css b/resources/uploadWizard.css
index ecb8f48..8c80111 100644
--- a/resources/uploadWizard.css
+++ b/resources/uploadWizard.css
@@ -467,6 +467,26 @@
        padding-left: 1.5em;
 }
 
+.mwe-upwiz-license-custom {
+       overflow: hidden;
+}
+
+.mwe-upwiz-license-custom .oo-ui-buttonElement {
+       float: right;
+       width: 9em;
+       padding-left: 1em;
+       margin-right: 0;
+}
+
+.mwe-upwiz-license-custom .oo-ui-textInputWidget {
+       width: auto;
+       margin-right: 10em;
+}
+
+.mwe-upwiz-license-custom .oo-ui-textInputWidget textarea {
+       font-family: monospace, monospace;
+}
+
 .mwe-upwiz-thanks {
        margin-bottom: 2em;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icdede051ba5beac898110028f1adcc264c4bfe6b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to