Skip to content

Commit 7b3b5de

Browse files
committed
feat(lib): update assets to v2.0.0
1 parent 9a228ef commit 7b3b5de

35 files changed

+22584
-17035
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ We use a similar approach as many other icon sets out there, providing icons as
3939
4040
### Weights
4141

42-
Phosphor Icons come in 6 weights: `regular`, `thin`, `light`, `bold`, `fill`, and `duotone`. In order to use a weight, you must include a link to its stylesheet, and use the appropriate weight class on the icon:
42+
Phosphor Icons come in 6 weights: `regular`, `thin`, `light`, `bold`, `fill`, and `duotone`. In order to use a weight, you must include a link to its stylesheet, and use the appropriate weight class on the icon (the `regular` weight uses `.ph` instead of `.ph-regular`):
4343

4444
```html
4545
<link
@@ -61,9 +61,11 @@ If you intend to use all 6 weights, they can be made available by including the
6161
<script src="https://unpkg.com/@phosphor-icons/web@2.0.0"></script>
6262
...
6363
<i class="ph-light ph-address-book"></i>
64-
<i class="ph-fill ph-sunglasses"></i>
64+
<i class="ph ph-sunglasses"></i>
6565
```
6666

67+
> **NOTE:** Though assets will be cached for subsequent loads, this will bring in around 3MB of fonts and CSS, and may have impact on page load speed.
68+
6769
### Modules
6870

6971
If your environment supports loading CSS files as modules, icon weights can be imported for effect from the package.
@@ -77,8 +79,6 @@ import "@phosphor-icons/web/light";
7779
import "@phosphor-icons/web/bold";
7880
```
7981

80-
> **NOTE:** Though assets will be cached for subsequent loads, this will bring in around 3MB of fonts and CSS, and may have impact on page load speed.
81-
8282
### Styling
8383

8484
Since the icons are just text under the hood, they can be colored and styled with CSS like any other font, including `font-size`, `color`, etc.
@@ -102,7 +102,7 @@ Since the icons are just text under the hood, they can be colored and styled wit
102102

103103
> **Note:** Overriding the `font-family`, `font-style`, `font-weight`, `font-variant`, or `text-transform` may break the icons and render unprintable characters. Don't do it. Additionally, all weights use the `:before` pseudoelement to inject the font glyph, so overriding this property in icon classes can break them. The `duotone` weight also uses the `:after` pseudoelement, so it is best not to modify either when styling icons.
104104
105-
### Ligatures
105+
<!-- ### Ligatures
106106
107107
All weights aside from `duotone` support ligatures, meaning that in any text using supported weight classes, writing the name of an icon (without the `ph-` prefix) will convert to the corresponding icon. The largest possible string will be matched, meaning you can use any available weight, and print multiple icons without separating with spaces or other characters if you choose.
108108
@@ -117,11 +117,10 @@ All weights aside from `duotone` support ligatures, meaning that in any text usi
117117
/>
118118
</head>
119119
<body>
120-
<!-- Renders as sword and shield icons -->
121120
<p class="ph-bold">sword shield</p>
122121
</body>
123122
</html>
124-
```
123+
``` -->
125124

126125
## Our Related Projects
127126

bin/transform.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ main();
1313

1414
async function main() {
1515
exec(
16-
"git submodule update --remote --init --recursive",
16+
"git submodule update --remote --init --force --recursive",
1717
async (err, _stdout, stderr) => {
1818
if (err) {
1919
console.error(`${chalk.inverse.red(" ERR ")} ${err.message}`);
@@ -106,14 +106,14 @@ async function transformDuotoneStylesheet() {
106106
const remappedCSS = css
107107
.replace(/ \.path1:before/g, ":before")
108108
.replace(/ \.path2:before/g, ":after")
109-
.replace(/color: rgb\(0, 0, 0\);\n/g, "");
110-
111-
// if (remappedCSS.includes("path3")) {
112-
// console.error(
113-
// `${chalk.inverse.red(" FAIL ")} Some duotone icons have mutiple paths`
114-
// );
115-
// process.exit(1);
116-
// }
109+
.replace(/color: rgb.*;\n/g, "");
110+
111+
if (remappedCSS.includes("path3")) {
112+
console.error(
113+
`${chalk.inverse.red(" FAIL ")} Some duotone icons have mutiple paths`
114+
);
115+
process.exit(1);
116+
}
117117

118118
fs.writeFileSync(duotoneCSSPath, remappedCSS);
119119
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@phosphor-icons/web",
3-
"version": "0.1.10",
3+
"version": "2.0.0",
44
"description": "A clean and friendly icon family for web",
55
"main": "src/index.js",
66
"files": [

src/bold/Phosphor-Bold.svg

Lines changed: 1248 additions & 1047 deletions
Loading

src/bold/Phosphor-Bold.ttf

49.6 KB
Binary file not shown.

src/bold/Phosphor-Bold.woff

49.6 KB
Binary file not shown.

src/bold/selection.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)