Baseweb: [Styling] Longhand CSS attributes not used consistently for borders

Created on 3 Apr 2020  路  7Comments  路  Source: uber/baseweb


Current Behavior

Non-longhand border styles are used in many components, instead of border[Left/Right/Top/Bottom][Style/Width/Color] border[Left/Right/Top/Bottom] or border[Style/Width/Color] is used instead. This can cause styling errors when overriding.

Expected Behavior

Longhand styles should be used at all times.

  • [ x] I have searched the issues of this repository and believe that this is not a duplicate.

Here is a list of all the border[Top/Left/Right/Bottom] by searching the repo. There are also many cases of border[Style/Width/Color] that I haven't listed but also should probably be fixed.

Components:

Tests:

Docs:

bug enhancement

All 7 comments

@jasongi-actu thank you for the thorough list! any chance you could help us send PRs fixing these?

I can if I can find time, however wondering what the best way to do this would be since technically it could be a (minor?) breaking change - as people who have encountered the warnings would probably have used the shorthand styles, so when they upgrade baseweb they may get warning for the shorthand styles and it will mess up their styling.

historically, we just went ahead and fixed these issues - what's your take on this @chasestarr @sandgraham @tajo @nadiia ?

We ask people to always use longhand properties so fixing this should not be considered as a breaking change.

Also for the tests and docs, it's ok to use shorthands. Those are our internal components, not a part of baseui.

@jasongi-actu in lights of Vojtech's comment, can you help us open a PR for this?

@jasongi-actu in lights of Vojtech's comment, can you help us open a PR for this?

Have had a crack at this today
https://github.com/uber/baseweb/pull/3172

Was this page helpful?
0 / 5 - 0 ratings