{"id":23250678,"url":"https://github.com/email-types/msotype","last_synced_at":"2025-04-06T02:15:00.961Z","repository":{"id":57304480,"uuid":"225084046","full_name":"email-types/msotype","owner":"email-types","description":"TypeScript definitions for MSO (Microsoft Office), including definitions for the `mso-` CSS vendor prefix.","archived":false,"fork":false,"pushed_at":"2019-12-23T16:36:06.000Z","size":63,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"canary","last_synced_at":"2025-03-31T23:33:56.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/email-types.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-30T23:47:04.000Z","updated_at":"2025-03-10T23:53:17.000Z","dependencies_parsed_at":"2022-09-20T19:13:44.415Z","dependency_job_id":null,"html_url":"https://github.com/email-types/msotype","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/email-types%2Fmsotype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/email-types%2Fmsotype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/email-types%2Fmsotype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/email-types%2Fmsotype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/email-types","download_url":"https://codeload.github.com/email-types/msotype/tar.gz/refs/heads/canary","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423522,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T09:14:29.715Z","updated_at":"2025-04-06T02:15:00.941Z","avatar_url":"https://github.com/email-types.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[csstype]: https://github.com/frenic/csstype\n[stigmortenmyre]:\n  https://stigmortenmyre.no/mso/html/concepts/ofconstyletable.htm\n\n\u003cdiv align=\"center\"\u003e\n\n# MSOType\n\nTypeScript definitions for MSO (Microsoft Office), including definitions for the\n`mso-` CSS vendor prefix. Autocompletion and type checking for all known MSO\nproperties and values are provided.\n\n[![](https://img.shields.io/npm/v/msotype?color=black\u0026logoColor=white)](https://www.npmjs.com/package/msotype)\n![](https://img.shields.io/github/workflow/status/email-types/msotype/Test?logo=github\u0026color=black)\n[![](https://img.shields.io/codecov/c/github/email-types/msotype?logo=codecov\u0026logoColor=white\u0026color=black)](https://codecov.io/gh/email-types/msotype)\n[![](https://img.shields.io/bundlephobia/min/msotype?logo=bundlephobia\u0026color=black)](https://bundlephobia.com/result?p=msotype)\n[![](https://img.shields.io/bundlephobia/minzip/msotype?logo=bundlephobia\u0026color=black)](https://bundlephobia.com/result?p=msotype)\n\n\u003c/div\u003e\n\nInstall with yarn:\n\n```sh\nyarn add msotype\n```\n\nOr install with npm:\n\n```sh\nnpm install msotype\n```\n\n## Properties\n\nAll properties are categorized in different uses and come in two technical\nvariations—JavaScript case (camel) and CSS kebab (case)—to provide typings that\nsuits different needs.\n\nVariations:\n\n- **Default** - Property names in JavaScript (camel) case\n- **Hyphen** - Property names in CSS (kebab) case\n\n### Alternative \u0026 Standard Types\n\nAll of the following interfaces accept an optional, generic argument, to define\nthe `\u003clength\u003e` value. It defaults to `string | 0`. You can specify this when\nusing libraries that accepts any numeric value as length which is common in\nCSS-in-JS libraries like [EmotionJS](https://github.com/emotion-js/emotion).\n\n|                 | Default                 | Hyphen                        |\n| :-------------- | :---------------------- | :---------------------------- |\n| **All**         | `Properties`            | `PropertiesHyphen`            |\n| **Alternative** | `AlternativeProperties` | `AlternativePropertiesHyphen` |\n| **Standard**    | `StandardProperties`    | `StandardPropertiesHyphen`    |\n\nCategories:\n\n- **All** - Includes `Alternative` and `Standard`\n- **`Alternative`** - Properties that end with an `-alt` postfix that are direct\n  alternatives to a standard CSS property\n- **`Standard`** - Properties that correspond to a Microsoft Office feature.\n  While these do not have a CSS equivalent, they may or may not have an effect\n  on Microsoft Outlook\n\n### Font Types\n\nInterfaces with descriptors for different MSO font types.\n\n|               | Default             | Hyphen                    |\n| :------------ | :------------------ | :------------------------ |\n| **All**       | `FontProperties`    | `FontPropertiesHyphen`    |\n| **`Ansi`**    | `AnsiProperties`    | `AnsiPropertiesHyphen`    |\n| **`Ascii`**   | `AsciiProperties`   | `AsciiropertiesHyphen`    |\n| **`Bidi`**    | `BidiProperties`    | `BidiPropertiesHyphen`    |\n| **`Fareast`** | `FareastProperties` | `FareastPropertiesHyphen` |\n| **`Panose`**  | `PanoseProperties`  | `PanosePropertiesHyphen`  |\n\nCategories:\n\n- **All** - Includes `Ansi`, `Ascii`, `Bidi`, `Fareast`, and `Panose`\n- **`Ansi`** - Ansi specific font properties\n- **`Ascii`** - Ascii specific font properties\n- **`Bidi`** - Bidi specific font properties\n- **`Fareast`** - Fareast specific font properties\n- **`Panose`** - Panose specific font properties\n\n## Using Default Variation\n\nJavaScript cased (camel) properties are provided in `Mso.Properties` and\n`Mso.FontProperties`.\n\n```ts\nimport * as Mso from 'msotype';\n\nconst styles: Mso.Properties = {\n  msoFontAlt: 'Helvetica',\n  msoLineHeightRule: 'exactly',\n};\n```\n\n## Using Hyphen Variation\n\nHyphen cased (kebab) properties are provided in `Mso.PropertiesHyphen`. These\nnot **not** included by default in `Mso.Properties`. To allow both of them, you\ncan simply extend with `Mso.PropertiesHyphen`.\n\n```ts\nimport * as Mso from 'msotype';\n\ninterface Style extends Mso.Properties, Mso.PropertiesHyphen {}\n\nconst style: Style = {\n  'mso-margin-alt': 0,\n  msoPaddingAlt: 0,\n};\n```\n\nThis also works with `Mso.FontPropertiesHyphen`, which can be used to extend\n`Mso.FontProperties`.\n\n```ts\nimport * as Mso from 'msotype';\n\ninterface Style extends Mso.FontProperties, Mso.FontPropertiesHyphen {}\n\nconst style: Style = {\n  'mso-ansi-font-size': 'large',\n  msoBidiFlag: 'on',\n};\n```\n\n## Overriding `\u003clength\u003e`\n\nLength defaults to `string | 0`. But it's possible to override it using\ngenerics.\n\n```ts\nimport * as Mso from 'msotype';\n\nconst style: Mso.Properties\u003cstring | number\u003e = {\n  msoMarginAlt: '0px',\n  msoPaddingAlt: 0,\n};\n```\n\n## Type Check All CSS Properties\n\nBy default, **only** `mso-` CSS vendor prefixes are provided. If you want to\ntype check all CSS properties, you can use `msotype` together with [csstype]. To\ndo this, you can simply extend any `csstype` type with any `msotype` type.\n\n```ts\nimport * as Css from 'csstype';\nimport * as Mso from 'msotype';\n\ninterface Styles extends Css.Properties, Mso.Properties {}\n\nconst styles: Styles = {\n  msoFontAlt: 'Helvetica',\n  msoLineHeightRule: 'exactly',\n  lineHeight: 1.4,\n};\n```\n\n## More\n\n- [List of MSO Properties][stigmortenmyre]\n- [csstype][csstype]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femail-types%2Fmsotype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femail-types%2Fmsotype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femail-types%2Fmsotype/lists"}