sass-mq 7.0.0-beta.1 → 7.0.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +13 -3
  2. package/README.md +24 -3
  3. package/package.json +10 -3
package/CHANGELOG.md CHANGED
@@ -5,15 +5,24 @@ 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
+ ## v7.0.1 - 2026-06-19
9
9
 
10
- ## v7.0.0 - 2024-10-24
10
+ ### Fixed
11
+
12
+ - Vite 8 compatibility: added a `package.json` `exports` field with a `sass` condition so `@use 'sass-mq'` resolves again. Vite 8 dropped the `main`-field fallback that earlier versions relied on ([#179](https://github.com/sass-mq/sass-mq/issues/179)).
13
+ - Behavior change: adding `exports` encapsulates the package. The documented `@use 'sass-mq'` import is unaffected, but undocumented deep imports such as `@use 'sass-mq/_mq.scss'` are no longer resolvable — use `@use 'sass-mq'` instead.
14
+
15
+ ### Added
16
+
17
+ - `examples/vite8`: a runnable Vite 8 project that proves `@use 'sass-mq'` resolves and compiles. It runs in CI as a regression test.
18
+
19
+ ## v7.0.0 - 2025-06-16
11
20
 
12
21
  This is a major version bump that contains no breaking changes but may require a newer version of Sass. It ensures compatibility with the latest version of dart-sass and removes support for `@import`, as [`@import` is officially deprecated as of sass-dart 1.80.0](https://sass-lang.com/blog/import-is-deprecated/).
13
22
 
14
23
  ### Added
15
24
 
16
- - Support for dart-sass >= 1.80.0 (without deprecation warnings)
25
+ - Added support for dart-sass >= 1.80.0 (without deprecation warnings)
17
26
 
18
27
  ### Changed
19
28
 
@@ -24,6 +33,7 @@ This is a major version bump that contains no breaking changes but may require a
24
33
 
25
34
  - Upgraded Jest and Sass True dependencies to unlock testing with the latest versions of `sass-dart`
26
35
  - Fixed a test where a space was missing between `and` and `(` in the generated CSS (caused by the latest version of Sass)
36
+ - Migrated from Travis CI to GitHub Actions for testing
27
37
 
28
38
  ## v6.0.0 - 2022-01-10
29
39
 
package/README.md CHANGED
@@ -2,13 +2,13 @@
2
2
  <img width="500" height="500" src="https://avatars3.githubusercontent.com/u/9341289?v=3&s=500" alt="Awesome">
3
3
  </div>
4
4
 
5
- # Media Queries with superpowers [![Build Status](https://api.travis-ci.org/sass-mq/sass-mq.svg?branch=main)](https://travis-ci.org/sass-mq/sass-mq)
5
+ # Media Queries with superpowers
6
6
 
7
7
  `mq()` is a [Sass](http://sass-lang.com/ 'Sass - Syntactically Awesome
8
8
  Stylesheets') mixin that helps you compose media queries in an elegant way.
9
9
 
10
- - compiles keywords and `px`/`em` values to `em`-based queries ([a good thing](http://css-tricks.com/zooming-squishes))
11
- - For version 6 and up we removed fallbacks for older browsers (see [Mobile-first Responsive Web Design and IE8](http://www.theguardian.com/info/developer-blog/2013/oct/14/mobile-first-responsive-ie8) on the Guardian's developer blog).
10
+ - Compiles keywords and `px`/`em` values to `em`-based queries ([a good thing](http://css-tricks.com/zooming-squishes))
11
+ - For version 6 and up we removed fallbacks for older browsers (see [Mobile-first Responsive Web Design and IE8](http://www.theguardian.com/info/developer-blog/2013/oct/14/mobile-first-responsive-ie8) on the Guardian's developer blog)
12
12
 
13
13
  Here is a very basic example:
14
14
 
@@ -91,6 +91,27 @@ $show-breakpoints: (mobile, mobileLandscape, tablet, desktop, wide);
91
91
  );
92
92
  ```
93
93
 
94
+ ### Using with Vite, webpack and other bundlers
95
+
96
+ When you install Sass MQ from npm, import it by its package name and Sass will
97
+ resolve it from `node_modules`:
98
+
99
+ ```scss
100
+ @use 'sass-mq' as mq;
101
+
102
+ .foo {
103
+ @include mq.mq($from: tablet) {
104
+ color: red;
105
+ }
106
+ }
107
+ ```
108
+
109
+ Sass MQ declares a `sass` [package export](https://sass-lang.com/blog/announcing-pkg-importers/),
110
+ so it resolves out of the box with Vite (including Vite 8, which dropped the
111
+ `main`-field fallback — see [#179](https://github.com/sass-mq/sass-mq/issues/179)),
112
+ webpack's `sass-loader`, and the dart-sass `pkg:` importer. See the example in
113
+ [`examples/vite8`](examples/vite8).
114
+
94
115
  ### Notes about `@use` Vs `@import`
95
116
 
96
117
  When using the `@use` directive, you have to change your mindset when working with vars,
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": "7.0.0-beta.1",
4
+ "version": "7.0.1",
5
5
  "keywords": [
6
6
  "responsive",
7
7
  "sass",
@@ -27,10 +27,17 @@
27
27
  "sass/index.scss"
28
28
  ],
29
29
  "main": "_mq.scss",
30
+ "sass": "_mq.scss",
31
+ "exports": {
32
+ ".": {
33
+ "sass": "./_mq.scss",
34
+ "default": "./_mq.scss"
35
+ }
36
+ },
30
37
  "scripts": {
31
38
  "test": "jest",
32
39
  "sassdoc": "./scripts/sassdoc.sh",
33
- "build:examples": "sass ./examples:./examples --no-source-map"
40
+ "build:examples": "sass ./examples/basic:./examples/basic ./examples/advanced:./examples/advanced ./examples/custom:./examples/custom --no-source-map"
34
41
  },
35
42
  "contributors": [
36
43
  {
@@ -44,7 +51,7 @@
44
51
  },
45
52
  "repository": {
46
53
  "type": "git",
47
- "url": "https://github.com/sass-mq/sass-mq.git"
54
+ "url": "git+https://github.com/sass-mq/sass-mq.git"
48
55
  },
49
56
  "license": "MIT",
50
57
  "homepage": "https://sass-mq.github.io/sass-mq/",