@unsass/selector 1.0.0-beta.2 → 1.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
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
4
4
 
5
+ ## 1.0.0 (2022-08-31)
6
+
7
+
8
+ ### Features
9
+
10
+ * add `media` mixin ([2ce8316](https://github.com/unsass/selector/commit/2ce8316b44004a38f3c77c663b536510bf435983))
11
+ * add mixins and functions ([729e708](https://github.com/unsass/selector/commit/729e70868e8688656b89ec2ff9bf3b5fe598510b))
12
+
5
13
  ## [1.0.0-beta.2](https://github.com/unsass/selector/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2022-08-27)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unsass/selector",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0",
4
4
  "description": "Sass functions and mixins to manage CSS selectors.",
5
5
  "scripts": {
6
6
  "lint:css": "stylelint --fix \"**/*.scss\"",
@@ -16,18 +16,46 @@
16
16
  // Public functions
17
17
  // ------------------------------------------------------------------------- //
18
18
 
19
+ ///
20
+ /// @example - scss
21
+ /// $selector: pseudo-class(".foo", "hover");
22
+ /// // ".foo:hover"
23
+ ///
24
+ /// @access public
25
+ ///
19
26
  @function pseudo-class($selector, $pseudo-class) {
20
27
  @return selector.append($selector, ":#{$pseudo-class}");
21
28
  }
22
29
 
30
+ ///
31
+ /// @example - scss
32
+ /// $selector: pseudo-class(".foo", "before");
33
+ /// // ".foo::before"
34
+ //
35
+ /// @access public
36
+ ///
23
37
  @function pseudo-element($selector, $pseudo-element) {
24
38
  @return selector.append($selector, "::#{$pseudo-element}");
25
39
  }
26
40
 
41
+ ///
42
+ /// @example - scss
43
+ /// $selector: to-id("foo");
44
+ /// // "#foo"
45
+ //
46
+ /// @access public
47
+ ///
27
48
  @function to-id($selector) {
28
49
  @return "##{$selector}";
29
50
  }
30
51
 
52
+ ///
53
+ /// @example - scss
54
+ /// $selector: to-class("foo");
55
+ /// // ".foo"
56
+ ///
57
+ /// @access public
58
+ ///
31
59
  @function to-class($selector) {
32
60
  @return ".#{$selector}";
33
61
  }