layout.scss 2.75 KB

@import 'mixin';

.box-border{
    border:1px solid #ccc;
    @include box_sizing(border-box);
}

.flx{
    @include display;
}
.f1{
    @include flex(1);
}
.f2{
    @include flex(2);
}
.f3{
    @include flex(3);
}
.f4{
    @include flex(4);
}
.f5{
    @include flex(5);
}
.f20{
    @include flex(20%);
}
.f25{
    @include flex(25%);
}
//  水平垂直居中 
.center-lv{
    @include justify-content(center);
    @include align-items(center);
}

// 盒子内的元素等比显示,两个元素左右靠边显示,三个元素中间元素居中显示
.both-lr{
    @include display;
    @include align-items(center);
    @include justify-content(space-between);
}
.both-ud{
    @include display;
    @include flex-direction(column);
    @include justify-content(space-between);
}

// 推荐单列列表

// 推荐两列列表



// flex-direction
.flex-direction{
    .row{
        @include flex-direction(row);
    }
    .row-reverse{
        @include flex-direction(row-reverse);
    }
    .column{
        @include flex-direction(column);
    }
    .column-reverse{
        @include flex-direction(column-reverse);
    }
}

// flex-wrap
.flex-wrap{
    .nowrap{
        @include flex-wrap()
    }
    .nowrap{
        @include flex-wrap(wrap)
    }
    .nowrap{
        @include flex-wrap(wrap-reverse)
    }
}

// flex-flow


// justify-content
.justify-content{
    .start{
        @include justify-content(flex-start);
    }
    .end{
        @include justify-content(flex-end);
    }
    .between{
        @include justify-content(space-between);
    }
    .center{
        @include justify-content(center);
    }
    .around{
        @include justify-content(space-around);
    }
}

// align-items
.align-items{
    .start{
        @include align-items(flex-start);
    }
    .end{
        @include align-items(flex-end);
    }
    .center{
        @include align-items(center);
    }
    .stretch{
        @include align-items();
    }
    .baseline{
        @include align-items(baseline);
    }
    
}

// align-content
.align-content{
    .start{
        @include align-content(flex-start);
    }
    .end{
        @include align-content(flex-end);
    }
    .center{
        @include align-content(center);
    }
    .between{
        @include align-content(space-between);
    }
    .around{
        @include align-content(space-around);
    }
    .stretch{
        @include align-content(stretch);
    }
}


// align-self
.align-self{
    .auto{
        @include align-self();
    }
    .start{
        @include align-self(flex-start);
    }
    .end{
        @include align-self(flex-end);
    }
    .center{
        @include align-self(center);
    }
    .baseline{
        @include align-self(baseline);
    }
    .stretch{
        @include align-self(stretch);
    }
}