Skip to content

Commit 527b0b9

Browse files
author
Adam Argyle
authored
small updates
1 parent caf88f1 commit 527b0b9

1 file changed

Lines changed: 19 additions & 14 deletions

File tree

README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,24 @@
1818
#### Installation
1919
**NPM**
2020
1. `npm i transition-style`
21-
2. `@import "transition-style";` in your CSS or `import 'transition-style';` in your Javascript
21+
2. `@import "transition-style";` from CSS
22+
3. or `import 'transition-style';` from JS
2223

2324
<br>
2425

2526
**CDN**
26-
**Latest** at `https://unpkg.com/transition-style`
27-
28-
Or import **individual category bundles**
29-
- `https://unpkg.com/transition-style/transition.circles.min.css`
30-
- `https://unpkg.com/transition-style/transition.squares.min.css`
31-
- `https://unpkg.com/transition-style/transition.polygons.min.css`
32-
- `https://unpkg.com/transition-style/transition.wipes.min.css`
33-
34-
Or go a **slim & custom** route by importing the `hackpack`
35-
- `https://unpkg.com/transition-style/transition.hackpack.min.css`
36-
- It's just the custom props. Build [custom](#custom) `@keyframe` animations with them.
27+
**Latest:** `https://unpkg.com/transition-style`
28+
**Individual Category Bundles**
29+
- Circles: `https://unpkg.com/transition-style/transition.circles.min.css`
30+
- Squares: `https://unpkg.com/transition-style/transition.squares.min.css`
31+
- Polygons: `https://unpkg.com/transition-style/transition.polygons.min.css`
32+
- Wipes: `https://unpkg.com/transition-style/transition.wipes.min.css`
33+
34+
**THE HACKPACK** `https://unpkg.com/transition-style/transition.hackpack.min.css`
35+
ONLY the custom properties and a few base styles. **More options, more control, smaller import.**
36+
Build [custom](#custom) `@keyframe` animations with them and much more. Make multi-part transitions
37+
that aren't just from and to. You can even break away from the use of attributes and make your own BEM class convention.
38+
Grab the reigns, grab the hackpack.
3739

3840
> Custom properties ship with each `.min.css` as well
3941
@@ -54,6 +56,8 @@ After `transition.css` has been added to your project, add an attribute to an el
5456

5557
> if nothing is happening when using the attributes, it's likely `transition.css` has not loaded
5658
59+
Attributes were chosen as the default so there's no question which transition is active. **There can be only 1 at a time.** With classes, for example, what happens when multiple "transition in" classes are applied to an element? Transition.css chooses to default with a state machine approach. See the [custom](#custom) section below for ways to use classes and/or the custom properties, so transition.css can fit into your development environment. It's very flexible, the built in attribute based approach is very easy to hack and customize.
60+
5761
Transition.css is very similar to [animate.css](https://animate.style). The docs they've made are excellent and show many examples of advanced usage of libraries like this. You'll notice `transition.css` is very inspired by `animate.css`.
5862

5963
<br><br>
@@ -73,16 +77,17 @@ Most of the built in transitions are from the center. Here's how you can set the
7377
}
7478
}
7579

76-
[transition="in:custom:circle-swoop"] {
80+
.--in-custom {
7781
--transition__duration: 1s;
82+
--transition__easing: ease-in-out;
7883
animation-name: circle-swoop;
7984
}
8085
```
8186

8287
Then, in the HTML:
8388

8489
```html
85-
<div transition="in:custom:circle-swoop">
90+
<div class="... --in-custom">
8691
A custom transitioned element
8792
</div>
8893
```

0 commit comments

Comments
 (0)