From 79d61830ab4585890d0711c0f34666e6dad0a1cc Mon Sep 17 00:00:00 2001 From: Angelika Tyborska Date: Mon, 8 Jul 2024 11:44:09 +0200 Subject: [PATCH] Only replace utility classes with new sizes --- lib/bitstyles_phoenix/bitstyles.ex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bitstyles_phoenix/bitstyles.ex b/lib/bitstyles_phoenix/bitstyles.ex index ab77164..2a50935 100644 --- a/lib/bitstyles_phoenix/bitstyles.ex +++ b/lib/bitstyles_phoenix/bitstyles.ex @@ -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 =