Advertisement
goodwin64

styles

Aug 4th, 2016
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.88 KB | None | 0 0
  1. // ------------------------------ imports
  2. @import "reset";
  3. @import "media-screen";
  4. @import "global-variables";
  5.  
  6. // ------------------------------ images paths
  7. $path-to-root-dir: "../";
  8. $main-bg-image: "images/main-bg-image.jpg"; // from root dir; src:http://www.teachthevote.org/blog-content/uploads/2015/11/ThinkstockPhotos-111939554.jpg
  9. $main-bg-image-alt-color: #fefefe;
  10.  
  11. // ------------------------------ colors
  12. $color-links: #0db7b7;
  13. $color-links-hover: $main-bg-image-alt-color;
  14.  
  15. // ------------------------------ mixins
  16. @mixin background-size($bg-size) {
  17.     -webkit-background-size: $bg-size;
  18.     -moz-background-size: $bg-size;
  19.     -o-background-size: $bg-size;
  20.     background-size: $bg-size;
  21. }
  22.  
  23. // ------------------------------ page structure (#page-wrap)
  24. header {
  25.     @extend .page-wrapper;
  26.  
  27.     h1 {
  28.         border: 2px solid #000;
  29.         text-align: center;
  30.         height: $main-elements-height;
  31.         line-height: $main-elements-height;
  32.         font-size: round($main-elements-height / 2);
  33.  
  34.         span {
  35.             color: #f88;
  36.         }
  37.     }
  38.  
  39.     nav {
  40.         border: 2px solid #000;
  41.         border-top: 0;
  42.         overflow: hidden;
  43.  
  44.         ul {
  45.             $li-delimiter: 1px solid #000;
  46.             list-style-type: none;
  47.             overflow: hidden;
  48.  
  49.             li {
  50.                 //overflow: hidden;
  51.                 float: left;
  52.  
  53.                 & > a {
  54.                     border-right: $li-delimiter;
  55.                 }
  56.  
  57.                 &:last-child > a {
  58.                     float: right;
  59.                     border-right: none;
  60.                 }
  61.  
  62.                 a {
  63.                     height: round($main-elements-height / 1.5);
  64.                     line-height: round($main-elements-height / 1.5);
  65.                     width: 90%;
  66.                     padding: 0 5%;
  67.                     display: block;
  68.                     float: left;
  69.                     text-align: center;
  70.                     font-size: round($main-elements-height / 2.5);
  71.                 }
  72.             }
  73.  
  74.             .dropdown {
  75.                 &:hover .dropdown-content {
  76.                     display: block;
  77.                     z-index: 1;
  78.                     width: inherit;
  79.                     margin-top: round($main-elements-height / 1.5);
  80.                 }
  81.  
  82.                 .dropdown-content {
  83.                     display: none;
  84.                     position: absolute;
  85.                     background-color: $color-links-hover;
  86.                     box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
  87.  
  88.                     a {
  89.                         text-align: left;
  90.                         font-size: round($main-elements-height / 3);
  91.                     }
  92.                 }
  93.             }
  94.         }
  95.     }
  96. }
  97.  
  98. .content {
  99.     padding: 5px;
  100. }
  101.  
  102. .sidebar {
  103.  
  104. }
  105.  
  106. footer {
  107.     @extend .page-wrapper;
  108.  
  109.     details {
  110.         padding: 5px;
  111.  
  112.         summary {
  113.             outline: none;
  114.         }
  115.     }
  116. }
  117.  
  118. // ------------------------------ partial cases
  119. body {
  120.     background: $main-bg-image-alt-color url($path-to-root-dir + $main-bg-image) no-repeat center center fixed;
  121.     @include background-size(cover); // !!! after background-property !!!
  122. }
  123.  
  124. .page-wrapper {
  125.     // sizes and position
  126.     @extend .col-10;
  127.     margin: 0 auto;
  128.     // styles and color design
  129.     background: rgba(100%, 100%, 100%, 0.95);
  130. }
  131.  
  132. a {
  133.     color: $color-links;
  134.     text-decoration: none;
  135.  
  136.     &:hover {
  137.         color: $color-links-hover;
  138.         background: $color-links;
  139.     }
  140. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement