Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Roughly invert media queries
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Jan 6, 2015
1 parent 93d5a0d commit b8dceff
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 87 deletions.
3 changes: 1 addition & 2 deletions scss/gratipay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
This is the top of the Gratipay CSS tree.
*/

@import "reset";

@import "mixins/layout";
@import "mixins/icons";
@import "mixins/borders-backgrounds-shadows";
Expand All @@ -14,6 +12,7 @@
// =============
// http://bradfrost.com/blog/post/atomic-web-design/

@import "atoms/reset";
@import "atoms/variables";
@import "atoms/buttons-knobs";
@import "atoms/elements";
Expand Down
58 changes: 30 additions & 28 deletions scss/molecules/leaderboard.scss
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
#leaderboard {
@include clearfix;
width: leaderboard-width(3);
}
.people {
width: $people-column-width * 3;
margin-left: $people-column-gutter;
float: left;

.people {
width: $people-column-width * 3;
margin-left: $people-column-gutter;
float: left;
li:nth-child(4n) {
display: none;
}
&:first-child {
margin: 0;
}

&:first-child {
margin: 0;
}
ul {
// hide whitespace between items
font-size: 0;
line-height: 0;
li {
display: inline-block;
margin: 0;
padding: 2px;
vertical-align: top;
width: $people-column-width;
}
}

ul {
// hide whitespace between items
font-size: 0;
line-height: 0;
li {
display: inline-block;
margin: 0;
padding: 2px;
vertical-align: top;
width: $people-column-width;
h2 {
font-size: 13px;
}
}

h2 {
font-size: 13px;
.more-container {
@include clearfix;
text-align: center;
padding-top: 20px;
width: $people-column-width * 3 * 3;
margin-left: $people-column-gutter;
}
}
.more-container {
@include clearfix;
text-align: center;
padding-top: 20px;
width: $people-column-width * 3 * 3;
margin-left: $people-column-gutter;
}
24 changes: 24 additions & 0 deletions scss/pages/homepage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,28 @@
line-height: 40px;
margin-top: -40px;
}

// smushed in from old responsiveness.scss
#sidebar, #content {
padding: 32px 32px 60px;
h1 {
font-size: 24px;
line-height: 36px;
}
p, .jump {
font-size: 16px;
line-height: 24px;
}
}
#sidebar {
text-align: center;
img { width: 256px; position: static; }
h1 { margin-top: 32px; }
h1, p { text-align: left; }
}
#content {
div.twitter {
text-align: center;
}
}
}
2 changes: 2 additions & 0 deletions scss/templates/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ body {
background-size: 100% auto;
background-position: 0 -54px;
line-height: 100%;
font-size: 14px;
}

#header {
Expand Down Expand Up @@ -263,3 +264,4 @@ body {
}
}
}

70 changes: 13 additions & 57 deletions scss/templates/responsiveness.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
// Large screens
@media (min-width: 940px) {
.two-column > * {
float: left;
width: 50%;
padding: 0 20px 0 0;
&:nth-child(even) {
padding-right: 0;
}
}
}

// Small screens/tablets
@media (max-width: 1150px) {
// 2 column sections
#leaderboard {
width: leaderboard-width(2);
Expand All @@ -23,9 +10,17 @@
.more-container {
width: $people-column-width * 2 * 3;
}
.two-column > * {
float: left;
width: 50%;
padding: 0 20px 0 0;
&:nth-child(even) {
padding-right: 0;
}
}
}

@media (max-width: 940px) {
@media (min-width: 880px) {
.support-gratipay {
line-height: 125%;
}
Expand All @@ -50,8 +45,7 @@
}
}

// Smaller tablets in portrait/landscape phones
@media (max-width: 880px) {
@media (min-width: 700px) {
#leaderboard {
width: 100%;

Expand Down Expand Up @@ -80,7 +74,7 @@
}
}

@media (max-width: 700px) {
@media (min-width: 480px) {
.luxury {
display: none !important;
}
Expand Down Expand Up @@ -161,47 +155,9 @@
}
}
}
}

// Portrait phones
@media (max-width: 479px) {
body {
font-size: 14px;
}

#homepage {
#sidebar, #content {
padding: 32px 32px 60px;
h1 {
font-size: 24px;
line-height: 36px;
}
p, .jump {
font-size: 16px;
line-height: 24px;
}
}
#sidebar {
text-align: center;
img { width: 256px; position: static; }
h1 { margin-top: 32px; }
h1, p { text-align: left; }
}
#content {
div.twitter {
text-align: center;
}
}
}


#leaderboard {
.people {
width: $people-column-width * 3;

li:nth-child(4n) {
display: none;
}
li:nth-child(4n) {
display: block;
}
}
}

0 comments on commit b8dceff

Please sign in to comment.