Skip to content

Commit c500635

Browse files
jonathantnealromainmenke
authored andcommitted
7.0.3
1 parent 115cc2c commit c500635

File tree

5 files changed

+44
-5
lines changed

5 files changed

+44
-5
lines changed

plugins/postcss-custom-media/.tape.js

+6
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ module.exports = {
9292
expect: 'import.expect.css',
9393
result: 'import.result.css'
9494
},
95+
'import:empty': {
96+
message: 'supports { importFrom: {} } usage',
97+
options: {
98+
importFrom: {}
99+
}
100+
},
95101
'basic:export': {
96102
message: 'supports { exportTo: { customMedia: { ... } } } usage',
97103
options: {

plugins/postcss-custom-media/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes to PostCSS Custom Media
22

3+
### 7.0.3 (September 20, 2018)
4+
5+
- Fixed: Do not break on an empty `importFrom` object
6+
37
### 7.0.2 (September 15, 2018)
48

59
- Fixed: An issue with re-assigning params as a non-string

plugins/postcss-custom-media/lib/import-from.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default function importCustomMediaFromSources(sources) {
7878
const from = String(opts.from || '');
7979

8080
// type of file being read from
81-
const type = (opts.type || path.extname(opts.from).slice(1)).toLowerCase();
81+
const type = (opts.type || path.extname(from).slice(1)).toLowerCase();
8282

8383
return { type, from };
8484
}).reduce(async (customMedia, source) => {

plugins/postcss-custom-media/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-custom-media",
3-
"version": "7.0.2",
3+
"version": "7.0.3",
44
"description": "Use Custom Media Queries in CSS",
55
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
66
"contributors": [
@@ -30,15 +30,15 @@
3030
"postcss": "^7.0.2"
3131
},
3232
"devDependencies": {
33-
"@babel/core": "^7.0.1",
33+
"@babel/core": "^7.1.0",
3434
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
35-
"@babel/preset-env": "^7.0.0",
35+
"@babel/preset-env": "^7.1.0",
3636
"babel-eslint": "^9.0.0",
3737
"eslint": "^5.6.0",
3838
"eslint-config-dev": "^2.0.0",
3939
"postcss-tape": "^2.2.0",
4040
"pre-commit": "^1.2.2",
41-
"rollup": "^0.65.2",
41+
"rollup": "^0.66.1",
4242
"rollup-plugin-babel": "^4.0.3"
4343
},
4444
"eslintConfig": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@media (--mq-a) {
2+
body {
3+
order: 1;
4+
}
5+
}
6+
7+
@media (--mq-a), (--mq-a) {
8+
body {
9+
order: 1;
10+
}
11+
}
12+
13+
@media not all and (--mq-a) {
14+
body {
15+
order: 2;
16+
}
17+
}
18+
19+
@media (--not-mq-a) {
20+
body {
21+
order: 1;
22+
}
23+
}
24+
25+
@media not all and (--not-mq-a) {
26+
body {
27+
order: 2;
28+
}
29+
}

0 commit comments

Comments
 (0)