Skip to content

Commit

Permalink
WIP - Iteration 1: ensure smartphone view is portrait locked, single …
Browse files Browse the repository at this point in the history
…column #10
  • Loading branch information
robi-bobi committed Jan 21, 2017
1 parent 622c192 commit f598faf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ An experimental Origami component to implement a responsive crossword.
* $ `obt build`
* deploy locally as described in the [Origami build tools doc](https://github.com/Financial-Times/origami-build-tools#developing-modules-locally)
* $ `obt demo --runServer --watch`
* $ see a demo of it running at http://localhost:8080/demos/local/basic.html
* see a demo of it running at http://localhost:8080/demos/local/basic.html
* [Bower linking a component](https://oncletom.io/2013/live-development-bower-component/)
* general Origami [Developer Guide](http://origami.ft.com/docs/developer-guide/)

Expand Down
1 change: 1 addition & 0 deletions main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $o-crossword-is-silent: true !default;
@import "src/scss/color-use-cases";
@import "src/scss/mixins";
@import "src/scss/base";
@import "src/scss/orientation";

@if ($o-crossword-is-silent == false) {
@include oCrosswordAll;
Expand Down
12 changes: 12 additions & 0 deletions src/scss/_orientation.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//below forces portrait mode on mobile phones
//it uses "min-aspect-ratio" to detect landscape,
//since keyboard popping will make "orientation" wrong in some cases
@media screen and (min-aspect-ratio: 13/9) and (max-width: 767px) {
#main-container {
background-color: #4f1828;
transform: rotate(-90deg);
width: 100% /* screen width */ ;
height: 100% /* screen height */ ;
overflow: scroll;
}
}

0 comments on commit f598faf

Please sign in to comment.