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

Remove paymentStyles.margin.bar, margin.barItem, padding.bar #8710

Merged
merged 1 commit into from
May 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const styles = StyleSheet.create({
},

walletBarMargin: {
marginTop: paymentStyles.margin.bar
marginTop: globalStyles.spacing.panelMargin
},

h3: {
Expand Down
12 changes: 7 additions & 5 deletions app/renderer/components/preferences/payment/enabledContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const LedgerTable = require('./ledgerTable')

// style
const globalStyles = require('../../styles/global')
const {paymentStyles} = require('../../styles/payment')
const {paymentStyles, paymentStylesVariables} = require('../../styles/payment')
const cx = require('../../../../../js/lib/classSet')

// other
Expand Down Expand Up @@ -171,9 +171,9 @@ class EnabledContent extends ImmutableComponent {
<table>
<thead>
<tr className={css(styles.tableTr)}>
<th className={css(styles.tableTh)} data-l10n-id='monthlyBudget' />
<th className={css(styles.tableTh)} data-l10n-id='accountBalance' />
<th className={css(styles.tableTh)} />
<th className={css(styles.walletBar__tableTr__tableTh)} data-l10n-id='monthlyBudget' />
<th className={css(styles.walletBar__tableTr__tableTh)} data-l10n-id='accountBalance' />
<th className={css(styles.walletBar__tableTr__tableTh)} />
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -248,7 +248,9 @@ const styles = StyleSheet.create({
marginBottom: 0
},

tableTh: {
walletBar__tableTr__tableTh: {
color: paymentStylesVariables.tableHeader.fontColor,
fontWeight: paymentStylesVariables.tableHeader.fontWeight,
textAlign: 'left'
},

Expand Down
4 changes: 2 additions & 2 deletions app/renderer/components/preferences/payment/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ const styles = StyleSheet.create({
userSelect: 'none'
},
header: {
color: globalStyles.color.darkGray,
fontWeight: '500',
color: paymentStylesVariables.tableHeader.fontColor,
fontWeight: paymentStylesVariables.tableHeader.fontWeight,
textAlign: 'left',

// cancel border-bottom of headerContainer
Expand Down
10 changes: 7 additions & 3 deletions app/renderer/components/preferences/payment/ledgerTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const PinnedInput = require('./pinnedInput')

// style
const globalStyles = require('../../styles/global')
const {paymentStylesVariables} = require('../../styles/payment')
const verifiedGreenIcon = require('../../../../extensions/brave/img/ledger/verified_green_icon.svg')
const verifiedWhiteIcon = require('../../../../extensions/brave/img/ledger/verified_white_icon.svg')
const removeIcon = require('../../../../extensions/brave/img/ledger/icon_remove.svg')
Expand Down Expand Up @@ -336,12 +337,15 @@ const styles = StyleSheet.create({

tableClass: {
width: '100%',
textAlign: 'left',
borderCollapse: 'collapse'
borderCollapse: 'collapse',
border: 'none',
margin: '0 auto'
},

tableTh: {
fontSize: '14px'
color: paymentStylesVariables.tableHeader.fontColor,
fontSize: '14px',
fontWeight: paymentStylesVariables.tableHeader.fontWeight
},

tableTr: {
Expand Down
16 changes: 7 additions & 9 deletions app/renderer/components/styles/payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,26 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

const globalStyles = require('./global')

const paymentStyles = {
font: {
regular: '14.5px'
},
width: {
tableRow: '235px',
tableCell: '265px' // width.tableRow + 30px
},

// Copied to global.js
margin: {
bar: '15px',
barItem: '12px'
},
padding: {
bar: '18px' // margin.barItem * 1.5
}
}

const paymentStylesVariables = {
spacing: {
paymentHistoryTablePadding: '30px'
},

tableHeader: {
fontColor: globalStyles.color.darkGray,
fontWeight: '600'
}
}

Expand Down
34 changes: 8 additions & 26 deletions less/about/preferences.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ body {
display: flex;
height: 100%;
margin-left: @sideBarWidth;

a {
text-decoration: none;

&:hover {
text-decoration: underline;
}
}
}

a {
Expand Down Expand Up @@ -260,32 +268,6 @@ table.sortableTable {
}
}

// about:preferences#payments
.paymentsContainer {
// General properties on about:preferences#payments.
// Make sure any change here could cause unexpected regressions.
a {
text-decoration: none;

&:hover {
text-decoration: underline;
}
}

th {
color: @darkGray;
font-weight: 600;
}

& > table,
& > table tbody {
border: none;
padding: 50px;
margin: 0 auto;
width: 80%;
}
}

#searchSelectIcon {
width: 16px;
height: 16px;
Expand Down