picturepan2 / spectre

Spectre.css - A Lightweight, Responsive and Modern CSS Framework
https://picturepan2.github.io/spectre/
MIT License
11.31k stars 804 forks source link

Add top border to tables that do not have a <thead> element #656

Closed jviotti closed 1 year ago

jviotti commented 3 years ago

Consider a table without a thead, such as:

<table class="table">
  <tbody>
    <tr>
      <td>The Shawshank Redemption</td>
      <td>Crime, Drama</td>
      <td>14 October 1994</td>
    </tr>
    <tr>
      <td>The Godfather</td>
      <td>Crime, Drama</td>
      <td>24 March 1972</td>
    </tr>
    <tr>
      <td>Schindler's List</td>
      <td>Biography, Drama, History</td>
      <td>4 February 1994</td>
    </tr>
    <tr>
      <td>Se7en</td>
      <td>Crime, Drama, Mystery</td>
      <td>22 September 1995</td>
    </tr>
  </tbody>
</table>

In this case, Spectre will not add a border to the top row, as the corresponding CSS only defines bottom borders:

Screenshot 2020-12-16 at 11 51 38

This fix adds the top border if there is no thead element (i.e. tbody is the first child of the table).

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

jviotti commented 3 years ago

Hey @picturepan2, did you have time to look at this PR?

jviotti commented 1 year ago

Closing stale PRs...