Skip to content

Releases: dimitrinicolas/postcss-inline-media

1.4.0 Added shorthandValueAddition option

20 Dec 14:09
Compare
Choose a tag to compare

Added the shorthandValueAddition option, regarding issue #3.

1.3.0 Added source for new nodes

14 Aug 22:24
Compare
Choose a tag to compare

Added source for new nodes to generate an accurate source map.

1.2.1 Improved nested rules management

11 Aug 17:50
Compare
Choose a tag to compare

Simpler and better management of nested rules, now works with pseudo elements and other unknown rule selector.

1.2.0 Packing media queries together, respecting CSS priority order

11 Aug 16:35
Compare
Choose a tag to compare

Now packing together same media queries and same selectors, respecting css
priority order.

Now supporting nested rules.

1.1.2 Updated PostCSS to v7

03 Aug 20:08
Compare
Choose a tag to compare

Removed the useless dependency glob and linted code.

1.1.1 Fixes an issue with nested conditions

06 Jul 13:19
Compare
Choose a tag to compare

Fixes an issue when having node functions after a nested condition.

1.1.0 Shorthand options and other plugins compatibility

16 Jun 08:51
Compare
Choose a tag to compare

Welcome Mobile-first developers!

You can now give to postcss-inline-media the options shorthand and shorthandUnit. They are by default "max-width" and "px", eg:

postcss([
    require('postcss-inline-media')({
        shorthand: 'min-width'
    })
])
div {
    margin: 10px @600 20px;
}

will output

.btn {
    margin: 10px;
}
@media (min-width: 600px) {
    .btn {
        margin: 20px;
    }
}

Welcome other plugins!

You can now use postcss-media-minmax and postcss-custom-media with postcss-inline-media.

Be sure to include them after postcss-inline-media.

1.0.2 Updated dependencies

15 Jun 22:05
Compare
Choose a tag to compare
Updated dependencies and added Travis CI

1.0.1 Nested conditions

05 Feb 15:51
Compare
Choose a tag to compare

You can now nest media queries in parentheses, but you can't set multiples nesting parentheses on the same css property

div {
    margin: 50px (30px @(print) 20px @(max-width: 800px) 10px) 5px 5px;
}

will output:

div {
    margin: 50px 30px 5px 5px;
}
@media print {
    div {
        margin: 50px 20px 5px 5px;
    }
}
@media (max-width: 800px) {
    div {
        margin: 50px 10px 5px 5px;
    }
}

1.0.0 max-width shorthand

30 Jan 15:04
Compare
Choose a tag to compare

Now you can use @600 as a shortcut for @(max-width: 600px)