使用SASS的Bootstrap生成了太大的CSS编译文件

时间:2015-10-30 07:08:34

标签: css twitter-bootstrap-3 sass

我正在使用bootstrap css(3+)和SASS在css中生成我的编译文件。 但是我的编译文件太大了大约11MB。

/* start static navbar*/
.test-static-navbar{
    @extend .navbar;
    @extend .navbar-default;
    @extend .col-md-12;
    @include background-color(rgba(182, 182, 182, 0.15));
    border: 0;
    margin: 0;
    @include min-height(25px);

    .test-nav-right{
        float: right;;
        position: relative;
        top: 1px;
        margin: 0;
        @include font-size(11px);

        .font-color{
            @include color(#7f7f7f);
            margin: 3px;

        }
        >li {
            display:inline-block;
            @extend .font-color;
            >a{
                @extend .font-color;

                >b{
                    border: 1px solid orange;
                    padding: 4px;
                    border-radius: 16px;
                    top: -3px;
                    position: relative;
                    left: -3px;
                }

            }
        }

        /*start dropdown notification panel*/
        .test-notification {
            >a{
                padding: 0;
                @extend .test-no-style;
            }
            >ul{
                z-index: 1033;
                @extend .test-no-style;
                @extend .filter-height;

                .raw-notification{
                    padding: 5px 15px !important;
                    border-bottom: 1px solid #ccc !important;
                    cursor:pointer;
                    float: left;
                    @extend .col-md-12;
                    @include font-size(12px);
                }

                .hover-notification{
                    @extend .raw-notification;
                    &:hover{
                        @extend .raw-notification;
                        @extend .hover-yellow-background;
                    }
                }
            }
        }
        /*End dropdown notification panel*/
    }
}
/* End static navbar*/

上面是一些sass表示的代码示例。当这个编译成css bootstrap时,在这个类中添加了不需要的代码。

0 个答案:

没有答案