Skip to content

Commit dca2f93

Browse files
delvhsilverwind
andauthored
Unify border-radius behavior (#26770)
## Changes - no more hardcoded `border-radius`es (apart from `0`) - no more value inconsistencies - no more guessing what pixel value you should use - two new variables: - `--border-radius-medium` (for elements where the normal border radius does not suffice) - `--border-radius-circle` (for displaying circles) --------- Co-authored-by: silverwind <me@silverwind.io>
1 parent ac2f8c9 commit dca2f93

File tree

17 files changed

+41
-42
lines changed

17 files changed

+41
-42
lines changed

web_src/css/base.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
--checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z"></path></svg>');
1717
--octicon-chevron-right: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"></path></svg>');
1818
/* non-color variables */
19-
--border-radius: 0.28571429rem;
19+
--border-radius: 4px;
20+
--border-radius-medium: 6px;
21+
--border-radius-circle: 100%;
2022
--opacity-disabled: 0.55;
2123
--height-loading: 16rem;
2224
--tab-size: 4;
@@ -309,7 +311,7 @@ details summary > * {
309311

310312
progress {
311313
background: var(--color-secondary-dark-1);
312-
border-radius: 6px;
314+
border-radius: var(--border-radius);
313315
border: none;
314316
overflow: hidden;
315317
}
@@ -339,7 +341,7 @@ progress::-moz-progress-bar {
339341
::-webkit-scrollbar-thumb {
340342
box-shadow: inset 0 0 0 6px var(--color-primary);
341343
border: 2px solid transparent;
342-
border-radius: 5px !important;
344+
border-radius: var(--border-radius);
343345
}
344346

345347
::-webkit-scrollbar-thumb:window-inactive {
@@ -454,7 +456,7 @@ a.label,
454456

455457
.issue-title code {
456458
padding: 2px 4px;
457-
border-radius: 6px;
459+
border-radius: var(--border-radius-medium);
458460
background-color: var(--color-markup-code-block);
459461
}
460462

@@ -1510,7 +1512,7 @@ img.ui.avatar,
15101512
margin-left: 0.4em;
15111513
height: 0.67em;
15121514
width: 0.67em;
1513-
border-radius: 0.15em;
1515+
border-radius: var(--border-radius);
15141516
}
15151517

15161518
.attention-icon {
@@ -2013,7 +2015,7 @@ a.ui.basic.label:hover {
20132015

20142016
.color-icon {
20152017
display: inline-block;
2016-
border-radius: 100%;
2018+
border-radius: var(--border-radius-circle);
20172019
height: 14px;
20182020
width: 14px;
20192021
}

web_src/css/dashboard.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898

9999
.feeds code {
100100
padding: 2px 4px;
101-
border-radius: 3px;
101+
border-radius: var(--border-radius);
102102
background-color: var(--color-markup-code-block);
103103
word-break: break-all;
104104
}

web_src/css/editor/combomarkdowneditor.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ text-expander .suggestions {
8383
margin-top: 24px;
8484
list-style: none;
8585
background: var(--color-box-body);
86-
border-radius: 5px;
86+
border-radius: var(--border-radius);
8787
border: 1px solid var(--color-secondary);
8888
box-shadow: 0 .5rem 1rem var(--color-shadow);
8989
}
@@ -101,15 +101,15 @@ text-expander .suggestions li + li {
101101
}
102102

103103
text-expander .suggestions li:first-child {
104-
border-radius: 4px 4px 0 0;
104+
border-radius: var(--border-radius) var(--border-radius) 0 0;
105105
}
106106

107107
text-expander .suggestions li:last-child {
108-
border-radius: 0 0 4px 4px;
108+
border-radius: 0 0 var(--border-radius) var(--border-radius);
109109
}
110110

111111
text-expander .suggestions li:only-child {
112-
border-radius: 4px;
112+
border-radius: var(--border-radius);
113113
}
114114

115115
text-expander .suggestions li:hover {

web_src/css/features/codeeditor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@
4444
position: absolute !important;
4545
resize: none !important;
4646
overflow: hidden !important;
47-
border-radius: 4px !important;
47+
border-radius: var(--border-radius-medium) !important;
4848
}

web_src/css/features/console.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
background: var(--color-console-bg);
55
color: var(--color-console-fg);
66
font-family: var(--fonts-monospace);
7-
border-radius: 5px;
7+
border-radius: var(--border-radius);
88
word-break: break-word;
99
overflow-wrap: break-word;
1010
}

web_src/css/features/dropzone.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
background: none;
44
box-shadow: none;
55
padding: 0;
6-
border-radius: 4px;
6+
border-radius: var(--border-radius-medium);
77
min-height: 0;
88
}
99

web_src/css/features/tribute.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.tribute-container {
44
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.25);
5-
border-radius: 0.25rem;
5+
border-radius: var(--border-radius);
66
}
77

88
.tribute-container ul {

web_src/css/form.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ textarea:focus,
221221
}
222222
.g-recaptcha-style iframe,
223223
.h-captcha-style iframe {
224-
border-radius: 5px !important;
224+
border-radius: var(--border-radius) !important;
225225
width: 302px !important;
226226
height: 76px !important;
227227
}

web_src/css/markup/content.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
appearance: none;
181181
position: relative;
182182
border: 1px solid var(--color-secondary);
183-
border-radius: 2px;
183+
border-radius: var(--border-radius);
184184
background: var(--color-input-background);
185185
height: 14px;
186186
width: 14px;
@@ -433,7 +433,7 @@
433433
font-size: 85%;
434434
white-space: break-spaces;
435435
background-color: var(--color-markup-code-block);
436-
border-radius: 4px;
436+
border-radius: var(--border-radius);
437437
}
438438

439439
.markup code br,
@@ -466,7 +466,7 @@
466466
font-size: 85%;
467467
line-height: 1.45;
468468
background-color: var(--color-markup-code-block);
469-
border-radius: 4px;
469+
border-radius: var(--border-radius);
470470
}
471471

472472
.markup .highlight pre {
@@ -504,7 +504,7 @@
504504
vertical-align: middle;
505505
background-color: var(--color-markup-code-block);
506506
border: 1px solid var(--color-secondary);
507-
border-radius: 3px;
507+
border-radius: var(--border-radius);
508508
box-shadow: inset 0 -1px 0 var(--color-secondary);
509509
}
510510

web_src/css/modules/animations.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
border-width: 4px;
2727
border-style: solid;
2828
border-color: var(--color-secondary) var(--color-secondary) var(--color-secondary-dark-8) var(--color-secondary-dark-8);
29-
border-radius: 100%;
29+
border-radius: var(--border-radius-circle);
3030
}
3131

3232
.is-loading.small-loading-icon::after {

0 commit comments

Comments
 (0)