Skip to content

Commit 11f956c

Browse files
committed
Merge branch 'develop'
2 parents a7c105d + 99eab71 commit 11f956c

File tree

23 files changed

+28
-61
lines changed

23 files changed

+28
-61
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ The use case in this example is that you always want the print styles to be base
977977
978978
### The `not` media type
979979
980-
`'not'` is an interesting media type. It was introduced in v2.1.0 as a short-hand for `not screen` in mq-scss (`@media not (max-width: 600px){}` is actually invalid css).
980+
`'not'` is an interesting media type. It was introduced in v2.1.0 as a short-hand for `not screen` (then updated in v2.1.3 to output `not all`).
981981
982982
`'not'` will essentially invert the media query. You could use this for helping you write counter queries however I would caution against this. In general, using `'not'` is fine. However, if you try and nest another media query inside of it, or you nest the `'not'` statement inside a different media query, Sass can output some very odd and unexpected results. This is the reason version 1.0.0 of mq-scss couldn't support nested `outside` statements. It was essentially using `not inside` to produce the media query.
983983
@@ -1002,7 +1002,7 @@ In order to use a `min-ratio` that works in the same sort of way that `min-heigh
10021002
10031003
````css
10041004
/* output css for both */
1005-
@media not screen and (max-aspect-ratio: 2 / 1) {
1005+
@media not all and (max-aspect-ratio: 2 / 1) {
10061006
body { color: #000; }
10071007
}
10081008
````
@@ -1147,6 +1147,10 @@ It also comes with a batch of 46 unit tests that are used to ensure that all of
11471147
11481148
This change log only covers major changes to the mixin. Due to how npm works, things like edits to the readme file require releasing whole new versions of the module to publish the edits. Those sorts of releases are not listed here.
11491149
1150+
### v2.1.3
1151+
1152+
- `'not'` is now short hand for `not all` instead of `not screen`. This is more what I was trying to go with originally but I wasn't sure what the proper syntax was.
1153+
11501154
### v2.1.2
11511155
11521156
- Added automated unit-tests.

_mq.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $mq-debug: false !default;
88

99
@function mediaType($mediaType: false, $hasAnd: true){
1010
$media: '';
11-
$mediaType: if($mediaType == 'not', 'not screen', $mediaType);
11+
$mediaType: if($mediaType == 'not', 'not all', $mediaType);
1212
@if ($mediaType){
1313
$media: if($hasAnd, $mediaType + ' and ', $mediaType);
1414
}

docs/assets/scripts/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/scripts/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/styles/main.css

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/styles/main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/styles/test-styles.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/styles/test-styles.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<meta name="viewport" content="width=device-width,initial-scale=1">
1212
<link href="favicon.ico" rel="shortcut icon">
1313
<link rel="stylesheet" href="assets/styles/main.css">
14+
<link rel="stylesheet" href="assets/styles/test-styles.css">
1415
<script>
1516
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
1617
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -27,7 +28,7 @@
2728
<div class="pageContainer__width">
2829
<header class="header">
2930
<h1>mq-scss testing/demo environment</h1>
30-
<p class="version">v2.1.0</p>
31+
<p class="version">v2.1.3</p>
3132
<pre class="no-lines"><code style="text-align: center">npm install mq-scss --save</code></pre>
3233
</header>
3334
<div class="bodyContent"><p>This is a testing/demo site for mq-scss. Full documentation can be found on <a href="https://github.com/Dan503/mq-scss">GitHub</a> and <a href="https://www.npmjs.com/package/mq-scss">npm</a>.</p>

gulp/tasks/modernizr.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

gulpfile.babel.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ gulp.task('compile', gulp.series(
4949
'imagemin',
5050
'sass',
5151
'compile-tests',
52-
'modernizr',
5352
'browserify',
5453
)
5554
));

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mq-scss",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"description": "An extremely powerful but easy to use Sass media query mixin that allows you to create almost any media query you can imagine.",
55
"main": "_mq.scss",
66
"repository": {
@@ -54,7 +54,6 @@
5454
"gulp-imagemin": "^4.0.0",
5555
"gulp-jade": "^1.1.0",
5656
"gulp-load-plugins": "^1.5.0",
57-
"gulp-modernizr": "0.0.0",
5857
"gulp-newer": "^1.3.0",
5958
"gulp-notify": "^3.0.0",
6059
"gulp-plumber": "^1.1.0",

src/_modules/tabs/tabs.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,4 @@
1111
display: none;
1212
}
1313
}
14-
15-
.no-flexbox & {
16-
width: 780px;
17-
}
1814
}

src/_scripts/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import codeLineNumbers from '~on-page-load-js/codeLineNumbers';
99
import smoothAnchors from '~on-page-load-js/smoothAnchors';
1010

1111
$(() => {
12+
$('html').removeClass('no-js').addClass('js');
1213
codeLineNumbers();
1314
smoothAnchors();
15+
$('html').addClass('-jsLoaded');
1416
});

src/_styles/04-base-styles/elements.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ a {
124124
cursor: default;
125125
pointer-events: none;
126126
opacity: 0.2;
127-
128-
.no-csspointerevents & {
129-
display: none;
130-
}
131127
}
132128
}
133129

@@ -199,10 +195,6 @@ pre {
199195
padding: 10px 5px;
200196
font-size: 1em;
201197
}
202-
203-
.no-flexbox & {
204-
max-width: 780px;
205-
}
206198
}
207199

208200
code {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@media not screen and (min-width: 801px){.unitTest{color:#000}}
1+
@media not all and (min-width: 801px){.unitTest{color:#000}}

unit-tests/media/notMedia/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import unitTest from '../../../gulp/helpers/unitTest';
22

3-
unitTest('notMedia', __dirname, '@media not screen and (min-width: 801px){.unitTest{color:#000}}')
3+
unitTest('notMedia', __dirname, '@media not all and (min-width: 801px){.unitTest{color:#000}}')
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@media not screen and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}
1+
@media not all and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import unitTest from '../../../gulp/helpers/unitTest';
22

3-
unitTest('exactRatioWorkAround1', __dirname, '@media not screen and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}')
3+
unitTest('exactRatioWorkAround1', __dirname, '@media not all and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}')
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@media not screen and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}
1+
@media not all and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import unitTest from '../../../gulp/helpers/unitTest';
22

3-
unitTest('exactRatioWorkAround2', __dirname, '@media not screen and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}')
3+
unitTest('exactRatioWorkAround2', __dirname, '@media not all and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}')
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@media not screen and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}
1+
@media not all and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import unitTest from '../../../gulp/helpers/unitTest';
22

3-
unitTest('exactRatioWorkAround3', __dirname, '@media not screen and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}')
3+
unitTest('exactRatioWorkAround3', __dirname, '@media not all and (max-aspect-ratio: 2 / 1){.unitTest{color:#000}}')

0 commit comments

Comments
 (0)