Skip to content

Commit

Permalink
chore(core): remove prefixing for "ms-" (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter authored Nov 8, 2023
1 parent 44bfb9a commit c2c510f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: remove prefixing for \"ms-\"",
"packageName": "@griffel/core",
"email": "[email protected]",
"dependentChangeType": "patch"
}
4 changes: 2 additions & 2 deletions packages/core/src/runtime/stylis/prefixerPlugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(''),
);
});

Expand Down
6 changes: 1 addition & 5 deletions packages/core/src/runtime/stylis/prefixerPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
indexof,
replace,
match,
MS,
MOZ,
WEBKIT,
copy,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
);
Expand Down

0 comments on commit c2c510f

Please sign in to comment.