CSS grid with variable columns in the form of a javascript library