Skip to content

Commit c06c45f

Browse files
authored
Fix CSS typos, wrong border classes, swapped docs, and Gettext template bug (#468)
- overlay.eex: Add missing `/` and space in natural color opacity class - tooltip.eex: Fix double hyphen `natural--bordered` → `natural-bordered` - radio_card.eex: Fix double hyphen `info--bordered` → `info-bordered` - blockquote.eex: Fix wrong border direction for "small"+"right" (`border-s-2` → `border-e-2`) - banner.eex: Fix extra_small bottom border (`border` → `border-b`) - password_field.eex: Fix Gettext module in translate_error (`@module` → `inspect(@web_module)`) - footer.eex: Replace tab character with space in maximum_width CSS class - gallery.eex: Fix cyclically swapped doc strings for gap/animation/animation_size attrs
1 parent 96a7893 commit c06c45f

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

priv/components/banner.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ defmodule <%= @module %> do
371371
defp border_class("large", "top", _), do: "border-b-4"
372372
defp border_class("extra_large", "top", _), do: "border-b-[5px]"
373373

374-
defp border_class("extra_small", "bottom", _), do: "border"
374+
defp border_class("extra_small", "bottom", _), do: "border-b"
375375
defp border_class("small", "bottom", _), do: "border-b-2"
376376
defp border_class("medium", "bottom", _), do: "border-b-[3px]"
377377
defp border_class("large", "bottom", _), do: "border-b-4"

priv/components/blockquote.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ defmodule <%= @module %> do
249249
defp border_class("small", position, _) do
250250
[
251251
position == "left" && "border-s-2",
252-
position == "right" && "border-s-2",
252+
position == "right" && "border-e-2",
253253
position == "full" && "border-2"
254254
]
255255
end

priv/components/footer.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ defmodule <%= @module %> do
166166
<% end %>
167167
defp space_class(params) when is_binary(params), do: params
168168

169-
defp maximum_width("extra_small"), do: "[&>div]:max-w-3xl [&>div]:mx-auto"
169+
defp maximum_width("extra_small"), do: "[&>div]:max-w-3xl [&>div]:mx-auto"
170170
defp maximum_width("small"), do: "[&>div]:max-w-4xl [&>div]:mx-auto"
171171
defp maximum_width("medium"), do: "[&>div]:max-w-5xl [&>div]:mx-auto"
172172
defp maximum_width("large"), do: "[&>div]:max-w-6xl [&>div]:mx-auto"

priv/components/gallery.eex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ defmodule <%= @module %> do
5656
attr :type, :string, values: ["default", "masonry", "featured"], default: "default", doc: ""
5757
attr :class, :any, default: nil, doc: "Custom CSS class for additional styling"
5858
attr :cols, :string, default: "", doc: "Determines cols of elements"
59-
attr :gap, :string, default: "", doc: "Determines animation type for gallery items"
60-
attr :animation, :string, default: "", doc: "Determines animation intensity/size"
61-
attr :animation_size, :string, default: "extra_small", doc: "Determines gap between elements"
59+
attr :gap, :string, default: "", doc: "Determines gap between elements"
60+
attr :animation, :string, default: "", doc: "Determines animation type for gallery items"
61+
attr :animation_size, :string, default: "extra_small", doc: "Determines animation intensity/size"
6262

6363
attr :rest, :global,
6464
doc:

priv/components/overlay.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ defmodule <%= @module %> do
9494
<% end %>
9595
<%= if is_nil(@color) or "natural" in @color do %>
9696
defp color_class("natural") do
97-
["bg-natural-light[var(--overlay-opacity)]dark:bg-natural-dark/[var(--overlay-opacity)]"]
97+
["bg-natural-light/[var(--overlay-opacity)] dark:bg-natural-dark/[var(--overlay-opacity)]"]
9898
end
9999
<% end %>
100100
<%= if is_nil(@color) or "primary" in @color do %>

priv/components/password_field.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ defmodule <%= @module %> do
11681168
if count = opts[:count] do
11691169
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
11701170
else
1171-
Gettext.dgettext(<%= @module %>.Gettext, "errors", msg, opts)
1171+
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
11721172
end
11731173
end
11741174
end

priv/components/radio_card.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ defmodule <%= @module %> do
874874
"text-info-bordered-text-light border-info-bordered-text-light bg-info-bordered-bg-light",
875875
"dark:text-info-hover-dark dark:border-info-hover-dark dark:bg-info-bordered-bg-dark",
876876
"[&_.radio-card-input]:checked:accent-info-bordered-text-light",
877-
"dark:[&_.radio-card-input]:checked:accent-info--bordered-text-dark",
877+
"dark:[&_.radio-card-input]:checked:accent-info-bordered-text-dark",
878878
"[&_.radio-card-input]:border-info-bordered-text-light dark:[&_.radio-card-input]:border-info-bordered-text-dark",
879879
"has-[:checked]:border-info-indicator-alt-light dark:has-[:checked]:border-info-indicator-dark",
880880
"has-[:checked]:bg-[var(--color-info-gradient-indicator-dark)] dark:has-[:checked]:bg-info-indicator-alt-light"

priv/components/tooltip.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ import Phoenix.LiveView.Utils, only: [random_id: 0]
547547
defp color_variant("bordered", "natural") do
548548
[
549549
"text-natural-bordered-text-light border-natural-bordered-text-light bg-natural-bordered-bg-light",
550-
"dark:text-natural-bordered-text-dark dark:border-natural--bordered-text-dark dark:bg-natural-bordered-bg-dark"
550+
"dark:text-natural-bordered-text-dark dark:border-natural-bordered-text-dark dark:bg-natural-bordered-bg-dark"
551551
]
552552
end
553553
<% end %>

0 commit comments

Comments
 (0)