From 6709326a0ce570bbe4abdc6d83ab79d559781dce Mon Sep 17 00:00:00 2001 From: Philip Newcomer Date: Fri, 6 Apr 2018 14:22:12 -0400 Subject: [PATCH] Initial commit --- LICENSE | 21 +++++++++++++++++++++ README.md | 15 +++++++++++++++ package.json | 22 ++++++++++++++++++++++ src/bootstrap4-card-tables.scss | 31 +++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 package.json create mode 100644 src/bootstrap4-card-tables.scss diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6a1feb7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Philip Newcomer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f3f3691 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Bootstrap4 Card Tables + +*CSS for properly rendering tables inside of cards in Bootstrap 4* + +## Installation + +``` +npm install --save-dev bootstrap4-card-tables +``` + +## Usage + +```scss +@import "~bootstrap4-card-tables/src/bootstrap4-card-tables"; +``` diff --git a/package.json b/package.json new file mode 100644 index 0000000..9ee4cd4 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "bootstrap4-card-tables", + "version": "1.0.0", + "description": "CSS for properly rendering tables inside of cards in Bootstrap 4", + "repository": { + "type": "git", + "url": "git+https://github.com/philipnewcomer/bootstrap4-card-tables.git" + }, + "keywords": [ + "bootstrap", + "bootstrap4", + "bootstrap-4", + "card", + "table" + ], + "author": "Philip Newcomer", + "license": "MIT", + "bugs": { + "url": "https://github.com/philipnewcomer/bootstrap4-card-tables/issues" + }, + "homepage": "https://github.com/philipnewcomer/bootstrap4-card-tables#readme" +} diff --git a/src/bootstrap4-card-tables.scss b/src/bootstrap4-card-tables.scss new file mode 100644 index 0000000..f9fe4e0 --- /dev/null +++ b/src/bootstrap4-card-tables.scss @@ -0,0 +1,31 @@ +.card { + > .table { + border-right: 0; + border-bottom: 0; + border-left: 0; + margin-bottom: 0; + + td:first-child, + th:first-child { + border-left: 0; + } + + td:last-child, + th:last-child { + border-right: 0; + } + + tr:first-child td, + tr:first-child th { + border-top: 0; + } + + tr:last-child td { + border-bottom: 0; + } + } + + .card-header + .table { + border-top: 0; + } +}