{"id":13397278,"url":"https://github.com/oddbird/accoutrement-scale","last_synced_at":"2025-04-08T22:32:15.663Z","repository":{"id":22616795,"uuid":"25959167","full_name":"oddbird/accoutrement-scale","owner":"oddbird","description":"Size and scale helpers for typography and layout ","archived":false,"fork":false,"pushed_at":"2018-04-04T16:05:18.000Z","size":1098,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-29T18:48:44.283Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","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/oddbird.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-30T07:12:12.000Z","updated_at":"2024-03-03T03:38:27.000Z","dependencies_parsed_at":"2022-08-24T14:09:31.961Z","dependency_job_id":null,"html_url":"https://github.com/oddbird/accoutrement-scale","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbird%2Faccoutrement-scale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbird%2Faccoutrement-scale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbird%2Faccoutrement-scale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbird%2Faccoutrement-scale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oddbird","download_url":"https://codeload.github.com/oddbird/accoutrement-scale/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247935505,"owners_count":21020845,"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-07-30T18:01:14.800Z","updated_at":"2025-04-08T22:32:15.619Z","avatar_url":"https://github.com/oddbird.png","language":"CSS","funding_links":[],"categories":["CSS"],"sub_categories":[],"readme":"accoutrement-scale\n==================\n\nSass size \u0026 scale management tools\nby [OddBird][oddbird].\nGather all your sizes into a single map,\ngenerate new sizes based on [modular scales][ms]\nor arbitrary functions,\nand access them by name.\n\n[oddbird]: http://oddbird.net/\n[ms]: http://www.modularscale.com/\n\n\nMore Accoutrement Tools\n-----------------------\n\n- [Init](http://oddbird.net/accoutrement-init/)\n  provides light-weight browser-normalization.\n- [Color](http://oddbird.net/accoutrement-color/)\n  provides color-palette management and contrast-ratio utilities.\n- [Type](http://oddbird.net/accoutrement-type/)\n  provides webfont management tools,\n  and other typography helpers.\n- [Layout](http://oddbird.net/accoutrement-layout/)\n  provides layout utilities such as\n  box-sizing, intrinsic ratios, z-index management,\n  named media-queries, and a clearfix.\n\n\nQuick Start\n-----------\n\nInstall the package with npm or yarn:\n\n```bash\nnpm install accoutrement-scale\nyarn add accoutrement-scale\n```\n\nImport the library:\n\n```scss\n@import '\u003cpath-to\u003e/accoutrement-scale/sass/scale';\n```\n\nEstablish your palette of ratios (modular scales) and sizes:\n\n```scss\n$ratios: (\n  'my-ratio': 1.25,\n);\n\n$sizes: (\n  // define explicit values\n  'root': 24px,\n  'icons': 1em,\n  'page': 8in,\n\n  // reference existing sizes\n  'text': 'root'\n\n  // apply adjustments and conversions\n  // using named-ratios or arbitrary functions\n  'rhythm': 'root' ('fifth': 1, 'convert-units': 'rem'),\n\n  'h1': 'root' ('my-ratio': 3),\n  'h2': 'root' ('my-ratio': 2),\n  'h3': 'root' ('my-ratio': 1),\n\n  // define calc() output based on existing sizes\n  'viewport-relative': calc(%s + %s) ('root', 2vw),\n);\n```\n\nAccess your named sizes using the `size()` function,\nand even convert-units on-the-fly:\n\n```scss\n.example {\n  font-size('text');\n  width: size('page', 'px');\n}\n```\n\nWe can only calculate integer steps along an exponential modular scale,\nbut if you want more power,\ninstall [MathSass][mathsass],\nand we'll let them do the hard math.\n\n```scss\n$sizes: (\n  'complex': 'root' ('my-scale': 1.25),\n);\n```\n\n[mathsass]: https://github.com/terkel/mathsass\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foddbird%2Faccoutrement-scale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foddbird%2Faccoutrement-scale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foddbird%2Faccoutrement-scale/lists"}