您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

合并mixin中的选择器

合并mixin中的选择器

不能。Sass无法合并选择器(这可能被认为是不希望的,因为这会改变选择器的顺序)。

您唯一能做的就是这样(或编写2个单独的mixins):

@mixin footer_flush_bottom {
    height: 100%;

    body {
        min-height: 100%;
        position: relative;
        @content;
    }
}

html {
    // additional html styles
    @include footer_flush_bottom {
        // additional body styles
    }
}
其他 2022/1/1 18:14:50 有489人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶