求職者支援訓練Webデザイン Webサイト制作科 白描

求職者支援訓練Webサイト制作科 補足メモ Web白描

Sass実践 CafeLeaf をモバイルファーストで記述

Sass実践 CafeLeaf をモバイルファーストで記述

  • header、footerを除く

f:id:web-0220:20190222170101p:plain

f:id:web-0220:20190222014003p:plain

@charset "UTF-8";

/* reset
------------------------------------------------- */
html,body,h1,h2,h3,h4,p,ul,li,dl,dt,dd {
  margin: 0;
  padding: 0;
  line-height: 1.0;
}
ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  vertical-align: bottom;
  max-width: 100%;
}

/* font-size
------------------------------------------------ */
html {
  font-size: 62.5%;
}

$white: #fff;
$IMG_PATH: '../img/';

/* body
------------------------------------------------- */
body {
  font-size: 1.6rem;
}

/* layout
----------------------------------------------- */
.container {
  display: flex;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 4%;
  box-sizing: border-box;
    @media screen and (min-width: 640px){
      max-width: 960px;
      margin: 0 auto;
    }
}

/* gnav
----------------------------------------------- */
.gnav {
  background: #d8c7a0;
  & ul {
    display: flex;
  }
  & li {
    width: 25%;
    text-align: center;
  }
  & a {
    display: block;
    padding: 15px 0;
    color: $white;
    font-size: 1.8rem;
    font-family: 'Cardo', serif;
    font-style: italic;
    font-weight: 700;
      &:hover {
        background: #ecdfc2;
      }
  }
}

/*intro
----------------------------------------------- */
.intro{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 20px 0 40px;
  padding: 20px;
  background: url(#{$IMG_PATH}bg_check.png);
    .intro-text p {
      margin-bottom: 20px;
      font-size: 1.6rem;
      line-height: 1.7;
    }
    .intro-map .map{
      margin-bottom: 20px;
    }
}

/* Google Map
----------------------------------------------- */
.intro-map{
  width: 100%;
}
.map {
  position: relative;
  width: 100%;
  border: #d8c7a0 1px solid;
  padding-bottom: 50%;
    & iframe {
      position: absolute;
      left:0;
      top:0;
      width: 100%;
      height: 100%;
    }
}
.address {
  text-align: center;
  font-size: 1.4rem;
    & p {
      margin-top: 10px;
      line-height: 1.4;
    }
}
.btn-tel {
  width: 70%;
  max-width: 240px;
  margin: 0 auto;
  padding: 10px 0 10px;
  border-radius: 2em;
  background: #d8c7a0;
  color: #fff;
  text-decoration: none;
  font-family: 'Arial Black', sans-serif;
  font-size: 2.4rem;
  font-weight: bold;
}
.btn-tel a {
  color: #fff;
}
@media screen and (min-width: 640px) {
  .intro-text {
    width: 52%;
  }
  .intro-map {
    width: 46%;
  }
}

/* heading
----------------------------------------------- */
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
  border-bottom: #4d941a 1px solid;
    & h2 {
      padding-bottom: 14px;
      color: #4d941a;
      font-size: 2.4rem;
      font-weight: normal;
      font-family: 'Cardo', serif;
      font-style: italic;
        &:before {
          content:"";
          display: inline-block;
          width: 35px;
          height: 26px;
          margin-right: 5px;
          background: url(#{$IMG_PATH}ico_pot.png) no-repeat;
          position: relative;
          bottom:-3px;
        }
  }
}
.more a {
  padding: 8px 8px 8px 14px;
  background: #4d941a;
  border-radius: 20px;
  color: $white;
  font-size: 1.4rem;
  line-height: 1;
    & a:hover{
      opacity: 0.7;
    }
    &:after{
      content: "";
      display: inline-block;
      width: 0;
      height: 0;
      margin: {
        top: 2px;
        left: 5px;
      }
      border: transparent 5px solid;
      border-left-color: $white;
    }
}

/* Pickup Menu
----------------------------------------------- */
.menu_text {
  padding: 10px 0 15px;
  text-align: center;
  line-height: 1.5;
  font-size: 18px;
    .price {
      font-weight: 700;
    }
}
@media screen and (min-width: 640px) {
  .menu_list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
      & li{
        width: 32%;
      }
  }
}

/* Infomation
----------------------------------------------- */
.news {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 1.5rem;
    & dt {
      flex-shrink: 0;
      flex-basis: 7em;
      padding: 10px 0;
      line-height: 1.6;
      border-bottom: 1px dotted #aaa;
    }
    & dd {
      width: calc(100% - 7em);
      line-height: 1.6;
      padding: 10px 0;
      border-bottom: 1px dotted #aaa;
    }
    & a {
      text-decoration: underline;
    }
}
@media screen and (min-width: 640px) {
  .wrapper {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .info {
      max-width: 50%;
      margin-bottom: 20px;
      padding: 20px 0 0;
      .news {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
      }
      & dt {
        margin-bottom: 10px;
        padding: 0 0 10px;
      }
      & dd {
        font-size: 1.5rem;
        margin-bottom: 10px;
        padding: 0 0 10px;
      }
    }
}

/* staff
----------------------------------------------- */
.staff {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 30px;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  background: url(#{$IMG_PATH}bg_check.png);
    & h2 {
      padding: 12px 20px 10px;
      margin: 0 auto 10px;
      border-radius: 20px;
      background: #d8c7a0;
      color: $white;
      font-size: 1.6rem;
    }
    .staff-photo {
      width: 80%;
      margin: 0 auto 20px;
      border: 6px solid #d8c7a0;
      & img {
        width: 100%;
      }
    }
    & .say {
      margin: 0 auto;
      line-height: 1.5;
      font-size: 1.4rem;
    }
}
@media screen and (min-width: 640px) {
  .staff {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 48%;
    padding: 20px 10px 0;
  }
  .staff-photo {
    max-width: 38%;
    margin: 0;
  }
  .comment {
    width: 53%;
    margin: 0;
  }
  .staff h2 {
    width: 80%;
    padding: 12px 10px 8px;
    border-radius: 20px;
    background: #d8c7a0;
    color: $white;
    font-size: 1.6rem;
  }
  .staff .say {
    text-align: left;
    margin-bottom: 10px;
  }
}


/* banner
----------------------------------------------- */
.banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 10px;
    & li {
      width: 60%;
      margin: 0 auto 20px;
      border: 4px solid $white;
      box-shadow: 0 0 6px #999;
        & a {
          display: block;
        }
    }
}
@media screen and (min-width: 640px) {
  .banner {
      margin-bottom: 20px;
    & li {
      width: 31%;
    }
  }
}