Skip to content

Commit 160e579

Browse files
committed
Add tableBodyBorder option
1 parent 384f5d1 commit 160e579

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ plugins: [
121121
tableBorderColor: '#dee2e6', // default: #dee2e6
122122
tableStripedBackgroundColor: 'rgba(0,0,0,.05)', // default: rgba(0,0,0,.05)
123123
tableHoverBackgroundColor: 'rgba(0,0,0,.075)', // default: rgba(0,0,0,.075)
124+
tableBodyBorder: true, // default: true. If set to false, borders for the table body will be removed. Only works for normal tables (i.e. does not apply to .table-bordered)
124125
}),
125126
],
126127
```

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ module.exports = function (options) {
3030
? '1px solid ' + options.tableBorderColor
3131
: '1px solid #dee2e6',
3232
},
33+
'td': {
34+
borderTop: optionsWithPropertyExists(options, 'tableBodyBorder') && options.tableBodyBorder == false
35+
? 0
36+
: optionsWithPropertyExists(options, 'tableBorderColor')
37+
? '1px solid ' + options.tableBorderColor
38+
: '1px solid #dee2e6',
39+
},
3340
'thead th': {
3441
verticalAlign: 'bottom',
3542
borderBottom: optionsWithPropertyExists(options, 'tableBorderColor')

0 commit comments

Comments
 (0)