CSS grid/layout framework with focus on fixed elements and single page full screen layouts

后端 未结 9 1504
予麋鹿
予麋鹿 2021-02-09 22:05

Rule of thumb - if you\'re messing with CSS too much in your layouts, switch to a framework. I\'ve been going over the dozens of grid/layout frameworks out there and most of the

9条回答
  •  隐瞒了意图╮
    2021-02-09 23:04

    Disclosure: I'm the OP and I'm tossing an idea to get the general response.

    There's no need for a specialized framework because you can use TABLES for that.

    Yes, I'm talking about the widely avoided area of

    for layouts. It's common knowledge that tables should be avoided for layout. I tried to go over the reasons mentioned here: Why not use tables for layout in HTML?

    It seems to me that most reasons aren't valid in this case (SPA):

    Separation of content from layout - Since an SPA is not really content (it's just a skeleton with AJAX filled data), this argument doesn't apply. This is just an interface, I don't expect Google to index it.

    Tables are less maintainable - Not in this case. The CSS hell you have to go through to implement this with divs is much less maintainable.

    Tables are slower to render - Of course, but we want a complex layout that requires more calculations to render. Heck, we usually compensate with JS resize events. It would be much efficient for the browser to do this natively inside the render engine.

    提交回复
    热议问题