Skip to content

Commit

Permalink
Add "border-collapse" and "border-separate" utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
reinink committed Jun 14, 2018
1 parent 9e218a2 commit d0d70b8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions __tests__/fixtures/tailwind-output.css
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,14 @@ table {
background-size: contain;
}

.border-collapse {
border-collapse: collapse;
}

.border-separate {
border-collapse: separate;
}

.border-transparent {
border-color: transparent;
}
Expand Down
1 change: 1 addition & 0 deletions defaultConfig.stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ module.exports = {
backgroundPosition: ['responsive'],
backgroundRepeat: ['responsive'],
backgroundSize: ['responsive'],
borderCollapse: [],
borderColors: ['responsive', 'hover'],
borderRadius: ['responsive'],
borderStyle: ['responsive'],
Expand Down
8 changes: 8 additions & 0 deletions src/generators/borderCollapse.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import defineClasses from '../util/defineClasses'

export default function() {
return defineClasses({
'border-collapse': { 'border-collapse': 'collapse' },
'border-separate': { 'border-collapse': 'separate' },
})
}
2 changes: 2 additions & 0 deletions src/utilityModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import backgroundColors from './generators/backgroundColors'
import backgroundPosition from './generators/backgroundPosition'
import backgroundRepeat from './generators/backgroundRepeat'
import backgroundSize from './generators/backgroundSize'
import borderCollapse from './generators/borderCollapse'
import borderColors from './generators/borderColors'
import borderRadius from './generators/borderRadius'
import borderStyle from './generators/borderStyle'
Expand Down Expand Up @@ -52,6 +53,7 @@ export default [
{ name: 'backgroundPosition', generator: backgroundPosition },
{ name: 'backgroundRepeat', generator: backgroundRepeat },
{ name: 'backgroundSize', generator: backgroundSize },
{ name: 'borderCollapse', generator: borderCollapse },
{ name: 'borderColors', generator: borderColors },
{ name: 'borderRadius', generator: borderRadius },
{ name: 'borderStyle', generator: borderStyle },
Expand Down

0 comments on commit d0d70b8

Please sign in to comment.