Skip to content

Border & Border Radius

Utility classes for borders and border radius. Both use semantic design tokens and support responsive variants.


Border

All Sides

ClassCSS
borderborder: 1px solid var(--color-border-light)
border-0border: 0
.border
.border-0

Individual Sides

ClassCSS
border-tborder-top: 1px solid var(--color-border-light)
border-bborder-bottom: 1px solid var(--color-border-light)
border-sborder-inline-start: 1px solid var(--color-border-light)
border-eborder-inline-end: 1px solid var(--color-border-light)

border-s and border-e use logical properties — they flip automatically in RTL layouts.

.border-t
.border-b
.border-s (inline-start)
.border-e (inline-end)

Border Colors

Apply to any element that already has a border:

ClassCSS variable
border-lightvar(--color-border-light)
border-mediumvar(--color-border-medium)
border-strongvar(--color-border-strong)
border-inversevar(--color-border-inverse)
.border-light
.border-medium
.border-strong
.border-inverse

Border Radius

ClassCSS variableValue
rounded-none0
rounded-xsvar(--radius-xs)0.125rem
rounded-smvar(--radius-sm)0.25rem
rounded-mdvar(--radius-md)0.375rem
rounded-lgvar(--radius-lg)0.5rem
rounded-xlvar(--radius-xl)0.75rem
rounded-2xlvar(--radius-2xl)1rem
rounded-3xlvar(--radius-3xl)1.5rem
rounded-fullvar(--radius-full)9999px
none
xs
sm
md
lg
xl
2xl
3xl
full

Combined Example

Item 1
Item 2
Item 3

Responsive Variants

All border and radius classes support breakpoint prefixes: sm:, md:, lg:, xl:, 2xl:.

html
<!-- No border on mobile, border from md up -->
<div class="md:border md:rounded-lg">Responsive card</div>

<!-- Square on mobile, rounded from sm up -->
<img class="rounded-none sm:rounded-full" src="avatar.jpg" />

SCSS

scss
@use '@grundtone/design-tokens/scss/lib' as gt;

.card {
  border: 1px solid gt.color('border-light');
  border-radius: gt.radius('md');
}