parent
69b8a27359
commit
9358f483af
2 changed files with 2 additions and 2 deletions
|
@ -103,7 +103,7 @@ defmodule MfmParser.Encoder do
|
||||||
{html_child, styles_child} = to_html_styles(node.children)
|
{html_child, styles_child} = to_html_styles(node.children)
|
||||||
|
|
||||||
{html <>
|
{html <>
|
||||||
"<span style=\"display: inline-block; font-size: 150%; animation: #{node.props.speed} linear 0s infinite normal both running mfm-tada;\">#{html_child}</span>",
|
"<span style=\"display: inline-block; font-size: 150%; animation: #{node.props.speed} linear 0s infinite normal both running tada;\">#{html_child}</span>",
|
||||||
styles ++
|
styles ++
|
||||||
[
|
[
|
||||||
"@keyframes tada { 0% { transform: scaleZ(1); } 10%, 20% { transform: scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg); } 30%, 50%, 70%, 90% { transform: scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg); } 40%, 60%, 80% { transform: scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg); } 100% { transform: scaleZ(1); }}"
|
"@keyframes tada { 0% { transform: scaleZ(1); } 10%, 20% { transform: scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg); } 30%, 50%, 70%, 90% { transform: scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg); } 40%, 60%, 80% { transform: scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg); } 100% { transform: scaleZ(1); }}"
|
||||||
|
|
|
@ -118,7 +118,7 @@ defmodule MfmParser.EncoderTest do
|
||||||
]
|
]
|
||||||
|
|
||||||
expected =
|
expected =
|
||||||
~s[<span style="display: inline-block; font-size: 150%; animation: 1s linear 0s infinite normal both running mfm-tada;">🍮</span>]
|
~s[<span style="display: inline-block; font-size: 150%; animation: 1s linear 0s infinite normal both running tada;">🍮</span>]
|
||||||
|
|
||||||
assert Encoder.to_html(input_tree) == expected
|
assert Encoder.to_html(input_tree) == expected
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue