{"_id":"stylus-type-utils","_rev":"1761459","name":"stylus-type-utils","description":"Stylus typography functions and type conversion","dist-tags":{"latest":"0.0.3"},"maintainers":[{"name":"blakeembrey","email":"me@blakeembrey.com"}],"time":{"modified":"2026-11-27T03:38:19.000Z","created":"2013-02-09T00:31:06.006Z","0.0.3":"2013-02-09T01:54:54.771Z","0.0.2":"2013-02-09T00:31:06.006Z"},"users":{"piermaria":true},"author":{"name":"Blake Embrey"},"repository":{"type":"git","url":"git://github.com/blakeembrey/stylus-type-utils.git"},"versions":{"0.0.3":{"name":"stylus-type-utils","version":"0.0.3","description":"Stylus typography functions and type conversion","main":"lib/type-utils.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/blakeembrey/stylus-type-utils.git"},"keywords":["stylus","typeograhy","coercion","rem","em","px","pt","percent"],"homepage":"https://github.com/blakeembrey/stylus-type-utils","author":{"name":"Blake Embrey"},"license":"MIT","readmeFilename":"Readme.md","peerDependencies":{"stylus":"0.x"},"devDependencies":{"stylus":"~0.32.0"},"_id":"stylus-type-utils@0.0.3","dist":{"shasum":"f048334728bb5144ecd599c627553db64ea0a6bb","tarball":"http://registry-npm.ywwl.com/stylus-type-utils/download/stylus-type-utils-0.0.3.tgz","integrity":"sha512-E1yoznMW1fFSm2OUF+oEp41KWSXoTYPEBgpRVAASVPG45mrnCZzs7qmA+0bjegJ9vLRPoYeX38mU3RJFk6BphQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCD5ic2niQCV5PlK9VOIaZ9cqsRh3GBQOffuJVv1EOAAiEAoJcceP6pzkWAQMQk8b9J+uNqxPN02GYLQkGVMUbkAME="}],"size":3646,"noattachment":false,"key":"/stylus-type-utils/-/stylus-type-utils-0.0.3.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"blakeembrey","email":"me@blakeembrey.com"},"maintainers":[{"name":"blakeembrey","email":"me@blakeembrey.com"}],"publish_time":1360374894771,"_cnpm_publish_time":1360374894771},"0.0.2":{"name":"stylus-type-utils","version":"0.0.2","description":"Stylus typography functions and type conversion","main":"lib/type-utils.js","scripts":{"test":"mocha"},"repository":"","keywords":["stylus","typeograhy","coercion","rem","em","px","pt","percent"],"author":{"name":"Blake Embrey"},"license":"MIT","readmeFilename":"Readme.md","devDependencies":{"stylus":"~0.32.0"},"_id":"stylus-type-utils@0.0.2","dist":{"shasum":"8c394362bc93fd743adc8f342469603f9ccaca97","tarball":"http://registry-npm.ywwl.com/stylus-type-utils/download/stylus-type-utils-0.0.2.tgz","integrity":"sha512-W4x31fbbmJKpH5Jo0L1JcfunNSMrz38sicimP2RzXZr/+TNUatOEBMWnGGrH/WmF9yLs1efRrkEfWvaBz98wWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVaJW+/EPHmjnQeHcFwMSt1jyFCd4xU9N/OG0NAttbOAIhAIp4q88Pf7ajbE2hFj0TFVcHGxoxPeI+CdDxzj6EJRyt"}],"size":3600,"noattachment":false,"key":"/stylus-type-utils/-/stylus-type-utils-0.0.2.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"blakeembrey","email":"me@blakeembrey.com"},"maintainers":[{"name":"blakeembrey","email":"me@blakeembrey.com"}],"publish_time":1360369866006,"_cnpm_publish_time":1360369866006}},"readme":"# Stylus Type Utils\n\nMuch needed Stylus typeography unit coersion and normalization. Provides several common unit conversion functions to convert between types effortlessly and in sync with the content font size.\n\n## Installation\n\n    $ npm install stylus-type-utils --save\n\n## API\n\nTo use the `stylus-type-utils` library within your framework, use `@import` or use via the Stylus JS API.\n\n    base-font-size = 100% // Change to adjust the conversion process\n    support-for-ie = true // Set to `false` for no `px` output with `rem`\n\n    px(unit, ignore-base-font-size)\n    pt(unit, ignore-base-font-size)\n    em(unit, ignore-base-font-size)\n    rem(unit, ignore-base-font-size)\n    percent(unit, ignore-base-font-size)\n\nWhen using the functions, omitting a unit type will assume the function unit type. E.g. `px(16) -> px(16px)`.\n\nThe second parameter, `ignore-base-font-size`, allows the function to act as if the `base-font-size` was to set `100%`.\n\n## Example Usage\n\n    @import \"type-utils\"\n\n    base-font-size = 75%\n\n    px(16) // 12px\n    px(16, true) // 16px\n    px(16px) // 12px\n    px(1.2em) // 14.4px\n    em(16px) // 0.75em\n\n    rem(16px) // 12px, 0.75rem\n\n    support-for-ie = false // No more px + rem output when using rem function\n\n    rem(16px) // 0.75rem\n    rem(16px, true) // 1rem\n\n    base-font-size = 100%\n\n    rem(16px) // 1rem\n   \n\n## License\n\nMIT\n","_attachments":{},"readmeFilename":"Readme.md","homepage":"https://github.com/blakeembrey/stylus-type-utils","license":"MIT"}