Skip to content

Commit

Permalink
Remove noop Tailwind class 'transform' (#5857)
Browse files Browse the repository at this point in the history
* Remove noop Tailwind class 'transform'

Not needed since Tailwind v2.2, see:
- https://github.com/tailwindlabs/tailwindcss/blob/3.4/CHANGELOG.md#220---2021-06-17

* Format templates to match 'mix format'
  • Loading branch information
rhcarvalho committed Jul 9, 2024
1 parent 4c10bab commit 68b1cd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions installer/templates/phx_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
to: selector,
time: 300,
transition:
{"transition-all transform ease-out duration-300",
{"transition-all ease-out duration-300",
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
"opacity-100 translate-y-0 sm:scale-100"}
)
Expand All @@ -615,8 +615,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
to: selector,
time: 200,
transition:
{"transition-all transform ease-in duration-200",
"opacity-100 translate-y-0 sm:scale-100",
{"transition-all ease-in duration-200", "opacity-100 translate-y-0 sm:scale-100",
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}
)
end
Expand All @@ -627,7 +626,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
|> JS.show(
to: "##{id}-bg",
time: 300,
transition: {"transition-all transform ease-out duration-300", "opacity-0", "opacity-100"}
transition: {"transition-all ease-out duration-300", "opacity-0", "opacity-100"}
)
|> show("##{id}-container")
|> JS.add_class("overflow-hidden", to: "body")
Expand All @@ -638,7 +637,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
js
|> JS.hide(
to: "##{id}-bg",
transition: {"transition-all transform ease-in duration-200", "opacity-100", "opacity-0"}
transition: {"transition-all ease-in duration-200", "opacity-100", "opacity-0"}
)
|> hide("##{id}-container")
|> JS.hide(to: "##{id}", transition: {"block", "block", "hidden"})
Expand Down
9 changes: 4 additions & 5 deletions priv/templates/phx.gen.live/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
to: selector,
time: 300,
transition:
{"transition-all transform ease-out duration-300",
{"transition-all ease-out duration-300",
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
"opacity-100 translate-y-0 sm:scale-100"}
)
Expand All @@ -615,8 +615,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
to: selector,
time: 200,
transition:
{"transition-all transform ease-in duration-200",
"opacity-100 translate-y-0 sm:scale-100",
{"transition-all ease-in duration-200", "opacity-100 translate-y-0 sm:scale-100",
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}
)
end
Expand All @@ -627,7 +626,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
|> JS.show(
to: "##{id}-bg",
time: 300,
transition: {"transition-all transform ease-out duration-300", "opacity-0", "opacity-100"}
transition: {"transition-all ease-out duration-300", "opacity-0", "opacity-100"}
)
|> show("##{id}-container")
|> JS.add_class("overflow-hidden", to: "body")
Expand All @@ -638,7 +637,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
js
|> JS.hide(
to: "##{id}-bg",
transition: {"transition-all transform ease-in duration-200", "opacity-100", "opacity-0"}
transition: {"transition-all ease-in duration-200", "opacity-100", "opacity-0"}
)
|> hide("##{id}-container")
|> JS.hide(to: "##{id}", transition: {"block", "block", "hidden"})
Expand Down

0 comments on commit 68b1cd2

Please sign in to comment.