-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix errors in compiled stylesheet (#825)
- Loading branch information
Showing
5 changed files
with
2,917 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
'@primer/react-brand': minor | ||
--- | ||
|
||
Switched to use CSS Logical Properties in compiled output. | ||
|
||
- Compiled styles now directly use CSS logical properties (e.g., `margin-inline-start`, `margin-inline-end`) instead of physical properties (`margin-left`, `margin-right`). | ||
- This change simplifies the stylesheet and reduces its overall size (`652kB` > `593kB`) | ||
|
||
Example of the change: | ||
|
||
Source: | ||
|
||
```css | ||
.selector { | ||
margin-inline-start: var(--base-size-20); | ||
} | ||
``` | ||
|
||
<table> | ||
<tr> | ||
<th> Previous compiled output | ||
</th> <th> New compiled output </th> | ||
</tr> | ||
<tr> | ||
<td valign="top"> | ||
|
||
```css | ||
[dir='ltr'] .selector { | ||
margin-left: 2px; | ||
} | ||
|
||
[dir='rtl'] .selector { | ||
margin-right: 2px; | ||
} | ||
``` | ||
|
||
</td> | ||
<td valign="top"> | ||
|
||
```css | ||
.selector { | ||
margin-inline-start: 2px; | ||
} | ||
``` | ||
|
||
</td> | ||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react-brand': patch | ||
--- | ||
|
||
Fixed errors in compiled CSS stylesheets where selectors with special characters were being unintentionally escaped for compatibility with legacy browsers. |
Oops, something went wrong.