Skip to content

Release 1.0.4

Compare
Choose a tag to compare
@dmitry-lavrik dmitry-lavrik released this 05 Apr 14:39
· 33 commits to master since this release

Great new mixins for meqia queries

Nobody likes to write @media screen and (max-width: @break_md) e t.c.

It's long and tedious.

Previously, smartgrid supported short mixin for 1 property:

.some{
    .md(color, red);
}

And we got:

@media screen and (max-width: 992px){
    .some{
        color: red;
    }
}

But if we have many changes into media query, we write

.some{
    .md(color, red);
    .md(padding, 20px);
    .md(margin, 10px);
}

It's strange isn't it!?

And now smartgrid support wonderful mixins such as md-block.

Less

.some{
    .md-block({
        color: red;
        padding: 20px;
        margin: 10px;
    });
}

SCSS

.some{
    @include md-block{
        color: red;
        padding: 20px;
        margin: 10px;
    };
}

SASS

.some
    +md-block
        color: red
        padding: 20px
        margin: 10px

Stylus

.some
    md-block(@block{
        color red
        padding 20px
        margin 10px
    })

All samples compiled to

@media screen and (max-width: 992px){
    .some{
        color: red;
        padding: 20px;
        margin: 10px;
    }
}

It's really convenient!

Thank #3 for this idea!