-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(checkbox): Add initial checkbox implementation (#4638)
* feat(animation): Clean up mdl-animation, add README * feat(checkbox): Add initial checkbox implementation This commit converts the checkbox POC code over to the new architecture, adds unit tests, and ports the demos over to working implementations. It also adds a README, and modifies .stylelintrc.yaml to increase the number of compound selectors we can use. Note that ink ripple functionality will be covered in a separate issue. Finishes #4471 [Delivers #126819487]
- Loading branch information
1 parent
1df786a
commit 5bbe467
Showing
16 changed files
with
1,473 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# NOTE: Not currently functional. | ||
|
||
We've recently [changed our architecture]() such that these examples are outdated and probably don't | ||
work. We will fix them up before our beta release, as things may still change until then. | ||
|
||
Working framework examples for v2 can be found on our [POC branch](https://github.com/google/material-design-lite/tree/experimental/v2-architecture-poc/examples). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# mdl-animation | ||
|
||
mdl-animation is a sass / css library which provides variables, mixins, and classes for Material Design animation, based off of the [motion guidelines](https://material.google.com/motion/duration-easing.html#duration-easing-common-durations). Currently, it only covers easing curves. | ||
|
||
## Installation | ||
|
||
> Note: Installation via the npm registry will be available after alpha. | ||
## Usage | ||
|
||
We currently have variables for the following 3 animation curves: | ||
|
||
| Variable name | timing function | use case | | ||
| --- | --- | --- | | ||
| `$mdl-animation-fast-out-slow-in-timing-function` | `cubic-bezier(.4, 0, .2, 1)` | Standard curve; any animations that are visible from start to finish (e.g. a FAB transforming into a toolbar) | | ||
| `$mdl-animation-linear-out-slow-in-timing-function` | `cubic-bezier(0, 0, .2, 1)` | Animations that cause objects to enter the screen (e.g. a fade in) | | ||
| `$mdl-animation-fast-out-linear-in-timing-function` | `cubic-bezier(.4, 0, ``, 1)` | Animations that cause objects to leave the screen (e.g. a fade out) | | ||
|
||
### SCSS | ||
|
||
Simply drop `mdl-animation` into your build and start using the variables: | ||
|
||
```scss | ||
.mdl-thing--animating { | ||
animation: foo 175ms $mdl-animation-fast-out-slow-in-timing-function; | ||
} | ||
``` | ||
|
||
or the mixins, which simply assign their corresponding variables to the `animation-timing-function` | ||
property: | ||
|
||
```scss | ||
.mdl-thing--on-screen { | ||
@include mdl-animation-fast-out-linear-in; | ||
} | ||
``` | ||
|
||
Every mixin has the same name as its corresponding variable, without the `-timing-function` suffix. | ||
|
||
### CSS Classes | ||
|
||
> NOTE: dist/ will be available when installing via NPM. | ||
Alternatively, you can include the built stylesheet and use the classes it exports within your HTML | ||
|
||
```html | ||
<link href="path/to/mdl-animation/dist/mdl-animation.css" rel="stylesheet"> | ||
<!-- ... --> | ||
<div id="my-animating-div" class="mdl-animation-fast-out-slow-in">hi</div> | ||
``` | ||
|
||
CSS Classes have the exact same name as their mixin counterparts. | ||
|
||
### Overriding the default curves. | ||
|
||
All animation variables are marked with `!default`, thus they can be overridden should the need | ||
arise. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"name": "mdl-animation", | ||
"description": "Animation Variables and Mixins for Material Design", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"license": "Apache-2.0", | ||
"devDependencies": {} | ||
} |
Oops, something went wrong.