dees-domtools/ts/domtools.css.ts

9 lines
322 B
TypeScript
Raw Normal View History

2020-05-23 17:13:09 +00:00
export const cssGridColumns = (amountOfColumnsArg: number, gapSizeArg: number) => {
let returnString = ``;
for (let i = 0; i < amountOfColumnsArg; i++) {
2020-05-27 21:15:38 +00:00
returnString += ` calc((100%/${amountOfColumnsArg}) - (${gapSizeArg *
(amountOfColumnsArg - 1)}px/${amountOfColumnsArg}))`;
2020-05-23 17:13:09 +00:00
}
return returnString;
};