mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 22:58:19 -05:00
use BEM classes
add class names for foods, units, keywords (not following BEM closely)
This commit is contained in:
@@ -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
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user