Repository: microsoft/griffel
Pull request #464 (2023-11-08 11:14:51)

chore(core): remove prefixing for "ms-"
Removes prefixing for `ms-` rules as we don't support IE and legacy Edge.

github-actions[bot]: ## 📊 Bundle size report

| Package & Exports                                                                                                 |    Baseline (minified/GZIP) |                          PR |                                                                                                                                                                                                   Change |
| :---------------------------------------------------------------------------------------------------------------- | --------------------------: | --------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <samp>core</samp> <br /> <abbr title='bundle-size/makeResetStyles.fixture.js'>makeResetStyles (runtime)</abbr>    | `17.056 kB`<br />`6.503 kB` | `16.982 kB`<br />`6.488 kB` | `-74 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /><br />`-15 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /> |
| <samp>core</samp> <br /> <abbr title='bundle-size/makeStyles.fixture.js'>makeStyles (runtime)</abbr>              | `21.522 kB`<br />`8.115 kB` | `21.438 kB`<br />`8.096 kB` | `-84 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /><br />`-19 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /> |
| <samp>react</samp> <br /> <abbr title='bundle-size/makeResetStyles.fixture.js'>makeResetStyles (runtime)</abbr>   | `19.206 kB`<br />`7.374 kB` | `19.143 kB`<br />`7.347 kB` | `-63 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /><br />`-27 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /> |
| <samp>react</samp> <br /> <abbr title='bundle-size/makeStaticStyles.fixture.js'>makeStaticStyles (runtime)</abbr> |  `9.168 kB`<br />`4.003 kB` |   `9.107 kB`<br />`3.98 kB` | `-61 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /><br />`-23 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /> |
| <samp>react</samp> <br /> <abbr title='bundle-size/makeStyles.fixture.js'>makeStyles (runtime)</abbr>             | `23.688 kB`<br />`8.961 kB` | `23.614 kB`<br />`8.942 kB` | `-74 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /><br />`-19 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /> |

<details>
<summary>Unchanged fixtures</summary>

| Package & Exports                                                                                                          |       Size (minified/GZIP) |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------: |
| <samp>core</samp> <br /> <abbr title='bundle-size/__resetStyles.fixture.js'>\_\_resetStyles (makeResetStyles)</abbr>       |       `273 B`<br />`198 B` |
| <samp>core</samp> <br /> <abbr title='bundle-size/__styles.fixture.js'>\_\_styles (makeStyles)</abbr>                      |    `1.649 kB`<br />`787 B` |
| <samp>core</samp> <br /> <abbr title='bundle-size/mergeClasses.fixture.js'>mergeClasses</abbr>                             |     `1.82 kB`<br />`881 B` |
| <samp>core</samp> <br /> <abbr title='bundle-size/shorthands.padding.fixture.js'>shorthands.padding()</abbr>               | `4.677 kB`<br />`1.517 kB` |
| <samp>react</samp> <br /> <abbr title='bundle-size/__css.fixture.js'>\_\_css</abbr>                                        |    `1.645 kB`<br />`767 B` |
| <samp>react</samp> <br /> <abbr title='bundle-size/__styles.fixture.js'>\_\_styles</abbr>                                  | `3.768 kB`<br />`1.666 kB` |
| <samp>shadow-dom</samp> <br /> <abbr title='bundle-size/createShadowDOMRenderer.fixture.js'>createShadowDOMRenderer</abbr> | `3.236 kB`<br />`1.408 kB` |

</details>
<sub>🤖 This report was generated against <a href='https://github.com/microsoft/griffel/commit/44bfb9aa9b74d9c78f92092d0d262d3a95a4816a'>44bfb9aa9b74d9c78f92092d0d262d3a95a4816a</a></sub>

<!-- Sticky Pull Request Comment -->

Patch:
diff --git a/change/@griffel-core-37cc7380-d4cc-4151-8ad7-c78576d587f7.json b/change/@griffel-core-37cc7380-d4cc-4151-8ad7-c78576d587f7.json
new file mode 100644
index 0000000..9022421
--- /dev/null
+++ b/change/@griffel-core-37cc7380-d4cc-4151-8ad7-c78576d587f7.json
@@ -0,0 +1,7 @@
+{
+  "type": "patch",
+  "comment": "chore: remove prefixing for \"ms-\"",
+  "packageName": "@griffel/core",
+  "email": "olfedias@microsoft.com",
+  "dependentChangeType": "patch"
+}
diff --git a/packages/core/src/runtime/stylis/prefixerPlugin.ts b/packages/core/src/runtime/stylis/prefixerPlugin.ts
index 2413c1b..9e58a75 100644
--- a/packages/core/src/runtime/stylis/prefixerPlugin.ts
+++ b/packages/core/src/runtime/stylis/prefixerPlugin.ts
@@ -6,7 +6,6 @@ import {
   indexof,
   replace,
   match,
-  MS,
   MOZ,
   WEBKIT,
   copy,
@@ -48,7 +47,7 @@ export function prefix(value: string, length: number, children?: Element[]): str
     case 5349:
     case 4246:
     case 6968:
-      return WEBKIT + value + MOZ + value + MS + value + value;
+      return WEBKIT + value + MOZ + value + value;
     // cursor
     // @ts-expect-error fall through is intentional here
     case 6187:
@@ -153,9 +152,6 @@ export function prefixerPlugin(
                       // eslint-disable-next-line @typescript-eslint/ban-ts-comment
                       // @ts-ignore
                       copy(element, { props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')] }),
-                      // eslint-disable-next-line @typescript-eslint/ban-ts-comment
-                      // @ts-ignore
-                      copy(element, { props: [replace(value, /:(plac\w+)/, MS + 'input-$1')] }),
                     ],
                     callback,
                   );


Test patch:
diff --git a/packages/core/src/runtime/stylis/prefixerPlugin.test.ts b/packages/core/src/runtime/stylis/prefixerPlugin.test.ts
index 7a7a9ba..db28872 100644
--- a/packages/core/src/runtime/stylis/prefixerPlugin.test.ts
+++ b/packages/core/src/runtime/stylis/prefixerPlugin.test.ts
@@ -139,13 +139,13 @@ describe('prefix', () => {
 
     test('user-select', () => {
       expect(prefix(`user-select:none;`, 11)).toEqual(
-        [`-webkit-user-select:none;`, `-moz-user-select:none;`, `-ms-user-select:none;`, `user-select:none;`].join(''),
+        [`-webkit-user-select:none;`, `-moz-user-select:none;`, `user-select:none;`].join(''),
       );
     });
 
     test('appearance', () => {
       expect(prefix(`appearance:none;`, 10)).toEqual(
-        [`-webkit-appearance:none;`, `-moz-appearance:none;`, `-ms-appearance:none;`, `appearance:none;`].join(''),
+        [`-webkit-appearance:none;`, `-moz-appearance:none;`, `appearance:none;`].join(''),
       );
     });