sass-mq 6.0.0-beta.1 β†’ 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,18 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
- ## Unreleased
8
+ <!-- ## Unreleased -->
9
9
 
10
- This is a major version bump that contains breaking changes. It adds support for the [new Sass module system](https://sass-lang.com/blog/the-module-system-is-launched) and dropping support for deprecated versions of Sass. No new features were added.
10
+ ## v6.0.0 - 2022-01-10
11
+
12
+ This is a major version bump that contains breaking changes. It adds support for the [new Sass module system](https://sass-lang.com/blog/the-module-system-is-launched), drops support for Eyeglass, and drops support for deprecated versions of Sass. No new features were added.
13
+
14
+ See the updated [README](https://github.com/sass-mq/sass-mq/blob/main/README.md) for instructions on how to use this new version of Sass MQ.
15
+
16
+ πŸ™Œ A huge thanks to [Rodrigo](https://github.com/area73) for his contribution on this major release.
11
17
 
12
18
  ### Added
13
19
 
14
- - Support for dart-sass@1.35.1
20
+ - Support for dart-sass >= 1.35.1
15
21
  - Test suite using [Jest](https://jestjs.io/) and [True](https://www.oddbird.net/true/), a unit-testing framework designed specifically for the Sass language
16
22
 
17
23
  ### Removed
18
24
 
19
25
  - Dropped tests for Sass engines other than dart-sass
26
+ - Dropped support for [Eyeglass](https://github.com/linkedin/eyeglass)
20
27
  - Dropped deprecated var `$mq-base-font-size` (https://github.com/sass-mq/sass-mq/pull/123)
21
28
  - Dropped compatibility with browsers that don’t support media queries:
22
29
  - Removed `$mq-responsive`
package/README.md CHANGED
@@ -15,10 +15,10 @@ Here is a very basic example:
15
15
  ```scss
16
16
  @use 'mq' as * with (
17
17
  $breakpoints: (
18
- mobile: 320px,
19
- tablet: 740px,
18
+ mobile: 320px,
19
+ tablet: 740px,
20
20
  desktop: 980px,
21
- wide: 1300px
21
+ wide: 1300px,
22
22
  )
23
23
  );
24
24
 
@@ -58,8 +58,8 @@ OR:
58
58
  1. Install:
59
59
 
60
60
  - with [Bower](http://bower.io/ 'Bower: A package manager for the web'): `bower install sass-mq --save`
61
- - with [npm](https://www.npmjs.com/): `npm install sass-mq --save` _supports [eyeglass](https://github.com/sass-eyeglass/eyeglass)_
62
- - with [yarn](https://www.yarnpkg.com/): `yarn add sass-mq` _supports [eyeglass](https://github.com/sass-eyeglass/eyeglass)_
61
+ - with [npm](https://www.npmjs.com/): `npm install sass-mq --save`
62
+ - with [yarn](https://www.yarnpkg.com/): `yarn add sass-mq`
63
63
 
64
64
  OR [Download \_mq.scss](https://raw.github.com/sass-mq/sass-mq/main/_mq.scss) into your Sass project.
65
65
 
@@ -83,11 +83,11 @@ $breakpoints: (
83
83
  // If you want to display the currently active breakpoint in the top
84
84
  // right corner of your site during development, add the breakpoints
85
85
  // to this list, ordered by width. For examples: (mobile, tablet, desktop).
86
- $breakpoints-shown: (mobile, mobileLandscape, tablet, desktop, wide);
86
+ $show-breakpoints: (mobile, mobileLandscape, tablet, desktop, wide);
87
87
 
88
88
  @use 'path/to/mq' with (
89
89
  $breakpoints: $breakpoints,
90
- $show-breakpoints: $breakpoints-shown,
90
+ $show-breakpoints: $show-breakpoints
91
91
  );
92
92
  ```
93
93
 
@@ -273,6 +273,10 @@ then be shown in the top right corner of the viewport.
273
273
  ```scss
274
274
  // Adapt the list to include breakpoint names from your project
275
275
  $show-breakpoints: (phone, phablet, tablet);
276
+
277
+ @use 'path/to/mq' with (
278
+ $show-breakpoints: $show-breakpoints
279
+ );
276
280
  ```
277
281
 
278
282
  ![$show-breakpoints](https://raw.githubusercontent.com/sass-mq/sass-mq/main/show-breakpoints.gif)
@@ -285,7 +289,9 @@ for screens only, set `$media-type`:
285
289
  #### SCSS
286
290
 
287
291
  ```scss
288
- @use 'mq' with ($media-type: screen);
292
+ @use 'mq' with (
293
+ $media-type: screen
294
+ );
289
295
 
290
296
  .screen-only-element {
291
297
  @include mq.mq(mobile) {
package/_mq.scss CHANGED
@@ -24,8 +24,8 @@ $breakpoints: (
24
24
  /// to this list, ordered by width. For example: (mobile, tablet, desktop).
25
25
  ///
26
26
  /// @example scss
27
- /// $show-breakpoints: (mobile, tablet, desktop);
28
- /// @import 'path/to/mq';
27
+ /// @use 'path/to/mq' with ($show-breakpoints: ('mobile', 'tablet', 'desktop'));
28
+ ///
29
29
  ///
30
30
  /// @type map
31
31
  $show-breakpoints: () !default;
@@ -33,6 +33,10 @@ $show-breakpoints: () !default;
33
33
  /// Customize the media type (for example: `@media screen` or `@media print`)
34
34
  /// By default sass-mq uses an "all" media type (`@media all and …`)
35
35
  ///
36
+ /// If you want to overried the media type, you can use this option.
37
+ /// @example scss
38
+ /// @use 'path/to/mq' with ($media-type: 'screen');
39
+ ///
36
40
  /// @type String
37
41
  /// @link https://github.com/sass-mq/sass-mq#changing-media-type Full documentation and example
38
42
  $media-type: all !default;
@@ -52,7 +56,7 @@ $media-type: all !default;
52
56
  @warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels.";
53
57
  @return px2em($px * 1px);
54
58
  }
55
- // if $px is compatible with em units then return value unchanged
59
+ // if $px is compatible with em units, then return value unchanged
56
60
  @if math.compatible($px, 1em) {
57
61
  @return $px;
58
62
  }
@@ -65,7 +69,7 @@ $media-type: all !default;
65
69
  ///
66
70
  /// @example scss
67
71
  /// $tablet-width: get-breakpoint-width(tablet);
68
- /// @media (min-width: get-breakpoint-width(desktop)) {}
72
+ /// @media (min-width: get-breakpoint-width(tablet)) {}
69
73
  ///
70
74
  /// @requires {Variable} $breakpoints
71
75
  ///
@@ -99,6 +103,7 @@ $media-type: all !default;
99
103
  /// @link https://github.com/sass-mq/sass-mq#responsive-mode-on-default Full documentation and examples
100
104
  ///
101
105
  /// @example scss
106
+ /// @use 'path/to/mq' as *;
102
107
  /// .element {
103
108
  /// @include mq($from: mobile) {
104
109
  /// color: red;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sass-mq",
3
3
  "description": "mq() is a Sass mixin that helps manipulating media queries in an elegant way.",
4
- "version": "6.0.0-beta.1",
4
+ "version": "6.0.0",
5
5
  "keywords": [
6
6
  "responsive",
7
7
  "sass",
@@ -9,8 +9,7 @@
9
9
  "mediaquery",
10
10
  "query",
11
11
  "queries",
12
- "media",
13
- "eyeglass-module"
12
+ "media"
14
13
  ],
15
14
  "ignore": [
16
15
  "test",
@@ -50,13 +49,7 @@
50
49
  },
51
50
  "license": "MIT",
52
51
  "homepage": "https://sass-mq.github.io/sass-mq/",
53
- "eyeglass": {
54
- "needs": ">= 0.8.2",
55
- "sassDir": "./_mq.scss",
56
- "exports": false
57
- },
58
52
  "devDependencies": {
59
- "eyeglass": "^3.0.3",
60
53
  "glob": "^7.1.7",
61
54
  "jest": "^27.0.4",
62
55
  "sass": "^1.35.1",