Overview
Source: ./src/fragments/border-radius/OCBorderRadiusV1.mdx
Border radius
The border-radius utility provides CSS classes for rounded corners in consistent steps.
Skip to:
Class naming convention
Classes use the format {prefix}-{property}-{size}.
| Element | Description |
|---|---|
prefix |
Always oc for OTTO Components |
property |
br for border-radius |
size |
One of 25, 50, 100, 200 |
For example, oc-br-100 applies a border-radius of 8px.
Sizes
The following classes are available and map to these border-radius values:
| Class | Border radius |
|---|---|
oc-br-0 |
0rem |
oc-br-25 |
0.125rem |
oc-br-50 |
0.25rem |
oc-br-100 |
0.5rem |
oc-br-150 |
0.75rem |
oc-br-200 |
1rem |
oc-br-250 |
1.25rem |
oc-br-300 |
1.5rem |
Usage guidelines
Add the appropriate CSS class to any element to apply the desired border radius.
For example, to apply an 8px border radius, use the oc-br-100 class:
<div class="oc-br-100">
<!-- Content with 8px border radius -->
</div>
Find all usage examples in the Border radius demo.
Accessibility
See the accessibility documentation for general guidelines on making your content accessible.
Border radius (OCBorderRadiusV1.stories.ts)
Demo: Border radius
Story: fragments-border-radius--border-radius · tags:
Story source (TypeScript, verbatim from Storybook)
{
name: "Demo: Border radius",
render: allBorderRadius
}