You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

remark-responsive-tables

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-responsive-tables

Creates a responsibe table by extracting `thead` titles and injecting them into each `tbody` row, those are hidded by default on desktop with CSS and displayed on mobile.

1.0.0
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

remark-responsible-tables

Creates a responsibe table by extracting thead titles and injecting them into each tbody row, those are hidded by default on desktop with CSS and displayed on mobile.

Options

classnames (required) Object

Classnames for each element:

  • title: thead titles
  • description: Second column description
  • content: Element that encapsulates description shown on mobile
  • mobile: Media query class for mobile
  • description: Media query class for desktop
{
  'title': 'title',
  'description': 'description',
  'content': 'content',
  'mobile': 'mobile',
  'desktop': 'desktop'
}

Example

Mobile

image

Desktop

image

Code

Options

{
  'classnames': {
    'title': 'title',
    'description': 'description',
    'content': 'content',
    'mobile': 'mobile',
    'desktop': 'desktop'
  }
}
thead {
  display: none;

  /* Mobile */
   {
    display: table-header-group;
  }
}

td {
  display: flex;
  flex-basis: 100%;
  align-self: stretch;

  /* Mobile */
   {
    display: table-cell;
  }
}

.titles {
  display: flex;
  flex-direction: column;
  justify-content: baseline;

  /* Mobile */
   {
    display: none;
  }
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: baseline;
}

.description.desktop {
  display: none;

  /* Mobile */
   {
    display: block;
  }
}

.description.mobile {
  /* Mobile */
   {
    display: none;
  }
}

FAQs

Package last updated on 24 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts