MastorsCDN Table Classes Documentation


Table of Contents


This documentation outlines the structure, styling, and behavior of table-related classes provided by the mastorsCDN CSS library. Two primary table styles are supported: .table and .table-2, each with distinct features and optional modifiers.

1. .table Class

The .table class provides a simple, clean, and fully responsive table design with a dark header and alternating row colors.


Preview


Header 1 Header 2 Header 3
Row 1, Cell 1 Row 1, Cell 2 Row 1, Cell 3
Row 2, Cell 1 Row 2, Cell 2 Row 2, Cell 3

Structure




Styling


Usage Example


<table class="table">
  <thead>
    <tr>
      <th>Header 1</th>
      <th>Header 2</th>
      <th>Header 3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Row 1, Cell 1</td>
      <td>Row 1, Cell 2</td>
      <td>Row 1, Cell 3</td>
    </tr>
  </tbody>
</table>

2. .table-2 Class


The .table-2 class offers a more modern and customizable table design with scrollable options, hover effects, and additional modifiers.


Preview


Column 1 Column 2 Column 3
Data 1 Data 2 Data 3
Data 4 Data 5 Data 6

Structure




Styling


Modifiers


  1. .scroll-x:
  2. .scroll-y:
  3. .scroll-x.scroll-y:

  4. .border-all:
  5. .scale-1:

Scrollbar Styling



Responsive Behavior



Usage Example


<table class="table-2 border-all scroll-x scale-1">
  <thead>
    <tr>
      <th>Column 1</th>
      <th>Column 2</th>
      <th>Column 3</th>
      <th>Column 4</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Data 1</td>
      <td>Data 2</td>
      <td>Data 3</td>
      <td>Data 4</td>
    </tr>
  </tbody>
</table>

Key Differences Between .table and .table-2

Feature .table .table-2
Header Background Dark ($dark) Light gray (#eeeeee)
Border Collapse collapse separate
Row Hover Effect Lightens (#f8f8f8) Darkens (#e8ecef)
Modifiers None .scroll-x, .scroll-y, .border-all, .scale-1
Scrollbar Styling None Custom Webkit scrollbars
Responsive Design Basic Advanced (block display, touch scrolling)

Notes

This documentation provides a comprehensive guide to using the table classes in your mastorsCDN library.