Skip to content

Commit e01546a

Browse files
author
Fred Heusschen
committed
animation -> ease
1 parent f633a58 commit e01546a

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

dist/mburger/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ const template = document.createElement('template');
1414
template.innerHTML = `
1515
<style>*,:host{box-sizing:border-box}
1616
:host{--mb-bar-width:30px;--mb-bar-height:3px;--mb-bar-spacing:7px;--mb-animation-function:ease;--mb-animation-duration:0.25s;--mb-animation-delay:0s;display:inline-flex;align-items:center;gap:.75em;padding:0;margin:0;font-size:inherit;color:inherit;border:unset;background:0 0;cursor:pointer}
17-
:host([animation=elastic]){--mb-animation-function:cubic-bezier(.5,-0.35,.35,1.5);--mb-animation-duration:0.35s}
18-
:host([animation=funky]){--mb-animation-function:cubic-bezier(0,1.45,.5,1.45);--mb-animation-duration:0.4s}
19-
:host([animation=shaky]){--mb-animation-function:cubic-bezier(.15,.33,1,-0.81);--mb-animation-function:cubic-bezier(0,.5,1,-1);--mb-animation-duration:0.45s}
17+
:host([ease=elastic]){--mb-animation-function:cubic-bezier(.5,-0.35,.35,1.5);--mb-animation-duration:0.35s}
18+
:host([ease=funky]){--mb-animation-function:cubic-bezier(0,1.45,.5,1.45);--mb-animation-duration:0.4s}
19+
:host([ease=shaky]){--mb-animation-function:cubic-bezier(.15,.33,1,-0.81);--mb-animation-function:cubic-bezier(0,.5,1,-1);--mb-animation-duration:0.45s}
2020
[part=bars]{position:relative;display:block;width:var(--mb-bar-width);height:calc(var(--mb-bar-height) * 3 + var(--mb-bar-spacing) * 2)}
2121
.bar{display:block;position:absolute;left:0;right:0;height:var(--mb-bar-height);border-radius:calc(var(--mb-bar-height)/ 2);background:currentColor;color:inherit;opacity:1;transition:none var(--mb-animation-duration) var(--mb-animation-function) var(--mb-animation-delay)}
2222
.bar--top{bottom:calc(50% + var(--mb-bar-spacing) + var(--mb-bar-height)/ 2);transition-property:bottom,transform}

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h1>mburger</h1>
3838

3939
<br />
4040
<p>Choose an animation for the examples:</p>
41-
<select id="animation">
41+
<select id="ease">
4242
<option value="ease">Ease (default)</option>
4343
<option value="elastic">Elastic</option>
4444
<option value="funky">Funky</option>
@@ -124,10 +124,10 @@ <h1>mburger</h1>
124124

125125
<script>
126126
const burgers = document.querySelectorAll("mm-burger");
127-
const select = document.querySelector("#animation");
127+
const select = document.querySelector("#ease");
128128
select.addEventListener("change", () => {
129129
burgers.forEach((burger) => {
130-
burger.setAttribute("animation", select.value);
130+
burger.setAttribute("ease", select.value);
131131
});
132132
});
133133
</script>

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mburger-webcomponent",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"main": "dist/mburger/index.js",
55
"module": "dist/mburger/index.js",
66
"author": "Fred Heusschen <info@mmenujs.com>",

src/mburger/css/_index.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@
3434
cursor: pointer;
3535
}
3636

37-
:host([animation="elastic"]) {
37+
:host([ease="elastic"]) {
3838
--mb-animation-function: cubic-bezier(.5,-0.35,.35,1.5);
3939
--mb-animation-duration: 0.35s;
4040
}
4141

42-
:host([animation="funky"]) {
42+
:host([ease="funky"]) {
4343
--mb-animation-function: cubic-bezier(0,1.45,.5,1.45);
4444
--mb-animation-duration: 0.4s;
4545
}
4646

47-
:host([animation="shaky"]) {
47+
:host([ease="shaky"]) {
4848
--mb-animation-function: cubic-bezier(.15,.33,1,-0.81);
4949
--mb-animation-function: cubic-bezier(0,.5,1,-1);
5050
--mb-animation-duration: 0.45s;

0 commit comments

Comments
 (0)