Skip to content

Commit f2b3797

Browse files
committed
Finalize initial RFC
1 parent b759369 commit f2b3797

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

text/0000-corner-smoothing.md text/0012-corner-smoothing.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# RFC Template
22

3-
- Start Date: 2024-09-28
4-
- RFC PR: [electron/rfcs#0000](https://github.com/electron/rfcs/pull/0000)
5-
- Electron Issues: [electron/electron#0000](https://github.com/electron/electron/issue/0000)
6-
- Reference Implementation: [electron/electron#0000](https://github.com/electron/electron/pull/0000)
3+
- Start Date: 2024-11-26
4+
- RFC PR: [electron/rfcs#0012](https://github.com/electron/rfcs/pull/12)
5+
- Electron Issues: None <!-- [electron/electron#0000](https://github.com/electron/electron/issue/0000) -->
6+
- Reference Implementation: None (yet) <!-- [electron/electron#0000](https://github.com/electron/electron/pull/0000) -->
77
- Status: **Proposed**
88

99
# Corner Smoothing
1010

11-
![There is a black rectangle on the left using simple rounded corners, and a blue rectangle on the right using smooth rounded corners. Inbetween those rectangles is a magnified view of the same corner from both rectangles overlapping to show the subtle difference in shape.](../images/0000/Summary.svg)
11+
![There is a black rectangle on the left using simple rounded corners, and a blue rectangle on the right using smooth rounded corners. Inbetween those rectangles is a magnified view of the same corner from both rectangles overlapping to show the subtle difference in shape.](../images/0012/Summary.svg)
1212

1313
## Summary
1414

@@ -70,7 +70,7 @@ The corners of elements rounded by the CSS `border-radius` rule can be smoothed
7070
</pre>
7171
</td>
7272
<td>
73-
<img src="../images/0000/Rectangle.svg" width="128" alt="" />
73+
<img src="../images/0012/Rectangle.svg" width="128" alt="" />
7474
</td>
7575
</tr>
7676
</table>
@@ -81,7 +81,7 @@ The `-electron-corner-smoothing` CSS rule controls how far the corner's curvatur
8181

8282
To match the system rounding in macOS, use a value of `60%`. `-electron-corner-smoothing` is available across all Electron platforms.
8383

84-
![A chart demonstrating values of the CSS rule and their visual effects on the same rectangle. The values of 0%, 30%, 60%, and 100% are demonstrated, with the 60% value being labeled as macOS.](../images/0000/Values.svg)
84+
![A chart demonstrating values of the CSS rule and their visual effects on the same rectangle. The values of 0%, 30%, 60%, and 100% are demonstrated, with the 60% value being labeled as macOS.](../images/0012/Values.svg)
8585

8686
This smooth rounding is similar to Apple's "continuous" rounded corners in SwiftUI as well as Figma's "corner smoothing" control on design elements.
8787

@@ -109,7 +109,7 @@ The procedure for smoothing the roundness of a corner is based on the research i
109109

110110
At a high level, we're taking the points where the edges connect to the corner circle and stretching them back into the edge. Thus, instead of constructing a round corner with a quarter circle, we use two cubic Bézier curves to construct the corner.
111111

112-
![A chart showing two constructions of a rounded corner. The first construction shows a quarter circle connected to two straight edges, with the points of connection highlighted. Arrows by those points indicate a stretching motion twoard the straight edge. The second construction shows the same corner with the connection points stretched backward, demonstrating the Bézier construction of a rounded corner.](../images/0000/Construction.svg)
112+
![A chart showing two constructions of a rounded corner. The first construction shows a quarter circle connected to two straight edges, with the points of connection highlighted. Arrows by those points indicate a stretching motion twoard the straight edge. The second construction shows the same corner with the connection points stretched backward, demonstrating the Bézier construction of a rounded corner.](../images/0012/Construction.svg)
113113

114114
The two Bézier curves' control points are carefully chosen to retain the most important qualities of a rounded corner, including the percieved radius. The original article provides a full intuition for how the curve's control points are derived.
115115

0 commit comments

Comments
 (0)