I have a product configurator where a user can enter values for a wall and the wall is displayed as a html element with a fixed with of 200px.
I have a SVG pattern file with a tile pattern. In reality the tiles are 16 x 16 cm in size. Now if the user enters a width of let us say either 160 cm or 320 cm, the svg pattern should fill the html element representing the wall, but one time it should be scaled so that it is repeated 10 times, one time so that it is repeated 20 times.
How can I make the background-scaling dynamic with only HTML, CSS, JS?
When I increase the width of the html element, the scaling of the pattern svg works nicely, but the size of the html element needs to stay fixed.
Hope anyone has any idea.