Home

Awesome

shopware-missing-mixins

license npm Bower

less-mixins to help you with your shopware-frontend

how to use?

  1. include all.less
  2. adjust variables in your theme to your liking
  3. ???
  4. profit!

what's included?

media-mixins

tired of typing @media screen and (min-width: @phoneLandscapeViewportWidth)?

look no further!

this library introduces the following new names for the breakpoints:

of course these are not harcoded but simply the default values shopware gives us via the structure.less-

with this naming and a few cool mixins you can write your media-queries like this:

.product-box--title {
    padding-bottom: 10px;
    .screen-ms(padding-bottom, 20px);
    .screen-sm(padding-bottom, 30px);
    .screen-md({
        padding-bottom: 40px;
        margin-bottom: -10px;

        &.is--active {
            color: tomato;
        }

        .product-box--subtitle {
            background: rebeccapurple;
        }
    });
}

of course i encourage you not to write code this messy

resulting in css like this:

.product-box--title {
    padding-bottom: 10px;
}

@media (min-width: 30em) {
    .product-box--title {
        padding-bottom: 20px;
    }
}

@media (min-width: 48em) {
    .product-box--title {
        padding-bottom: 20px;
    }
}

@media (min-width: 64em) {
    .product-box--title {
        padding-bottom: 20px;
        margin-bottom: -10px;
    }

    .product-box--title.is--active {
        color: tomato;
    }

    .product-box--title .product-box--subtitle {
        background: rebeccapurple;
    }
}

read more about the magical powers of less' detached rulesets in the less docs.

.create-emotion-grid-push

This mixin creates classes which you can add to your emotion-elements to fill the gutter between elements.

The mixin creates classes for removing the gutter to the right, to the left or on both sides.

what's new?

roadmap