Tailwindcss: Border Spacing

Created on 9 Feb 2018  路  6Comments  路  Source: tailwindlabs/tailwindcss

Hey,

I just wanted to ask if something related to "border-spacing" is planed?

The default table layout does include border-spacing: 2px which is kind of annoying since I wanted to add a bottom border after the table head.

With border-spacing 2:
bildschirmfoto 2018-02-09 um 23 37 21

With border-spacing 0:
bildschirmfoto 2018-02-09 um 23 37 51

See also: https://www.w3schools.com/cssref/pr_border-spacing.asp

Have a nice day,
Jordan

Most helpful comment

We have border collapse utilities now as of v0.6.0 馃憤

All 6 comments

+1

Default Border Spacing is a problem.
You cannot add a continuous background color to tables because of this.

See http://jsbin.com/soxeqat/edit?html,output

We're planning to add some table related utilities in the near future but in the mean time you can easily add your own utilities:

https://tailwindcss.com/docs/adding-new-utilities

Looking at getting some of this stuff added soon but quick question, do you actually want border-spacing: 0 or do you just need border-collapse: collapse? It would be nice to avoid adding another scale to the config file for border spacing if people really just care about removing border spacing altogether.

For the continuous background color problem, border-collapse: collapse would be enough of a solution. See: http://jsbin.com/culebiluca/2

@adamwathan Yeah border-collapse: collapse should be enough. I didn't knew about this css "command".

We have border collapse utilities now as of v0.6.0 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Quineone picture Quineone  路  3Comments

dbpolito picture dbpolito  路  3Comments

afuno picture afuno  路  3Comments

chintanbanugaria picture chintanbanugaria  路  3Comments

jvanbaarsen picture jvanbaarsen  路  3Comments