Skip to content

Commit

Permalink
progress responsive design
Browse files Browse the repository at this point in the history
  • Loading branch information
fbohz committed Jun 28, 2020
1 parent 52594ba commit 6578253
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 24 deletions.
31 changes: 21 additions & 10 deletions museo-demo/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ html {
@media only screen and (max-width: 56.25em) {
html {
font-size: 50%; } }
@media only screen and (max-width: 37.5em) {
html {
font-size: 30%; } }
@media only screen and (min-width: 112.5em) {
html {
font-size: 75%; } }
Expand Down Expand Up @@ -79,11 +76,9 @@ body {
body {
font-family: "Lato", sans-serif;
font-weight: 400;
font-size: 16px;
/*font-size: 16px;*/
line-height: 1.7;
color: #777;
padding: 3rem;
box-sizing: border-box; }
color: #777; }

.heading-primary {
color: #fff;
Expand All @@ -98,13 +93,24 @@ body {
letter-spacing: 3.5rem;
animation-name: moveInLeft;
animation-duration: 1s;
animation-timing-function: ease-out; }
animation-timing-function: ease-out;
/*
animation-delay: 3s;
animation-iteration-count: 3;
*/ }
@media only screen and (max-width: 37.5em) {
.heading-primary--main {
letter-spacing: 1rem;
font-family: 5rem; } }
.heading-primary--sub {
display: block;
font-size: 2rem;
font-weight: 700;
letter-spacing: 1.75rem;
animation: moveInRight 1s ease-out; }
@media only screen and (max-width: 37.5em) {
.heading-primary--sub {
letter-spacing: .5rem; } }

.heading-secondary {
font-size: 3.5rem;
Expand All @@ -113,12 +119,17 @@ body {
display: inline-block;
background-image: linear-gradient(to right, #7ed56f, #28b485);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
letter-spacing: .2rem;
transition: all .2s; }
@media only screen and (max-width: 56.25em) {
.heading-secondary {
font-size: 3rem; } }
@media only screen and (max-width: 37.5em) {
.heading-secondary {
font-size: 2.5rem; } }
.heading-secondary:hover {
transform: skewY(2deg) skewX(15deg) scale(0.8);
transform: skewY(2deg) skewX(15deg) scale(1.1);
text-shadow: 0.5rem 1rem 2rem rgba(0, 0, 0, 0.2); }

.heading-tertiary {
Expand Down
1 change: 0 additions & 1 deletion museo-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

<link href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900" rel="stylesheet">
<link rel="stylesheet" href="css/linea-icon-fonts.css">
<link rel="stylesheet" href="css/icon-font.css">
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" type="image/png" href="img/favicon.png">

Expand Down
8 changes: 5 additions & 3 deletions museo-demo/sass/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ html {
// This defines what 1rem is
font-size: 62.5%; //1 rem = 10px; 10px/16px = 62.5%

// remember: if conflicting styles the last query will apply.

@include respond(tab-land) { // width < 1200?
font-size: 56.25%; //1 rem = 9px, 9/16 = 50%
}

@include respond(tab-port) { // width < 900?
font-size: 50%; //1 rem = 8px, 8/16 = 50%
}
@include respond(phone) { // width < 900?
font-size: 30%; //1 rem = 8px, 8/16 = 50%
}
// @include respond(phone) { // width < 900?
// font-size: 30%; //1 rem = 8px, 8/16 = 50%
// }

@include respond(big-desktop) {
font-size: 75%; //1rem = 12, 12/16
Expand Down
38 changes: 28 additions & 10 deletions museo-demo/sass/base/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
body {
font-family: "Lato", sans-serif;
font-weight: 400;
font-size: 16px;
/*font-size: 16px;*/
line-height: 1.7;
color: $color-grey-dark;
padding: 3rem;
box-sizing: border-box;
}

.heading-primary {
Expand All @@ -14,24 +12,37 @@ body {
/* fix little shakes on animations bug */
backface-visibility: hidden;
margin-bottom: 6rem;

&--main {
display: block;
font-size: 6rem;
font-weight: 400;
letter-spacing: 3.5rem;

animation-name: moveInLeft;
animation-duration: 1s;
animation-timing-function: ease-out;

@include respond(phone) {
letter-spacing: 1rem;
font-family: 5rem;
}
/*
animation-delay: 3s;
animation-iteration-count: 3;
*/
}

&--sub {
display: block;
font-size: 2rem;
font-weight: 700;
letter-spacing: 1.75rem;
animation: moveInRight 1s ease-out
animation: moveInRight 1s ease-out;

@include respond(phone) {
letter-spacing: .5rem;
}
}
}

Expand All @@ -42,14 +53,21 @@ body {
display: inline-block;
background-image: linear-gradient(to right, $color-primary-light, $color-primary-dark);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
letter-spacing: .2rem;
transition: all .2s;

@include respond(tab-port) {
font-size: 3rem;
}

@include respond(phone) {
font-size: 2.5rem;
}

&:hover {
// animation when hover .heading-secondary funky effect
transform: skewY(2deg) skewX(15deg) scale(0.8);
transform: skewY(2deg) skewX(15deg) scale(1.1);
text-shadow: .5rem 1rem 2rem rgba($color-black, .2);
}
}
Expand All @@ -62,7 +80,7 @@ body {

.paragraph {
font-size: $default-font-size;

&:not(:last-child) {
margin-bottom: 3rem;
}
Expand Down

0 comments on commit 6578253

Please sign in to comment.