may88seiji
4/27/2017 - 12:26 PM

scssのネストの方法

scssのネストの方法

    &:first-child{
      .l-section:nth-child(odd) &{
        float: left;
        margin-top: 60px;
        background-color: darkcyan;
        /**  * mobile */
        @include mobile {
          margin-top: 0;
          float: none;
        }
      }
    }
     &:nth-child(2){
        .l-section:nth-child(even) &{
          float: right;
          margin-top: 60px;
          background-color: darkcyan;
          /**  * mobile */
          @include mobile {
            margin-top: 0;
          }
        }
      }