Skip to content

Commit 87a9d78

Browse files
author
Adam Plesnik
committed
Change range separator to '_': e.g. range-on-exit/10px_100px
+ update homepage + v0.2.7
1 parent 71f8cc4 commit 87a9d78

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adam.plesnik/tailwindcss-scroll-driven-animations",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"author": "Adam Plesnik <[email protected]>",
55
"scripts": {
66
"dev-docs": "npm run --workspace=docs dev",
@@ -51,5 +51,5 @@
5151
"bugs": {
5252
"url": "https://github.com/adamplesnik/tailwindcss-scroll-driven-animations/issues"
5353
},
54-
"homepage": "https://github.com/adamplesnik/tailwindcss-scroll-driven-animations#readme"
54+
"homepage": "https://tailwind.adamplesnik.com"
5555
}

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export = plugin(
8686

8787
function splitAndCombine(values: string, modifiers: string | null) {
8888
const valueArray = (values || '').split(' ')
89-
const modifierArray = (modifiers || ['0-100%'].join('-')).split('-')
89+
const modifierArray = (modifiers || ['0_100%'].join('_')).split('_')
9090

9191
const combinedValues = [valueArray[0], modifierArray[0], valueArray[1], modifierArray[1]]
9292

tests/content.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export const contentToTest = String.raw`
2727
<div class="range-on-exit"></div>
2828
<div class="range-contain"></div>
2929
30-
<div class="range/10px-100px"></div>
31-
<div class="range-on-entry/10px-100px"></div>
32-
<div class="range-on-exit/10px-100px"></div>
33-
<div class="range-contain/10px-100px"></div>
30+
<div class="range/10px_100px"></div>
31+
<div class="range-on-entry/10px_100px"></div>
32+
<div class="range-on-exit/10px_100px"></div>
33+
<div class="range-contain/10px_100px"></div>
3434
3535
<div class="no-animations:px-0"></div>
3636
`

tests/expect.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,22 @@ export const expectedCss = String.raw`
6262
.range-contain {
6363
animation-range: contain 0 contain 100%
6464
}
65-
.range-contain\/10px-100px {
65+
.range-contain\/10px_100px {
6666
animation-range: contain 10px contain 100px
6767
}
6868
.range-on-entry {
6969
animation-range: entry 0 entry 100%
7070
}
71-
.range-on-entry\/10px-100px {
71+
.range-on-entry\/10px_100px {
7272
animation-range: entry 10px entry 100px
7373
}
7474
.range-on-exit {
7575
animation-range: exit 0 exit 100%
7676
}
77-
.range-on-exit\/10px-100px {
77+
.range-on-exit\/10px_100px {
7878
animation-range: exit 10px exit 100px
7979
}
80-
.range\/10px-100px {
80+
.range\/10px_100px {
8181
animation-range: cover 10px cover 100px
8282
}
8383
@supports not (animation-range: cover) {

0 commit comments

Comments
 (0)