material-symbols-class 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Joel Corrales
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # [material-symbols-class](https://github.com/joelcorrales/material-symbols-class)
2
+
3
+ This is a package that uses [material-symbols](https://github.com/marella/material-symbols/tree/main/material-symbols) to provide a way of using the icons just with classes.
4
+
5
+ - [Installation](#installation)
6
+ - [Usage](#usage)
7
+ - [Available Icons](#available-icons)
8
+
9
+ ## Installation
10
+
11
+ Install the [latest version][releases] using:
12
+
13
+ ```sh
14
+ npm install material-symbols-class@latest
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ Import in JS (example: `src/index.js` in Create React App, `src/main.js` in Vue CLI):
20
+
21
+ ```js
22
+ import "material-symbols-class";
23
+ ```
24
+
25
+ or import in CSS (example: `src/styles.css` in Angular CLI):
26
+
27
+ ```css
28
+ @import "material-symbols-class";
29
+ ```
30
+
31
+ or import in HTML:
32
+
33
+ ```html
34
+ <link href="/path/to/material-symbols-class/index.css" rel="stylesheet" />
35
+ ```
36
+
37
+ To display an icon, use one of the following:
38
+
39
+ ```html
40
+ <span class="msc msc-face"></span>
41
+ <!-- Outlined -->
42
+ <span class="msc-rounded msc-face"></span>
43
+ <!-- Rounded -->
44
+ <span class="msc-sharp msc-face"></span>
45
+ <!-- Sharp -->
46
+ ```
47
+
48
+ Adding the `utils.css` you can edit the `fill` and `weight` variables with classes too:
49
+
50
+ ```html
51
+ <span class="msc msc-face msc-fill"></span>
52
+ <!-- 'FILL': 1 -->
53
+ <span class="msc msc-face msc-100"></span>
54
+ <!-- 'weight': 100 -->
55
+ <span class="msc msc-face msc-fill msc-100"></span>
56
+ <!-- 'FILL': 1 && 'weight': 300 -->
57
+ ```
58
+
59
+ To customize the variable font axes (fill, weight, grade, and optical size), use:
60
+
61
+ ```css
62
+ .msc {
63
+ font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
64
+ }
65
+ ```
66
+
67
+ ### Reducing Build Size
68
+
69
+ The default `index.css` includes CSS for all fonts. This may cause build tools such as webpack to copy all fonts to the build directory even if you are not using all of them. To reduce the build size, import only the styles you need. For example, if you only need outlined icons, import `outlined.css` instead of the default `index.css`:
70
+
71
+ ```diff
72
+ -import 'material-symbols-class';
73
+ +import 'material-symbols-class/outlined.css';
74
+ ```
75
+
76
+ <details>
77
+ <summary><strong>Show all</strong></summary><br>
78
+
79
+ | Icons | CSS | Sass |
80
+ | :------- | :----------- | :------------ |
81
+ | Outlined | outlined.css | outlined.scss |
82
+ | Rounded | rounded.css | rounded.scss |
83
+ | Sharp | sharp.css | sharp.scss |
84
+
85
+ </details>
86
+
87
+ ### Using Sass
88
+
89
+ Import in Sass (example: `src/styles.scss` in Angular CLI):
90
+
91
+ ```scss
92
+ @import "material-symbols-class";
93
+ ```
94
+
95
+ ## License
96
+
97
+ MIT License
package/index.css ADDED
@@ -0,0 +1,86 @@
1
+ @font-face {
2
+ font-family: "Material Symbols Outlined";
3
+ font-style: normal;
4
+ font-weight: 100 700;
5
+ font-display: block;
6
+ src: url("./material-symbols-outlined.woff2") format("woff2");
7
+ }
8
+ .material-symbols-outlined, .msc {
9
+ font-family: "Material Symbols Outlined";
10
+ font-weight: normal;
11
+ font-style: normal;
12
+ font-size: 24px;
13
+ line-height: 1;
14
+ letter-spacing: normal;
15
+ text-transform: none;
16
+ display: inline-block;
17
+ white-space: nowrap;
18
+ word-wrap: normal;
19
+ direction: ltr;
20
+ -webkit-font-smoothing: antialiased;
21
+ -moz-osx-font-smoothing: grayscale;
22
+ text-rendering: optimizeLegibility;
23
+ font-feature-settings: "liga";
24
+ }
25
+
26
+ .msc {
27
+ font-size: 1.25em;
28
+ }
29
+
30
+ @font-face {
31
+ font-family: "Material Symbols Rounded";
32
+ font-style: normal;
33
+ font-weight: 100 700;
34
+ font-display: block;
35
+ src: url("./material-symbols-rounded.woff2") format("woff2");
36
+ }
37
+ .material-symbols-rounded, .msc-rounded {
38
+ font-family: "Material Symbols Rounded";
39
+ font-weight: normal;
40
+ font-style: normal;
41
+ font-size: 24px;
42
+ line-height: 1;
43
+ letter-spacing: normal;
44
+ text-transform: none;
45
+ display: inline-block;
46
+ white-space: nowrap;
47
+ word-wrap: normal;
48
+ direction: ltr;
49
+ -webkit-font-smoothing: antialiased;
50
+ -moz-osx-font-smoothing: grayscale;
51
+ text-rendering: optimizeLegibility;
52
+ font-feature-settings: "liga";
53
+ }
54
+
55
+ .msc-rounded {
56
+ font-size: 1.25em;
57
+ }
58
+
59
+ @font-face {
60
+ font-family: "Material Symbols Sharp";
61
+ font-style: normal;
62
+ font-weight: 100 700;
63
+ font-display: block;
64
+ src: url("./material-symbols-sharp.woff2") format("woff2");
65
+ }
66
+ .material-symbols-sharp, .msc-sharp {
67
+ font-family: "Material Symbols Sharp";
68
+ font-weight: normal;
69
+ font-style: normal;
70
+ font-size: 24px;
71
+ line-height: 1;
72
+ letter-spacing: normal;
73
+ text-transform: none;
74
+ display: inline-block;
75
+ white-space: nowrap;
76
+ word-wrap: normal;
77
+ direction: ltr;
78
+ -webkit-font-smoothing: antialiased;
79
+ -moz-osx-font-smoothing: grayscale;
80
+ text-rendering: optimizeLegibility;
81
+ font-feature-settings: "liga";
82
+ }
83
+
84
+ .msc-sharp {
85
+ font-size: 1.25em;
86
+ }
package/index.min.css ADDED
@@ -0,0 +1 @@
1
+ @font-face{font-family:"Material Symbols Outlined";font-style:normal;font-weight:100 700;font-display:block;src:url("./material-symbols-outlined.woff2") format("woff2")}.material-symbols-outlined,.msc{font-family:"Material Symbols Outlined";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.msc{font-size:1.25em}@font-face{font-family:"Material Symbols Rounded";font-style:normal;font-weight:100 700;font-display:block;src:url("./material-symbols-rounded.woff2") format("woff2")}.material-symbols-rounded,.msc-rounded{font-family:"Material Symbols Rounded";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.msc-rounded{font-size:1.25em}@font-face{font-family:"Material Symbols Sharp";font-style:normal;font-weight:100 700;font-display:block;src:url("./material-symbols-sharp.woff2") format("woff2")}.material-symbols-sharp,.msc-sharp{font-family:"Material Symbols Sharp";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.msc-sharp{font-size:1.25em}
package/index.scss ADDED
@@ -0,0 +1,3 @@
1
+ @import "./outlined.scss";
2
+ @import "./rounded.scss";
3
+ @import "./sharp.scss";
Binary file
Binary file
Binary file