Skip to content

Commit

Permalink
Only replace utility classes with new sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
angelikatyborska committed Jul 17, 2024
1 parent 5feec52 commit 79d6183
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/bitstyles_phoenix/bitstyles.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ defmodule BitstylesPhoenix.Bitstyles do
class =
Enum.reduce(sizes_renaming, class, fn {new_size, old_size}, acc ->
acc
|> String.replace("margin-#{new_size}", "margin-#{old_size}")
|> String.replace("margin-neg-#{new_size}", "margin-neg-#{old_size}")
|> String.replace("padding-#{new_size}", "padding-#{old_size}")
|> String.replace("padding-neg-#{new_size}", "padding-neg-#{old_size}")
|> String.replace("gap-#{new_size}", "gap-#{old_size}")
|> String.replace("u-margin-#{new_size}", "u-margin-#{old_size}")
|> String.replace("u-margin-neg-#{new_size}", "u-margin-neg-#{old_size}")
|> String.replace("u-padding-#{new_size}", "u-padding-#{old_size}")
|> String.replace("u-padding-neg-#{new_size}", "u-padding-neg-#{old_size}")
|> String.replace("u-gap-#{new_size}", "u-gap-#{old_size}")
end)

class =
Expand Down

0 comments on commit 79d6183

Please sign in to comment.