Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CSS transition duration in generators #5733

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions installer/templates/phx_web/components/core_components.ex
Expand Up @@ -605,7 +605,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
JS.show(js,
to: selector,
transition:
{"transition-all transform ease-out duration-300",
{"transition-all transform ease-out duration-200",
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
"opacity-100 translate-y-0 sm:scale-100"}
)
Expand All @@ -614,7 +614,6 @@ defmodule <%= @web_namespace %>.CoreComponents do
def hide(js \\ %JS{}, selector) do
JS.hide(js,
to: selector,
time: 200,
transition:
{"transition-all transform ease-in duration-200",
"opacity-100 translate-y-0 sm:scale-100",
Expand All @@ -627,7 +626,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
|> JS.show(to: "##{id}")
|> JS.show(
to: "##{id}-bg",
transition: {"transition-all transform ease-out duration-300", "opacity-0", "opacity-100"}
transition: {"transition-all transform ease-out duration-200", "opacity-0", "opacity-100"}
)
|> show("##{id}-container")
|> JS.add_class("overflow-hidden", to: "body")
Expand Down
5 changes: 2 additions & 3 deletions priv/templates/phx.gen.live/core_components.ex
Expand Up @@ -605,7 +605,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
JS.show(js,
to: selector,
transition:
{"transition-all transform ease-out duration-300",
{"transition-all transform ease-out duration-200",
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
"opacity-100 translate-y-0 sm:scale-100"}
)
Expand All @@ -614,7 +614,6 @@ defmodule <%= @web_namespace %>.CoreComponents do
def hide(js \\ %JS{}, selector) do
JS.hide(js,
to: selector,
time: 200,
transition:
{"transition-all transform ease-in duration-200",
"opacity-100 translate-y-0 sm:scale-100",
Expand All @@ -627,7 +626,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
|> JS.show(to: "##{id}")
|> JS.show(
to: "##{id}-bg",
transition: {"transition-all transform ease-out duration-300", "opacity-0", "opacity-100"}
transition: {"transition-all transform ease-out duration-200", "opacity-0", "opacity-100"}
)
|> show("##{id}-container")
|> JS.add_class("overflow-hidden", to: "body")
Expand Down