-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add constant spacing #432
Add constant spacing #432
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,22 +3,23 @@ import PropTypes from 'prop-types'; | |
import cx from 'classnames'; | ||
import Styled from 'rsg-components/Styled'; | ||
|
||
export const styles = ({ base, link, linkHover }) => ({ | ||
export const styles = ({ base, link, linkHover, spacing }) => ({ | ||
heading: { | ||
color: base, | ||
position: 'relative', | ||
overflow: 'visible', | ||
marginLeft: -30, | ||
paddingLeft: 30, | ||
marginLeft: -32, | ||
paddingLeft: spacing.space32, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think they both should you the same variable. |
||
'&:hover > $anchor': { | ||
isolate: false, | ||
visibility: 'visible', | ||
}, | ||
}, | ||
anchor: { | ||
position: 'absolute', | ||
bottom: '.125em', | ||
left: 10, | ||
top: '50%', | ||
transform: 'translateY(-50%)', | ||
left: spacing.space8, | ||
display: 'block', | ||
color: link, | ||
fontSize: '0.65em', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,19 +9,19 @@ | |
.tableBody { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don’t use this file, could you please remove it? Merge artifact ;-/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure! |
||
} | ||
.cell { | ||
padding-right: 15px; | ||
padding-top: 6px; | ||
padding-right: 16px; | ||
padding-top: 8px; | ||
vertical-align: top; | ||
font-size: 13px; | ||
} | ||
.cellHeading { | ||
padding-right: 15px; | ||
padding-bottom: 6px; | ||
padding-right: 16px; | ||
padding-bottom: 8px; | ||
text-align: left; | ||
font-size: 13px; | ||
} | ||
.cellDesc { | ||
padding-left: 15px; | ||
padding-left: 16px; | ||
} | ||
|
||
.methodParam { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import Styled from 'rsg-components/Styled'; | |
import Group from 'react-group'; | ||
import cx from 'classnames'; | ||
|
||
const styles = ({ base, font, border, light, name, type }) => ({ | ||
const styles = ({ base, font, border, light, name, type, spacing }) => ({ | ||
table: { | ||
width: '100%', | ||
borderCollapse: 'collapse', | ||
|
@@ -20,24 +20,24 @@ const styles = ({ base, font, border, light, name, type }) => ({ | |
}, | ||
cell: { | ||
color: base, | ||
paddingRight: 15, | ||
paddingTop: 6, | ||
paddingRight: spacing.space16, | ||
paddingTop: spacing.space8, | ||
verticalAlign: 'top', | ||
fontFamily: font, | ||
fontSize: 13, | ||
}, | ||
cellHeading: { | ||
color: base, | ||
paddingRight: 15, | ||
paddingBottom: 6, | ||
paddingRight: spacing.space16, | ||
paddingTop: spacing.space8, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like a typo, it should be bottom padding. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry , typo |
||
textAlign: 'left', | ||
fontFamily: font, | ||
fontWeight: 'bold', | ||
fontSize: 13, | ||
}, | ||
cellDesc: { | ||
width: '70%', | ||
paddingLeft: 15, | ||
paddingLeft: spacing.space16, | ||
}, | ||
required: { | ||
fontFamily: font, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ import React from 'react'; | |
import PropTypes from 'prop-types'; | ||
import Styled from 'rsg-components/Styled'; | ||
|
||
const styles = ({ monospace, white, errorBackground }) => ({ | ||
const styles = ({ monospace, white, errorBackground, spacing }) => ({ | ||
root: { | ||
margin: [[-15, -15, -18]], | ||
margin: [[-16, -16, -16]], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. space16? But actually this numbers are not random — the red background should fill the playground container. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will change them back and add that as a comment |
||
fontFamily: monospace, | ||
color: white, | ||
backgroundColor: errorBackground, | ||
padding: 15, | ||
padding: spacing.space16, | ||
lineHeight: 1.2, | ||
fontSize: 13, | ||
whiteSpace: 'pre', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn’t use spacers for font sizes. But would be nice to have variables for that too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo again, but I can add some :)