{"id":16327965,"url":"https://github.com/alexandremasy/postcss-salt-typography-parser","last_synced_at":"2026-04-27T20:31:24.241Z","repository":{"id":71639276,"uuid":"93373175","full_name":"alexandremasy/postcss-salt-typography-parser","owner":"alexandremasy","description":"Salt - Typography Parser utility","archived":false,"fork":false,"pushed_at":"2017-06-06T11:34:26.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T03:42:47.303Z","etag":null,"topics":["postcss","postcss-plugin","salt"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexandremasy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-05T06:40:40.000Z","updated_at":"2017-06-06T11:31:00.000Z","dependencies_parsed_at":"2023-02-22T00:45:18.168Z","dependency_job_id":null,"html_url":"https://github.com/alexandremasy/postcss-salt-typography-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexandremasy/postcss-salt-typography-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandremasy%2Fpostcss-salt-typography-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandremasy%2Fpostcss-salt-typography-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandremasy%2Fpostcss-salt-typography-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandremasy%2Fpostcss-salt-typography-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexandremasy","download_url":"https://codeload.github.com/alexandremasy/postcss-salt-typography-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandremasy%2Fpostcss-salt-typography-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32354564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["postcss","postcss-plugin","salt"],"created_at":"2024-10-10T23:13:13.687Z","updated_at":"2026-04-27T20:31:24.223Z","avatar_url":"https://github.com/alexandremasy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [WIP] Salt - Typography Parser utility\n\n\u003e PostCSS plugin that walk through you css declarations to find the dynamic font values and enforce a predefined one. This plugin is part of [Salt](https://github.com/alexandremasy/salt), a collection of tool to help you enforce a set of rule througout your application.\n\n\n\n## Getting started\n\nInstallation is as easy as:\n\n```shell\nnpm install postcss-salt-typography-parser\n```\n\n\n\n**PostCSS**\n\nInclude the plugin in you build process:\n\n```\n@TODO\n\n```\n\n**Gulp**\n\nInclude the plugin in your build process:\n\n```\n@TODO\n```\n\n\n\nThis plugins depends on :\n\n- [PostCSS](https://github.com/postcss/postcss)\n- [Salt - Typography - Helper](https://github.com/alexandremasy/postcss-salt-typography-helper)\n- [Salt - Layout - Breakpoint](https://github.com/alexandremasy/postcss-salt-layout-breakpoint)\n\n\n\n\n\n## Functionalities\n\nWalk through your typographic css declarations to find the dynamic values and enforce a predefined one;\n\n ```css\nhtml\n{\n  #font-family: \u003cdomain\u003e;\n  #font-weight: \u003cdomain\u003e? / \u003cweights\u003e;\n  #font-size: \u003cdomain\u003e? / \u003cscale\u003e;\n  #line-height: \u003cdomain\u003e? / \u003cscale\u003e;\n  #font-style: \u003cdomain\u003e? / [italic | oblique | none];\n}\n ```\n\n\n\n------\n\n\n\n### #font-family\n\nDefine a font-family.\n\n```css\n#font-family: \u003cdomain\u003e;\n```\n\n| Property              | Type   | Description                              |\n| --------------------- | ------ | ---------------------------------------- |\n| `domain` **required** | String | the name defined in the [font definition option](https://github.com/alexandremasy/postcss-salt-typography#configuration). If the given value is not found in the definition, the plugin will throw an exception. |\n\n\n\n**will yield**\n\n```css\nfont-family: \u003cfamily\u003e\n```\n\n| Property | Type   | Description                              |\n| -------- | ------ | ---------------------------------------- |\n| `family` | String | The family value in the [font definition option](https://github.com/alexandremasy/postcss-salt-typography#configuration). |\n\n\n\n------\n\n\n\n### #font-weight\n\nDefine a font-weight\n\n```css\n#font-weight: \u003cdomain\u003e? / \u003cweight\u003e;\n```\n\n| Property              | Type   | Description                              |\n| --------------------- | ------ | ---------------------------------------- |\n| `domain` *optional*   | String | the name defined in the [font definition option](https://github.com/alexandremasy/postcss-salt-typography#configuration). If not provided, we'll take the first entry in the font definition. If the given value is not found in the definition, the plugin will throw an exception. |\n| `weight` **required** | String | One of the [allowed weight values](https://github.com/alexandremasy/postcss-salt-typography#weight). |\n\n\n\n**will yield**\n\n```css\nfont-weight: \u003cweight\u003e\n```\n\n| Property | Type   | Description                   |\n| -------- | ------ | ----------------------------- |\n| `weight` | Number | The weight of the given font. |\n\n\n\n------\n\n\n\n### #font-size\n\nDefine a font-size\n\n```css\n#font-size: \u003cdomain\u003e? / \u003cscale\u003e;\n```\n\n| Property             | Type   | Description                              |\n| -------------------- | ------ | ---------------------------------------- |\n| `domain` *optional*  | String | the name defined in the [font definition option](https://github.com/alexandremasy/postcss-salt-typography#configuration). If not provided, we'll take the first entry in the font definition. If the given value is not found in the definition, the plugin will throw an exception. |\n| `scale` **required** | String | One of the scale you defined in your font definition option. |\n\n\n\n**will yield for a singular scale value**\n\n```css\nfont-size: \u003clength\u003e\n```\n\n| Property | Type   | Description               |\n| -------- | ------ | ------------------------- |\n| `length` | Number | The defined length value. |\n\n\n\n**will yield for a dual scale value**\n\n```css\nfont-size: calc((\u003cfont-first\u003e * \u003cunit\u003e) + (\u003cfont-last\u003e - \u003cfont-first\u003e) * (100vw - \u003cbreakpoint-first\u003e) / (\u003cbreakpoint-last\u003e - \u003cbreakpoint-first\u003e));\n\n@breakpoint('\u003e\u003cbreakpoint-last\u003e')\n{\n  font-size: \u003cfont-last\u003e * \u003cunit\u003e;\n}\n\n@breakpoint('\u003c\u003cbreakpoint-first\u003e')\n{\n  font-size: \u003cfont-first\u003e * \u003cunit\u003e;\n}\n```\n\n| Property           | Type   | Description                              |\n| ------------------ | ------ | ---------------------------------------- |\n| `font-first`       | Number | The first value in the scale declaration. |\n| `font-last`        | Number | The last value in the scale declaration. |\n| `unit`             | Number | The unit used for the font-size, computed from the scale declaration. |\n| `breakpoint-first` | Number | The first value in the breakpoint declaration. |\n| `breakpoint-last`  | Number | The last value in the breakpoint declaration. |\n\n\n\n------\n\n\n\n### #line-height\n\nDefine a line-height\n\n```css\n#line-height: \u003cdomain\u003e? / \u003cscale\u003e;\n```\n\n| Property             | Type   | Description                              |\n| -------------------- | ------ | ---------------------------------------- |\n| `domain` *optional*  | String | the name defined in the [font definition option](https://github.com/alexandremasy/postcss-salt-typography#configuration). If not provided, we'll take the first entry in the font definition. If the given value is not found in the definition, the plugin will throw an exception. |\n| `scale` **required** | String | One of the scale you defined in your font definition option. |\n\n\n\n**will yield for a singular scale value**\n\n```css\nline-height: \u003clength\u003e\n```\n\n| Property | Type   | Description               |\n| -------- | ------ | ------------------------- |\n| `length` | Number | The defined length value. |\n\n\n\n**will yield for a dual scale value**\n\n```css\nline-height: calc((\u003cheight-first\u003e * \u003cunit\u003e) + (\u003cheight-last\u003e - \u003cheight-first\u003e) * (100vw - \u003cbreakpoint-first\u003e) / (\u003cbreakpoint-last\u003e - \u003cbreakpoint-first\u003e));\n\n@breakpoint('\u003e\u003cbreakpoint-last\u003e')\n{\n  font-size: \u003cheight-last\u003e * \u003cunit\u003e;\n}\n\n@breakpoint('\u003c\u003cbreakpoint-first\u003e')\n{\n  font-size: \u003cheight-last\u003e * \u003cunit\u003e;\n}\n```\n\n| Property           | Type   | Description                              |\n| ------------------ | ------ | ---------------------------------------- |\n| `height-first`     | Number | The first value in the scale declaration. |\n| `height-last`      | Number | The last value in the scale declaration. |\n| `unit`             | Number | The unit used for the font-size, computed from the scale declaration. |\n| `breakpoint-first` | Number | The first value in the breakpoint declaration. |\n| `breakpoint-last`  | Number | The last value in the breakpoint declaration. |\n\n\n\n------\n\n\n\n### #font-style\n\nDefine a font-style\n\n```css\n#font-size: \u003cdomain\u003e? / [italic | oblique | none];\n```\n\n| Property                                 | Type   | Description                              |\n| ---------------------------------------- | ------ | ---------------------------------------- |\n| `domain` *optional*                      | String | the name defined in the [font definition option](https://github.com/alexandremasy/postcss-salt-typography#configuration). If the given value is not found in the definition, the plugin will throw an exception. If not provided, we'll take the first entry in the font definition with the given style. It no entry is found, an exception will be thrown. |\n| `italic` `oblique` `normal` **required** | String | One of these value.                      |\n\n\n\n**will yield**\n\n```css\nfont-style: [italic | oblique | normal]\n```\n\n| Property | Type   | Description               |\n| -------- | ------ | ------------------------- |\n| `length` | Number | The defined length value. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandremasy%2Fpostcss-salt-typography-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandremasy%2Fpostcss-salt-typography-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandremasy%2Fpostcss-salt-typography-parser/lists"}