diff --git a/vue/src/components/IngredientComponent.vue b/vue/src/components/IngredientComponent.vue index 3b56f02b..dd214700 100644 --- a/vue/src/components/IngredientComponent.vue +++ b/vue/src/components/IngredientComponent.vue @@ -1,52 +1,41 @@ diff --git a/vue/src/utils/utils.js b/vue/src/utils/utils.js index 00cc3735..b4fb2e2e 100644 --- a/vue/src/utils/utils.js +++ b/vue/src/utils/utils.js @@ -317,6 +317,10 @@ export function calculateAmount(amount, factor) { } } +export function escapeCSS(classname) { + return classname.replace(/\s+/g, "-").toLowerCase() +} + export function roundDecimals(num) { let decimals = getUserPreference("user_fractions") ? getUserPreference("user_fractions") : 2 return +(Math.round(num + `e+${decimals}`) + `e-${decimals}`) @@ -748,4 +752,4 @@ export const formFunctions = { } return form }, -} +} \ No newline at end of file