Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/assets/styles/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ body {
top: 10vh;
left: 0;
right: 0;
border-radius: .25rem;
border-radius: var(--border-radius);
box-shadow: black 0 .5rem 1.5rem -.8rem;

input[type='search'] {
Expand Down
12 changes: 10 additions & 2 deletions docs/pages/utilities/border.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ Use the `rounded` and `rounded-full` classes to control the border radius.
```

```css
.rounded { border-radius: .25rem; } /* 4px */
.rounded-full { border-radius: 9999px; }
.rounded { border-radius: var(--border-radius); }
.rounded-full { border-radius: 9999px; }
```

The border radius can be adjusted or even removed (setting it to `0`) by the corresponding custom property:

```css
:root {
--border-radius: .25rem; /* 4px */
}
```
2 changes: 2 additions & 0 deletions src/_config.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@
--shadow-inset: 0 2px .25rem 0 inset;
--shadow-float: 0 .25rem .75rem -.4rem;

/* Borders */
--border-radius: .25rem;
}
2 changes: 1 addition & 1 deletion src/_utilities.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Border */
.rounded {
border-radius: .25rem;
border-radius: var(--border-radius);
}
.rounded-full {
border-radius: 9999px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/_button.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ a.button {
align-items: center;
appearance: none;
background-color: var(--color-bg-accent);
border-radius: .25rem;
border-radius: var(--border-radius);
border: 0;
box-shadow: black var(--shadow-float);
box-sizing: border-box;
Expand Down
2 changes: 1 addition & 1 deletion src/components/_callout.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
padding: 1.5rem 2rem;
background-color: var(--color-bg-muted);
border-left: .25rem solid var(--color-text-muted);
border-radius: .25rem;
border-radius: var(--border-radius);

&.accent {
border-color: var(--color-accent);
Expand Down
2 changes: 1 addition & 1 deletion src/components/_input.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ select,

.affix {
display: inline-block;
border-radius: .25rem;
border-radius: var(--border-radius);
padding: .75rem 1rem;
font-size: .875rem;

Expand Down
10 changes: 5 additions & 5 deletions src/core/_form.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* <fieldset>, <legend> */
fieldset {
border-radius: .25rem;
border-radius: var(--border-radius);
border: 1px solid var(--color-border);
padding: 1rem;
display: flex;
Expand Down Expand Up @@ -63,7 +63,7 @@ input[type="datetime"],
input[type="datetime-local"],
textarea,
select {
border-radius: .25rem;
border-radius: var(--border-radius);
padding: .75rem 1rem;
font-size: .875rem;
}
Expand Down Expand Up @@ -94,7 +94,7 @@ input[type="radio"] {
}
}
input[type="checkbox"] {
border-radius: .25rem;
border-radius: var(--border-radius);
position: relative;
&::after {
border: 2px solid var(--color-bg-page);
Expand Down Expand Up @@ -166,7 +166,7 @@ input[type="range"] {
&::-moz-range-track {
border: 0;
background-color: var(--color-bg-base);
border-radius: .25rem;
border-radius: var(--border-radius);
box-shadow: var(--color-shadow) var(--shadow-inset);
height: .5rem;
padding: 1px 0;
Expand Down Expand Up @@ -216,7 +216,7 @@ input[type="reset"],
button {
appearance: none;
background-color: var(--color-bg-accent);
border-radius: .25rem;
border-radius: var(--border-radius);
border: 0;
box-shadow: black var(--shadow-float);
box-sizing: border-box;
Expand Down
4 changes: 2 additions & 2 deletions src/core/_misc.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ figure {
meter {
appearance: meter;
background: var(--color-bg-base);
border-radius: .25rem;
border-radius: var(--border-radius);
border: 0;
box-shadow: var(--color-shadow) var(--shadow-inset);
display: block;
Expand All @@ -71,7 +71,7 @@ meter {
&::-webkit-meter-bar,
&::-moz-meter-bar {
background: var(--color-accent);
border-radius: .25rem;
border-radius: var(--border-radius);
box-shadow: rgba(0, 0, 0, 0.30) 0 1px 1px 0;
}
&::-webkit-meter-optimum-value,
Expand Down
4 changes: 2 additions & 2 deletions src/core/_text.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ a {
color: var(--color-link);
text-underline-offset: 0;
transition: var(--transition-color), var(--transition-underline);
border-radius: .25rem;
border-radius: var(--border-radius);

&:hover, &:focus, &:focus-within {
color: var(--color-link-hover);
Expand Down Expand Up @@ -146,7 +146,7 @@ var {
code {
background: color-mix(in srgb, var(--color-border) 60%, transparent);
color: var(--color-text-em);
border-radius: .25rem;
border-radius: var(--border-radius);
font-family: var(--font-mono);
font-weight: 400;
font-size: .875em;
Expand Down