Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Refactor buttons on about:preferences#payments
Browse files Browse the repository at this point in the history
Fixes #4786

- Moved paddings and width in "whiteButton" to "wideButton"
- Added "wideButton" to the advanced settings button on about:preferences#payments
- Added font-size to the button
- Added display:flex to footer of advanced settings
- Added white-space:nowrap to "buttonCommon" (buttons will not be wrapped by default)

Auditors: @jkup

Test Plan:

1. Open about:preferences#payments
2. Make sure the font size of the two buttons "Add funds" and "Advanced Settings..." is equal
3. Click "Advanced Settings..."
4. Make sure the buttons on the footer are aligned center
5. Make sure each button is not wrapped
  • Loading branch information
Suguru Hirahara committed Nov 17, 2016
1 parent de1d4e9 commit 85e428a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 27 deletions.
2 changes: 1 addition & 1 deletion js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ class PaymentsTab extends ImmutableComponent {
<span data-l10n-id='off' />
<SettingCheckbox dataL10nId='on' prefKey={settings.PAYMENTS_ENABLED} settings={this.props.settings} onChangeSetting={this.props.onChangeSetting} />
</div>
{ this.props.ledgerData.get('created') && this.enabled ? <Button l10nId='advancedSettings' className='advancedSettings whiteButton inlineButton' onClick={this.props.showOverlay.bind(this, 'advancedSettings')} /> : null }
{ this.props.ledgerData.get('created') && this.enabled ? <Button l10nId='advancedSettings' className='advancedSettings whiteButton inlineButton wideButton' onClick={this.props.showOverlay.bind(this, 'advancedSettings')} /> : null }
</div>
</div>
{
Expand Down
49 changes: 29 additions & 20 deletions less/about/preferences.less
Original file line number Diff line number Diff line change
Expand Up @@ -365,29 +365,35 @@ span.settingsListCopy {
}
}

span.browserButton.primaryButton {
&.addFunds {
span.browserButton {
&.advancedSettings {
font-size: 0.9em;
margin-right: 50px;
}

&.clearBrowsingDataButton,
&.importNowButton,
&.setAsDefaultButton,
&.manageAdblockSettings,
&.viewExtensionsInfo,
&.manageAutofillDataButton {
font-size: 0.9em;
margin-top: 20px;
padding: 5px 20px;
}
&.primaryButton {
&.addFunds {
font-size: 0.9em;
margin-right: 50px;
}

&.importNowButton {
margin-top: 5px;
}
&.clearBrowsingDataButton,
&.importNowButton,
&.setAsDefaultButton,
&.manageAdblockSettings,
&.viewExtensionsInfo,
&.manageAutofillDataButton {
font-size: 0.9em;
margin-top: 20px;
padding: 5px 20px;
}

&.importNowButton {
margin-top: 5px;
}

&.setAsDefaultButton {
margin-top: 5px;
&.setAsDefaultButton {
margin-top: 5px;
}
}
}

Expand Down Expand Up @@ -993,8 +999,11 @@ div.nextPaymentSubmission {
}

.advancedSettingsFooter {
padding: 20px 100px;
text-align: right;
padding-top: 20px;
padding-bottom: 20px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}

.recoveryOverlay {
Expand Down
11 changes: 5 additions & 6 deletions less/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
line-height: 22px;
margin: 5px 5px 0px 0px;
padding: 0px 20px;
white-space: nowrap;
}

span.buttonSeparator {
Expand All @@ -35,8 +36,6 @@ span.menuButton {
}
}

a.browserButton,
span.browserButton,
.browserButton {
cursor: default;
display: inline-block;
Expand Down Expand Up @@ -91,7 +90,8 @@ span.browserButton,
&.wideButton,
&.secondaryButton,
&.secondaryAltButton,
&.subtleButton {
&.subtleButton,
&.whiteButton {
.buttonCommon;
width: auto;
height: auto;
Expand Down Expand Up @@ -121,6 +121,8 @@ span.browserButton,
display: block;
margin-right: 0px;
margin-left: 0px;
width: auto;
padding: 3px 35px;
}

&.whiteButton {
Expand All @@ -131,10 +133,7 @@ span.browserButton,
display: block;
font-weight: normal;
font-style: normal;
font-size: 14px;
color: @darkGray;
width: auto;
padding: 3px 35px;
}

&.inlineButton {
Expand Down

0 comments on commit 85e428a

Please sign in to comment.