Tachyons: Setting a border style for one side only

Created on 19 Jul 2017  路  2Comments  路  Source: tachyons-css/tachyons

To get a bottom border, and only a bottom border I use the following class:

bb

When I add a border style:

bb b--dashed

I expect to only style the bottom border, but what happens is that when I add the b--dashed class borders are added to all four sides.

Is this a bug or am I making a mistake somewhere?

Most helpful comment

@mrmrs I am really sorry that t I didn't see the border resets. I appreciate you getting back to me so quickly though.

For anyone's future reference this is what I did and it worked:

span.bb.b--dashed.br-0.bl-0.bt-0.fw5

Note: the above is written in slim.

All 2 comments

Nope that's unfortunately how it works. You need to explicitly remove the border on the other sides. It probably seems like this is poor design on Tachyons part - but it's actually tough to come up with a truly composable system when it comes to border styles due to the css spec. Apologies for the confusion.

@mrmrs I am really sorry that t I didn't see the border resets. I appreciate you getting back to me so quickly though.

For anyone's future reference this is what I did and it worked:

span.bb.b--dashed.br-0.bl-0.bt-0.fw5

Note: the above is written in slim.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

j-greig picture j-greig  路  3Comments

indiesquidge picture indiesquidge  路  6Comments

overlandandseas picture overlandandseas  路  3Comments

rolfen picture rolfen  路  7Comments

Alexgalinier picture Alexgalinier  路  4Comments