jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/324467 )

Change subject: Fix cancel button styling for dev-signup
......................................................................


Fix cancel button styling for dev-signup

Easiest way to fix it was to clean up the styles. I added general
padding for the login-widget, so that there is no need to play with
margins of the elements inside it to have the left edge consistent.

This also avoids the need to use the weird "eleven columns" trick
for additional padding. Some of the selectors are a bit complicated
as we are overriding the default margings given by the grid.

Change-Id: I9219bca06855646ffb999dc25c6b69c7c980565f
---
M resources/css/ext.translate.mainpage.css
M specials/SpecialTwnMainPage.php
2 files changed, 30 insertions(+), 42 deletions(-)

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



diff --git a/resources/css/ext.translate.mainpage.css 
b/resources/css/ext.translate.mainpage.css
index 6f0752a..59fdfef 100644
--- a/resources/css/ext.translate.mainpage.css
+++ b/resources/css/ext.translate.mainpage.css
@@ -151,21 +151,29 @@
        background-color: rgba(248, 248, 248, 0.85);
        color: #252525;
        max-height: 580px;
-       padding: 10px;
        margin-left: 4%;
        overflow: auto;
        margin-top: 10px;
        box-shadow: inset 0 0 4px #ffffff;
 }
 
-.main-widget label {
-       font-size: 16px;
+/* Signup styles start here. */
+.grid .row .login-widget {
+       padding: 0 40px 0 15px;
 }
 
-.main-widget .row input {
+.grid .row .login-widget > div {
+       margin-bottom: 10px;
+}
+
+.grid .row .login-widget > div:last-child {
+       margin-bottom: 0;
+}
+
+.grid .login-widget input,
+.grid .login.widget textarea {
        padding: 6px;
        font-size: 16px;
-       margin: 5px 0 5px 10px;
        outline: 0;
        border-style: solid;
        border-width: 1px;
@@ -173,35 +181,20 @@
        color: #252525;
 }
 
-.main-widget button {
-       margin: 10px;
-}
-
-.main-widget h1,
-.main-widget h2 {
+.login-widget h1,
+.login-widget h2 {
+       padding-top: 10px;
        border-bottom: none;
-       padding: 10px;
 }
 
-/* Signup styles start here. They are here to avoid FOUC. */
 .login-widget .dev-signup {
        border-top: 1px solid #DDDDDD;
-       cursor: pointer;
-       padding: 10px;
-}
-
-.login-widget .only-dev {
-       padding: 5px 10px 0 10px;
-}
-
-.login-widget .only-dev textarea {
-       padding: 5px;
+       padding: 10px 0;
 }
 
 .login-widget .signup-language-selector {
        font-size: 12pt;
        background-color: #f8f8f8;
-       margin: 5px 0 10px 5px;
        cursor: pointer;
        padding: 5px 12px;
 }
@@ -211,6 +204,8 @@
 }
 
 .login-widget .signup-languages {
+       list-style-type: none;
+       list-style-image: none;
        padding-top: 5px;
 }
 
@@ -230,10 +225,6 @@
        background-position: bottom left;
        background-size: 75px;
        min-height: 75px;
-}
-
-.subtitle {
-       padding: 0 10px;
 }
 
 .main-widget h2 {
@@ -571,7 +562,6 @@
 .twn-mainpage-banner .main-widget .twnmp-signup-error {
        background-color: #CF1C1F;
        padding: 6px;
-       margin: 0 -15px 0 5px;
        color: white;
        position: relative;
        top: -2px;
diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php
index ed875f2..9aa830a 100644
--- a/specials/SpecialTwnMainPage.php
+++ b/specials/SpecialTwnMainPage.php
@@ -548,14 +548,14 @@
                        [ 'data-code' => $languageCode ]
                );
                $username = Html::element( 'input', [
-                       'class' => 'eleven columns required',
+                       'class' => 'twelve columns required',
                        'name' => 'wpName',
                        'autocomplete' => 'off',
                        'required',
                        'placeholder' => $this->msg( 
'twnmp-signup-username-placeholder' )->text(),
                ] );
                $password = Html::element( 'input', [
-                       'class' => 'eleven columns required',
+                       'class' => 'twelve columns required',
                        'name' => 'wpPassword',
                        'autocomplete' => 'off',
                        'type' => 'password',
@@ -563,7 +563,7 @@
                        'placeholder' => $this->msg( 
'twnmp-signup-password-placeholder' )->text(),
                ] );
                $email = Html::element( 'input', [
-                       'class' => 'eleven columns required',
+                       'class' => 'twelve columns required',
                        'name' => 'wpEmail',
                        'autocomplete' => 'off',
                        'type' => 'email',
@@ -571,7 +571,7 @@
                        'placeholder' => $this->msg( 
'twnmp-signup-email-placeholder' )->text(),
                ] );
                $reasonInput = Html::element( 'textarea', [
-                       'class' => 'eleven columns required',
+                       'class' => 'twelve columns required',
                        'name' => 'reason',
                        'rows' => '4',
                        'required',
@@ -596,21 +596,19 @@
                </li>
        </ul>
        <div class="row only-nondev">
-               <div class="eight columns">
-                       <div class="signup-language-selector mw-ui-button">
-                               {$this->msg( 'twnmp-choose-another-language' 
)->escaped()}
-                       </div>
-               </div>
+               <button class="signup-language-selector mw-ui-button">
+                       {$this->msg( 'twnmp-choose-another-language' 
)->escaped()}
+               </button>
        </div>
        <h2 class="row">
                {$this->msg( 'twnmp-choose-fill-account-details' )->escaped()}
        </h2>
        <div class="row">$username</div>
-       <div class="twnmp-signup-error eleven columns hide"></div>
+       <div class="twnmp-signup-error hide"></div>
        <div class="row">$password</div>
-       <div class="twnmp-signup-error eleven columns hide"></div>
+       <div class="twnmp-signup-error hide"></div>
        <div class="row">$email</div>
-       <div class="twnmp-signup-error eleven columns hide"></div>
+       <div class="twnmp-signup-error hide"></div>
        <div class="row label only-dev hide">
                {$this->msg( 'twnmp-join-community-reason' )->escaped()}
        </div>
@@ -619,7 +617,7 @@
                <button class="mw-ui-button mw-ui-progressive mw-ui-big" 
type="submit" id="twnmp-create-account">
                        {$this->msg( 'twnmp-create-account-button' )->escaped()}
                </button>
-               <button class="mw-ui-button only-dev cancel hide">
+               <button class="mw-ui-button mw-ui-big mw-ui-quiet only-dev 
cancel hide">
                        {$this->msg( 'twnmp-create-account-cancel' )->escaped()}
                </button>
        </div>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9219bca06855646ffb999dc25c6b69c7c980565f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TwnMainPage
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: Amire80 <amir.ahar...@mail.huji.ac.il>
Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to