My goal is to organize input elements on a grid based on user preferences. After researching, I stumbled upon CSS grids, which seem promising.
I am considering creating a CSS grid with r rows and c columns, then using JavaScript to assign input elements to specific cells based on a user-defined layout (using an object with input element IDs as keys and column-span pairs as values).
I'm unsure if this is the most effective solution or if there are better alternatives that don't rely on CSS grids. It seems like modifying CSS properties for each input element could be cumbersome. So my questions are: Is this approach suitable? Are there simpler or more efficient methods?
I work with plain JavaScript and Vue.js, in case that influences any suggestions (apologies for any vague wording, I am self-taught as a hobbyist developer).