Skip to content

Commit

Permalink
Flexbox. Yay flexbox!
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmorris committed Mar 7, 2017
1 parent 3485649 commit 3199d60
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
16 changes: 1 addition & 15 deletions src/LyricsPane.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@
text-align: center;
}

@media (max-width: 800px) {
div.words {
column-count: 1;
}
.lyricsPane {
width: 300px;
}
}

@media (min-width: 800px) {
div.words {
column-count: 2;
}
}

textarea {
width: 90%;
}
Expand All @@ -28,4 +13,5 @@ textarea {
border-style: solid;
border-color: rgb(240, 240, 255);
min-height: 25vh;
column-width: 15em;
}
2 changes: 2 additions & 0 deletions src/LyricsPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import './LyricsPane.css';
import Word from './Word.js';
import { NOINDEX } from './constants.js';

/** Shows the entire current verse in a big multi-column block. Not responsible
* for the editing view. */
class LyricsPane extends Component {

renderWord = (word) => {
Expand Down
7 changes: 7 additions & 0 deletions src/Songsim.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
.mainContainer {
display: flex;
flex-direction: row;
justify-content: space-evenly;
margin: 10px;
}

.matrixPane {
flex: none;
}

.mainContainerMobile {

}
Expand All @@ -15,4 +21,5 @@
}

.lyricsPane {
flex: 1 1 auto;
}
4 changes: 3 additions & 1 deletion src/Songsim.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ class Songsim extends Component {
return (
<div>
<div className="container-fluid mainContainer">
{matrix}
<div className="matrixPane">
{matrix}
</div>
<div className="lyricsPane">
<SongSelector
selected={this.state.verse && this.state.verse.id}
Expand Down

0 comments on commit 3199d60

Please sign in to comment.