Skip to content

Commit

Permalink
[Documentation] Fix documentation mistake for border configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbarker committed Feb 11, 2025
1 parent e6e0cd5 commit d637e2a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ Clay_TextElementConfig {

`CLAY_TEXT_CONFIG(.textColor = {120, 120, 120, 255})`

Conventionally accepts `rgba` float values between 0 and 255, but interpretation is left up to the renderer and does not affect layout.
Uses [Clay_Color](#clay_color). Conventionally accepts `rgba` float values between 0 and 255, but interpretation is left up to the renderer and does not affect layout.

---

Expand Down Expand Up @@ -1352,6 +1352,14 @@ typedef struct Clay_BorderElementConfig

**Fields**

**`.color`** - `Clay_Color`

`CLAY({ .border = { .color = { 255, 0, 0, 255 } } })`

Uses [Clay_Color](#clay_color). Specifies the shared color for all borders configured by this element. Conventionally accepts `rgba` float values between 0 and 255, but interpretation is left up to the renderer and does not affect layout.

---

**`.width`** - `Clay_BorderWidth`

`CLAY({ .border = { .width = { .left = 2, .right = 10 } } })`
Expand All @@ -1370,12 +1378,6 @@ Configures the width and color of borders to be drawn between children. These bo

---

**`.color`** - `Clay_Color`

`CLAY({ .border = { .color = { 255, 0, 0, 255 } } })`

Defines the radius in pixels for the arc of border corners (`0` is square, `rectangle.width / 2` is circular). It is up to the renderer to decide how to interpolate between differing border widths and colors across shared corners.

**Examples**

```C
Expand Down

0 comments on commit d637e2a

Please sign in to comment.