Make border methods always require an explicit width (#11450)

This PR makes the `border` methods require an explicit width instead of
defaulting to 1px.

This breaks convention with Tailwind, but it makes GPUI more consistent
with itself. We already have an edge case where the parameterized method
had to be named `border_width`, since `border` was taken up by an alias
for the 1px variant.

### Before

```rs
div()
    .border()
    .border_t()
    .border_r()
    .border_b()
    .border_l()
    .border_width(px(7.))
```

### After

```rs
div()
    .border_1()
    .border_t_1()
    .border_r_1()
    .border_b_1()
    .border_l_1()
    .border(px(7.))
```

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-05-06 13:22:47 -04:00 committed by GitHub
parent f99b24acca
commit f658af5903
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 49 additions and 55 deletions

View file

@ -88,7 +88,7 @@ impl RenderOnce for StoryContainer {
.justify_between()
.p_2()
.bg(story_color().background)
.border_b()
.border_b_1()
.border_color(story_color().border)
.child(Story::title(self.title))
.child(
@ -145,7 +145,7 @@ impl Story {
.flex()
.justify_between()
.p_2()
.border_b()
.border_b_1()
.border_color(story_color().border)
.child(Story::title_for::<T>())
.child(
@ -202,7 +202,7 @@ impl Story {
div()
.p_4()
.m_4()
.border()
.border_1()
.border_color(story_color().border)
}
@ -307,7 +307,7 @@ impl RenderOnce for StoryItem {
div()
.rounded_md()
.bg(story_color().card_background)
.border()
.border_1()
.border_color(story_color().border)
.py_1()
.px_2()