{"id":15285923,"url":"https://github.com/solis-lab/postcss-type","last_synced_at":"2026-01-04T20:46:36.351Z","repository":{"id":57155974,"uuid":"122290732","full_name":"solis-lab/postcss-type","owner":"solis-lab","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-21T06:07:37.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T07:22:42.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/solis-lab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-21T04:07:15.000Z","updated_at":"2018-09-21T06:07:29.000Z","dependencies_parsed_at":"2022-08-30T06:50:26.766Z","dependency_job_id":null,"html_url":"https://github.com/solis-lab/postcss-type","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solis-lab%2Fpostcss-type","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solis-lab%2Fpostcss-type/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solis-lab%2Fpostcss-type/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solis-lab%2Fpostcss-type/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solis-lab","download_url":"https://codeload.github.com/solis-lab/postcss-type/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245168912,"owners_count":20571804,"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-09-30T15:08:29.848Z","updated_at":"2026-01-04T20:46:36.318Z","avatar_url":"https://github.com/solis-lab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Typography [![Build Status][ci-img]][ci]\n\n[PostCSS] plugin to support responsive typography shorthands..\n\n[PostCSS]: https://github.com/postcss/postcss\n[ci-img]:  https://travis-ci.org/solis-lab/postcss-type.svg\n[ci]:      https://travis-ci.org/solis-lab/postcss-type\n\nInput: \n\n```css\n@custom-media --mobile-m (min-width: 420px);\n@custom-media --mobile-l (min-width: 600px);\n@custom-media --tablet (min-width: 768px);\n@custom-media --tablet-l (min-width: 1024px);\n@custom-media --desktop (min-width: 1280px);\n@custom-media --desktop-l (min-width: 1440px);\n\n.foo {\n  /*\n   * You can omit media query parameter.\n   *\n   * Line-height pixel values will be converted into unit-less ratio\n   * relative to font-size.\n   *\n   * Letter-spacing pixel values will be converted into `em`.\n   * \n   * If you specify a rootSize option in pixel unit, font-size will\n   * be converted into `rem`.\n   */\n  @type 10px 15px 1px;\n  \n  /* You can omit font-size or line-height by using `/`. */ \n  @type --mobile-m 12px / 0;\n  \n  /*\n   * When you omit font-size, it is on you to provide your preferred unit\n   * for line-height and letter-spacing.\n   */\n  @type --desktop / 1.875 0.01em;\n}\n```\n\nOutput:\n\n```css\n\n@custom-media --mobile-m (min-width: 420px);\n@custom-media --mobile-l (min-width: 600px);\n@custom-media --tablet (min-width: 768px);\n@custom-media --tablet-l (min-width: 1024px);\n@custom-media --desktop (min-width: 1280px);\n@custom-media --desktop-l (min-width: 1440px);\n\n.foo {\n  /* `@type 10px 15px 1px;` */\n  font-size: 10px 1.5 0.1em;\n  \n  /* or in case `@type 10px 15px 1px;` with rootSize: 16px */\n  font-size: 0.615rem 1.5 0.1em;\n  \n  /* `@type --mobile-m 12px / 0;` */\n  @media (--mobile-m) {\n    font-size: 12px;\n    letter-spacing: 0;\n  }\n\n  /* @type --desktop / 1.875 0.01em; */\n  @media (--desktop) {\n    line-height: 1.875;\n    letter-spacing: 0.01em; \n  }\n}\n```\n\n## Usage\n\nBecause this plugin relies on [custom media queries](http://cssnext.io/features/#custom-media-queries), you are recommended to run it before `postcss-cssnext` or `postcss-custom-media`\n\n```js\npostcss([ require('postcss-type')({rootSize: '16px'}), require('postcss-custom-media') ])\n```\n\nSee [PostCSS] docs for examples for your environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolis-lab%2Fpostcss-type","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolis-lab%2Fpostcss-type","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolis-lab%2Fpostcss-type/lists"}