Skip to content

Commit

Permalink
Finalizing commit. Improved css layout for mobile. Fixed non-stardart…
Browse files Browse the repository at this point in the history
…, small width layouts
  • Loading branch information
louiscyphre committed Oct 14, 2017
1 parent 96f0ea5 commit 05e3ccb
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 35 deletions.
2 changes: 1 addition & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<pre class="Shadowmaker" tabindex="-1"></pre>
<form class="Modal" method="post" action="http://localhost:9000/login" accept-charset="utf-8" tabindex="-1">
<div tabindex="-1" class="Modal-inputs">
<h2 tabindex="-1">Who are you?</h2>
<h1 tabindex="-1">Who are you?</h1>
<p tabindex="-1" class="Modal-input">
<label for="name">Full name:</label>
<input type="text" id="name" placeholder="Type your name" autocomplete="name" autofocus aria-label="Type your name here" tabindex="0" />
Expand Down
30 changes: 14 additions & 16 deletions client/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@
padding: 0; } }

@media (min-width: 161px) {
.Modal {
padding: 2rem; }
.Modal--anonymous {
padding: 0.4rem 0.7rem 0.4rem 0.7rem; }
padding: 0.3rem 0.7rem 0.3rem 0.7rem; }
.Modal--login {
padding: 0.4rem 2.3rem 0.4rem 2.3rem; } }
padding: 0.3rem 2.3rem 0.3rem 2.3rem; } }

@media (min-width: 161px) and (max-width: 320px) {
.Modal {
padding: 2rem; } }

@media (min-width: 0px) and (max-width: 320px) {
html {
Expand Down Expand Up @@ -128,7 +130,9 @@
.Modal p label,
input {
display: table-row;
width: 50%; } }
width: 50%; }
.Modal {
padding: 4rem; } }

@media (min-width: 639px) {
html {
Expand All @@ -137,7 +141,8 @@
width: 15%; }
.Modal {
width: 30%;
display: table; }
display: table;
padding: 3rem; }
.Modal-input {
display: inline-flex; }
.Modal div button {
Expand Down Expand Up @@ -196,8 +201,7 @@
-webkit-border: 2px solid #DBDBDB; }

html > *,
h1,
h2 {
h1 {
font-family: 'Nunito', sans-serif;
font-weight: 400; }

Expand All @@ -209,18 +213,12 @@ html {
height: 100%;
display: flex; }

h1,
h2 {
h1 {
font-size: 1.875rem;
margin-top: 0;
word-break: break-all;
word-wrap: break-word; }

h1 {
font-size: 1.875rem; }

h2 {
font-size: 1.75rem; }

.MainHeader {
background-color: #353744;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion client/styles/main.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 3 additions & 12 deletions client/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
@import 'utils.scss';
@import 'functions.scss';
html > *,
h1,
h2 {
h1 {
font-family: 'Nunito', sans-serif;
font-weight: 400;
}
Expand All @@ -19,21 +18,13 @@ html {
display: flex;
}

h1,
h2 {
h1 {
font-size: 1.875rem;
margin-top: 0;
word-break: break-all;
word-wrap: break-word;
}

h1 {
font-size: 1.875rem;
}

h2 {
font-size: 1.75rem;
}

.MainHeader {
background-color: $c-header;
display: flex;
Expand Down
19 changes: 14 additions & 5 deletions client/styles/screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@

@media (min-width:161px) {

.Modal {
padding: 2rem;
}
.Modal--anonymous {
padding: 0.4rem 0.7rem 0.4rem 0.7rem;
padding: 0.3rem 0.7rem 0.3rem 0.7rem;
}
.Modal--login {
padding: 0.4rem 2.3rem 0.4rem 2.3rem;
padding: 0.3rem 2.3rem 0.3rem 2.3rem;
}
}

@media (min-width:161px) and (max-width:320px) {

.Modal {
padding: 2rem;
}
}

Expand Down Expand Up @@ -88,6 +92,7 @@
.Modal div p input {
overflow-y: auto;
}

.Modal div p input {
padding: 0 0 0 0.4rem;
}
Expand Down Expand Up @@ -151,6 +156,9 @@
display: table-row;
width: 50%;
}
.Modal {
padding: 4rem;
}
}

@media (min-width:639px) {
Expand All @@ -163,6 +171,7 @@
.Modal {
width: 30%;
display: table;
padding: 3rem;
}
.Modal-input {
display: inline-flex;
Expand Down

0 comments on commit 05e3ccb

Please sign in to comment.