I’ve a grid I want to occupy all the available space.
I used
smart-grid {
width: 100%;
height: auto
}
and it works (also setting width: auto).
In the grid I’ve many columns (but I don’t know how many, a priori) some of them (3 in fact) occupies defined space (say 10%) the others should divide the remaining space.
Smart UI allows defining each column’s width explicitly. You can mix:
%-based widths (relative to grid width)
auto (for content-based sizing)
Leave width undefined → grid will auto-distribute
Since you don’t know the total number of dynamic columns, use logic in JavaScript/TypeScript to calculate the remaining width and apply it evenly to the dynamic columns.
“@tbettinazzi@axioma I’ve handled similar cases by setting fixed widths for the known columns and then using <code data-start=”169″ data-end=”180″>flex-grow in CSS for the dynamic ones so they share leftover space. Or like Markov said, calculate the widths in JS and assign them. Depends how precise you need it. Good luck!”