Skip to content

Commit 257d876

Browse files
coreyvickerybennypowersadamjohnson
authored
docs(border): update token descriptions (#178)
* Update token docs descriptions in border.yml Update token docs for border width to provide clearer guidance on usage and examples for LLMs. * docs: update border.yml * Update token descriptions in changeset * Revise border width descriptions in border.yml Updated border descriptions to clarify usage guidelines and recommendations for each border width. * docs: format descriptions * Refine border and radius descriptions in border.yml * Refactor descriptions for border tokens in YAML * Refine descriptions for border width and radius tokens * docs: Update .changeset/seven-ligers-rule.md Co-authored-by: Adam Johnson <adam.b.johnson1@gmail.com> * docs: reduce border token description char counts Key changes across all descriptions: - Removed "This token" preambles — descriptions now start with the action directly - Limited examples to 3 elements (e.g., "Button, Call to action, Card, Field, Table" → "Button, Card, or Field") - Replaced "It is recommended to apply this token to" → "Recommended for" - Replaced "leveraging" with direct language - Replaced verbose WCAG references ("as outlined by WCAG guidelines" → "per WCAG") - Removed filler like "a modern look and feel", "a little extra" - Fixed typo: $descrition → $description on the default token Assisted-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Benny Powers <web@bennypowers.com> Co-authored-by: Benny Powers - עם ישראל חי! <bennypowers@users.noreply.github.com> Co-authored-by: Adam Johnson <adam.b.johnson1@gmail.com>
1 parent a782b06 commit 257d876

File tree

2 files changed

+36
-7
lines changed

2 files changed

+36
-7
lines changed

.changeset/seven-ligers-rule.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rhds/tokens": patch
3+
---
4+
5+
Clarify use cases for `width` and `radius` tokens like `--rh-border-width-sm` and `--rh-border-radius-sharp`.

tokens/border.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,30 @@ border:
44
$extensions:
55
com.redhat.ux:
66
heading: Width
7+
78
sm:
89
$value: '{length.4xs}'
9-
$description: '1px border width; Example: Secondary CTA or Button'
10+
$description: >-
11+
Applies a 1px border width to at least 1 side of a container. This shall be the default width for all borders and
12+
lines. It should be used to establish baseline thickness or visual separation with a container or thin line. It must
13+
not be used for strong directional emphasis like indicating a selected state. Recommended for elements like Button,
14+
Card, or Field. Applying to all 4 sides at once is optional.
15+
1016
md:
1117
$value: '{length.3xs}'
12-
$description: '2px border width: Example: Alert'
18+
$description: >-
19+
Applies a 2px border width to at least 1 side of a container. It should be used to add emphasis or visual separation
20+
beyond a 1px border. Recommended for elements needing extra thickness like Alert or Progress stepper. It must be used
21+
to ensure hover, focus, and active states are discernible by more than color alone per WCAG. Applying to all 4 sides
22+
at once is optional.
23+
1324
lg:
1425
$value: '{length.2xs}'
15-
$description: '3px border width: Example: Expanded Accordion panel'
26+
$description: >-
27+
Applies a 3px border width to 1 side of a container. It should be used for strong directional emphasis like indicating
28+
a current page, expanded, or selected state. Recommended for elements needing heavy visual weight like Accordion,
29+
Navigation, or Tabs. It must also be used for the focus indicator border per WCAG. Except for the focus indicator, it
30+
should not be applied to all 4 sides at once.
1631
1732
radius:
1833
$extensions:
@@ -21,11 +36,20 @@ border:
2136

2237
sharp:
2338
$value: 0.0px
24-
$description: Border radius reset
39+
$description: >-
40+
This token resets the border radius of a container back to 0 or sharp. It must be applied to all 4 corners of a
41+
container at once.
42+
2543
default:
26-
$description: '3px border radius; Example: Card'
2744
$value: '{length.2xs}'
45+
$description: >-
46+
Applies a 3px border radius to at least 1 corner of a container. This shall be the default for all containers needing
47+
rounded corners. It should be used to soften a container's visual footprint. Recommended for elements with subtle
48+
rounded corners like Button, Card, or Dialog. It must be applied to all 4 corners of a container at once.
49+
2850
pill:
2951
$value: '{length.4xl}'
30-
$description: 'Pill border radius; Example: Label'
31-
52+
$description: >-
53+
Applies a 64px border radius to at least 1 corner of a container. It should be used for elements needing a circle or
54+
pill-shaped background like Avatar, Badge, or Switch. It may also be used for Hybrid style branding. Applying to all
55+
4 corners at once is optional. It may replace the default 3px radius when not all corners need the same value.

0 commit comments

Comments
 (0)