Giter VIP home page Giter VIP logo

responsive-table's Introduction

responsive-table

A CSS Grid Responsive Table Experiment

Just a personal experiment with CSS Grid to achieve something that, in theory, should work.

Results

I remember it would have been possible to use one grid for this thing, but the main issue seems to be the dropping of subgrid from the spec and moving it to level 2. So we can do this in a few ways:

  • Use a full <table><tr><td> for large views
    • Set table to display: block;, tr to display: grid;. We can turn tr to a card for smaller view.
  • Use one grid for large views but group each row using div (like tr) and set them to display: contents;.
    • For smaller view, set those grouping divs to display: grid;.
  • Use named zones for the whole grid. Something like: grid-template-areas: repeat(8, "Name Cores Threads Clockspeed Turbospeed TDP Price");
    • Since it doesn't support repeat, so we can just loop it in js and add row numbers to the zone names. This will work really nicely, but a bit of hassle to set up. Lastly, can't be done without js.
  • The best way. Use subgrid. However, as of now, only latest FF has implemented it.

TBD

  • Implement all these methods for comparison.

responsive-table's People

Contributors

crimsonvspurple avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.