Skip to content

Commit 3a9779d

Browse files
committed
Flexbox errythang
1 parent bdced5e commit 3a9779d

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ The slide tag represents each slide in the presentation. It supports the followi
166166
167167
|Name|PropType|Description|
168168
|---|---|---|
169-
|align| React.PropTypes.string | Accepts a space delimited value for positioning interior content. The first value can be `left`, `center`, or `right`. The second value can be `top`, `middle`, or `bottom`. You would provide this prop like `align="center middle"`, which is it's default.
169+
|align| React.PropTypes.string | Accepts a space delimited value for positioning interior content. The first value can be `flex-start` (left), `center` (middle), or `flex-end` (bottom). The second value can be `flex-start` (top) , `center` (middle), or `flex-end` (bottom). You would provide this prop like `align="center middle"`, which is it's default.
170170
|transition|React.PropTypes.array|Accepts `slide`, `zoom`, `fade` or `spin`, and can be combined. Sets the slide transition.|
171171
|transitionDuration| React.PropTypes.number| Accepts integer value in milliseconds for slide transition duration.
172172

src/slide.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,17 @@ const Slide = React.createClass({
5252
left: 0,
5353
width: '100%',
5454
height: '100%',
55-
display: 'table',
56-
tableLayout: 'fixed'
55+
display: 'flex'
5756
},
5857
inner: {
59-
display: 'table-cell',
60-
textAlign: this.props.align ? this.props.align.split(' ')[0] : 'center',
61-
verticalAlign: this.props.align ? this.props.align.split(' ')[1] : 'middle',
58+
display: 'flex',
59+
flex: 1,
60+
alignItems: this.props.align ? this.props.align.split(' ')[1] : 'center',
61+
justifyContent: this.props.align ? this.props.align.split(' ')[0] : 'center',
6262
padding: this.state.zoom > 0.6 ? config.margin : 10
6363
},
6464
content: {
65+
flex: 1,
6566
maxWidth: config.width,
6667
fontSize: 16 * this.state.zoom
6768
}

themes/default/index.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ module.exports = {
2121
fontSize: '2em',
2222
color: colors.secondary,
2323
overflow: 'hidden'
24-
}
24+
},
25+
'*': {
26+
boxSizing: 'border-box'
27+
},
2528
},
2629
components: {
2730
blockquote: {
@@ -46,15 +49,17 @@ module.exports = {
4649
marginTop: '1em'
4750
},
4851
content: {
49-
margin: 'auto'
52+
margin: 'auto',
53+
textAlign: 'center'
5054
},
5155
codePane: {
5256
pre: {
53-
maxWidth: 800,
5457
margin: 'auto',
55-
fontSize: '1.5em',
58+
fontSize: '1em',
5659
fontWeight: 'normal',
57-
fontFamily: fonts.tertiary
60+
fontFamily: fonts.tertiary,
61+
minWidth: '100%',
62+
maxWidth: 800,
5863
},
5964
code: {
6065
textAlign: 'left',

0 commit comments

Comments
 (0)