Hello,
Reading the site of www.cssgrid.net , I thought, wouldnt it be nice if we had a class, probably extending Layout, that does similar work (ie. compiles to something similar).
Then, it would be working as responsive design. There might be some caveats when it comes to implementing this, but I thought it was a nice thing to have.
The API might look something like:
Responsive design is kind of growing as a technique (or whatever u wanna call it), making one design for mobile AND web.
I wonder what your thoughts are, and would love to hear other ideas regarding this!
Reading the site of www.cssgrid.net , I thought, wouldnt it be nice if we had a class, probably extending Layout, that does similar work (ie. compiles to something similar).
Then, it would be working as responsive design. There might be some caveats when it comes to implementing this, but I thought it was a nice thing to have.
The API might look something like:
Code:
ResponsiveGridLayout panel = new ResponsiveGridLayout(12); //ie. 12 columns, like on cssgrid.net panel.addRow(); //adds row with index 0 panel.addMember(0, myWidget, ResponsiveGridColumn.THREE); //adds myWidget to row 0, with a width of THREE. panel.addMember(0, myWidget2, ResponsiveGridColumn.THREE); //adds myWidget to row 0, with a width of THREE. panel.addMember(0, myWidget3, ResponsiveGridColumn.THREE); //adds myWidget to row 0, with a width of THREE. panel.addMember(0, myWidget4, ResponsiveGridColumn.THREE); //adds myWidget to row 0, with a width of THREE. // the idea is that each element in the row adds up to 12 (=constructor parameter), // here we have 4 columns of width 'THREE', making twelve.
I wonder what your thoughts are, and would love to hear other ideas regarding this!
Comment