Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Commit 8a039cf

Browse files
committed
Update dependencies + remove visited variant
1 parent 23f4016 commit 8a039cf

File tree

6 files changed

+626
-735
lines changed

6 files changed

+626
-735
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.2.0] - 2019-09-02
9+
10+
### Removed
11+
- Removed the `visited` variant since it is now built in to Tailwind
12+
813
## [2.1.0] - 2019-07-11
914

1015
### Added
@@ -23,7 +28,8 @@ No change since 2.0.0-beta.1
2328

2429
Initial release
2530

26-
[Unreleased]: https://github.com/benface/tailwindcss-interaction-variants/compare/v2.1.0...HEAD
31+
[Unreleased]: https://github.com/benface/tailwindcss-interaction-variants/compare/v2.2.0...HEAD
32+
[2.2.0]: https://github.com/benface/tailwindcss-interaction-variants/compare/v2.1.0...v2.2.0
2733
[2.1.0]: https://github.com/benface/tailwindcss-interaction-variants/compare/v2.0.0...v2.1.0
2834
[2.0.0]: https://github.com/benface/tailwindcss-interaction-variants/compare/v2.0.0-beta.1...v2.0.0
2935
[2.0.0-beta.1]: https://github.com/benface/tailwindcss-interaction-variants/compare/v1.0.0...v2.0.0-beta.1

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm install tailwindcss-interaction-variants
1717
},
1818
},
1919
variants: {
20-
backgroundColor: ['hocus', 'group-hocus', 'group-focus', 'group-active', 'visited'],
20+
backgroundColor: ['hocus', 'group-hocus', 'group-focus', 'group-active'],
2121
},
2222
plugins: [
2323
require('tailwindcss-interaction-variants')(),
@@ -47,8 +47,4 @@ The above configuration would generate the following CSS:
4747
.group:active .group-active\:bg-black {
4848
background-color: black;
4949
}
50-
51-
.visited\:bg-black:visited {
52-
background-color: black;
53-
}
5450
```

index.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
const _ = require('lodash');
22
const selectorParser = require('postcss-selector-parser');
33

4-
const pseudoClassVariant = function(pseudoClass) {
5-
return ({ modifySelectors, separator }) => {
6-
return modifySelectors(({ selector }) => {
7-
return selectorParser(selectors => {
8-
selectors.walkClasses(classNode => {
9-
classNode.value = `${pseudoClass}${separator}${classNode.value}`;
10-
classNode.parent.insertAfter(classNode, selectorParser.pseudo({ value: `:${pseudoClass}` }));
11-
})
12-
}).processSync(selector);
13-
});
14-
};
15-
};
16-
174
const groupPseudoClassVariant = function(pseudoClass) {
185
return ({ modifySelectors, separator }) => {
196
return modifySelectors(({ selector }) => {
@@ -29,7 +16,6 @@ const groupPseudoClassVariant = function(pseudoClass) {
2916

3017
module.exports = function() {
3118
return ({ addVariant, e }) => {
32-
addVariant('visited', pseudoClassVariant('visited'));
3319
addVariant('group-focus', groupPseudoClassVariant('focus'));
3420
addVariant('group-active', groupPseudoClassVariant('active'));
3521

0 commit comments

Comments
 (0)