Advertisement
makispaiktis

Codecademy - 15th Exercise (CSS Typography - CSS File)

Oct 19th, 2019 (edited)
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.84 KB | None | 0 0
  1. /* Google fonts */
  2. @font-face{
  3.   font-family: "Croissant one";
  4.   src: url("fonts/CroissantOne-Regular.ttf");
  5. }
  6.  
  7. html {
  8.   font-size: 18px;
  9. }
  10.  
  11. @media only screen and (max-width: 1000px) {
  12.   html {
  13.     font-size: 16px;
  14.   }
  15. }
  16.  
  17. @media only screen and (max-width: 680px) {
  18.   html {
  19.     font-size: 14px;
  20.   }
  21. }
  22.  
  23. /* Header */
  24.  
  25. .header {
  26.   display: flex;
  27.   justify-content: space-around;
  28.   align-items: center;
  29.   height: 4.44rem;
  30.   padding: 0 12%;
  31.   background-color: white;
  32.   box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.05);
  33.   font-family: Verdana, sans-serif;
  34.   font-size: .77rem;
  35.   font-weight: bold;
  36. }
  37.  
  38. .header .logo {
  39.   flex-grow: 1;
  40.   color: #ffb78c;
  41. }
  42.  
  43. .header li {
  44.   display: inline;
  45.   padding-right: 2.22rem;
  46. }
  47.  
  48. .header li a {
  49.   text-decoration: none;
  50.   color: #4a4a4a;
  51. }
  52.  
  53. @media only screen and (max-width: 550px) {
  54.   .header {
  55.     flex-direction: column;
  56.   }
  57.  
  58.   .header .logo {
  59.     flex-grow: 0;
  60.   }
  61. }
  62.  
  63. /* Banner */
  64.  
  65. .banner {
  66.   display: flex;
  67.   flex-direction: column;
  68.   justify-content: center;
  69.   align-items: center;
  70.   height: 50rem;
  71.   background: url("https://s3.amazonaws.com/codecademy-content/courses/freelance-1/unit-6/project-morocco/banner.jpg") center center no-repeat;
  72.   background-size: cover;
  73.   color: #ffb78c;
  74. }
  75.  
  76. .banner h2 {
  77.   padding: .55rem 0;
  78.   border-top: 4px solid #ffb78c;
  79.   border-bottom: 4px solid #ffb78c;
  80.   font-family: "Work Sans", Arial, sans-serif;
  81.   font-size: 1.44rem;
  82.   letter-spacing: 2px;
  83.   font-weight: 500;
  84. }
  85.  
  86. .banner h1 {
  87.   padding-top: 1.11rem;
  88.   /* Mayer "Abril Farface will not be supported as font-family" */
  89.   font-family: "Abril Fatface", sans-serif;
  90.   font-size: 11rem;
  91.   font-weight: 900;
  92. }
  93.  
  94. @media only screen and (max-width: 750px) {
  95.   .banner {
  96.     height: 40rem;
  97.   }
  98.  
  99.   .banner h1 {
  100.     font-size: 8rem;
  101.   }
  102. }
  103.  
  104. @media only screen and (max-width: 530px) {
  105.   .banner {
  106.     height: 30rem;
  107.   }
  108.  
  109.   .banner h1 {
  110.     font-size: 6rem;
  111.   }
  112. }
  113.  
  114. /* Journal */
  115.  
  116. .journal {
  117.   padding: 0 25% 4rem 25%;
  118.   background-color: rgb(254, 231, 218);
  119.   color: #4a4a4a;
  120.   line-height: 1.4;
  121.   font-family: "Work Sans", serif;
  122. }
  123.  
  124. .photo {
  125.   width: 75%;
  126.   padding: 1.11rem;
  127.   border-radius: 5px;
  128.   margin: 0 auto 4.44rem auto;
  129.   background-color: white;
  130. }
  131.  
  132. .photo .image-container {
  133.   overflow: hidden;
  134.   margin-bottom: 1.11rem;
  135. }
  136.  
  137. .photo .image-container img {
  138.   width: 100%;
  139. }
  140.  
  141. .photo .caption {
  142.   font-style: italic;
  143.   font-family: "Merriweather", serif;
  144. }
  145.  
  146. .photo.first {
  147.   position: relative;
  148.   top: -2.77rem;
  149.   margin-bottom: 1.67rem;
  150. }
  151.  
  152. .journal p {
  153.   padding-bottom: 2.77rem;
  154.   font-size: 1.5rem;
  155. }
  156.  
  157. .journal .first-letter {
  158.   float: left;
  159.   padding-right: 1.4rem;
  160.   font-family: "Abril Fatface", serif;
  161.   font-size: 7.44rem;
  162.   color: #10b0d8;
  163.   line-height: 0.87;
  164. }
  165.  
  166. .quote {
  167.   display: block;
  168.   padding: 4.44rem 0;
  169.   margin-bottom: 3.33rem;
  170.   border-top: 4px solid black;
  171.   border-bottom: 4px solid black;
  172.   text-align: center;
  173.   font-size: 3.55rem;
  174.   font-weight: 800;
  175.   line-height: 1.2;
  176. }
  177.  
  178. @media only screen and (max-width: 680px) {
  179.   .journal {
  180.     padding: 0 10% 4rem 10%;
  181.   }
  182. }
  183.  
  184. /* Footer */
  185.  
  186. footer {
  187.   display: flex;
  188.   align-items: center;
  189.   padding: 0 1%;
  190.   background-color: #212121;
  191.   line-height: 1.5;
  192.   font-family: "Croissant One", "Merriweather", serif;
  193. }
  194.  
  195. footer .image-container {
  196.   width: 400px;
  197. }
  198.  
  199. footer .content {
  200.   flex-grow: 1;
  201.   font-style: italic;
  202.   color: #9b9b9b;
  203. }
  204.  
  205. footer p {
  206.   padding-bottom: 1.66rem;
  207. }
  208.  
  209. footer p:last-child {
  210.   padding-bottom: 0;
  211. }
  212.  
  213. footer .author {
  214.   color: #ffb78c;
  215. }
  216.  
  217. footer em {
  218.   color: #cfcfcf;
  219. }
  220.  
  221. @media only screen and (max-width: 750px) {
  222.   footer {
  223.     flex-direction: column;
  224.     padding: 0 10% 2rem 10%;
  225.   }
  226.  
  227.   footer .image-container {
  228.     height: 300px;
  229.     margin-bottom: 2rem;
  230.     overflow: hidden;
  231.   }
  232. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement