{"id":19739493,"url":"https://github.com/suitcss/utils-size","last_synced_at":"2026-01-11T13:30:53.029Z","repository":{"id":7226403,"uuid":"8534347","full_name":"suitcss/utils-size","owner":"suitcss","description":"CSS sizing utilities","archived":false,"fork":false,"pushed_at":"2017-11-07T19:25:03.000Z","size":117,"stargazers_count":38,"open_issues_count":0,"forks_count":22,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-10T09:05:18.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://suitcss.github.io/utils-size/test/","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/suitcss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-03T09:32:34.000Z","updated_at":"2023-06-15T01:09:43.000Z","dependencies_parsed_at":"2022-09-05T02:11:37.822Z","dependency_job_id":null,"html_url":"https://github.com/suitcss/utils-size","commit_stats":null,"previous_names":["suitcss/utils-dimension"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suitcss%2Futils-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suitcss%2Futils-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suitcss%2Futils-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suitcss%2Futils-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suitcss","download_url":"https://codeload.github.com/suitcss/utils-size/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223976082,"owners_count":17234751,"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-11-12T01:17:29.846Z","updated_at":"2026-01-11T13:30:53.016Z","avatar_url":"https://github.com/suitcss.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SUIT CSS utilities: size\n\n[![Build Status](https://travis-ci.org/suitcss/utils-size.svg?branch=master)](https://travis-ci.org/suitcss/utils-size)\n\nSUIT CSS sizing utilities. Sets `width` and `flex-basis`.\n\nRead more about [SUIT CSS's design principles](https://github.com/suitcss/suit/).\n\n## Installation\n\n* [npm](http://npmjs.org/): `npm install suitcss-utils-size`\n* Download: [zip](https://github.com/suitcss/utils-size/releases/latest)\n\n## Available classes\n\n* `u-sizeFit` - Make an element shrink wrap its content with `flex-basis`.\n* `u-sizeFull` - Make an element the width of its parent.\n* `u-sizeFill` - Make an element fill the remaining space. Distribute space evenly on multiple elements.\n* `u-sizeFillAlt` - An alternative method to make an element fill the remaining space. Distribute space based on element width.\n* `u-sizeXofY` (numerous) - Specify the proportional width of an object.\n\n`X` must be an integer less than `Y`.\n\n`Y` can be any of the following numbers: 2, 3, 4, 5, 6, 8, 10, 12.\n\n### Plugins\n\nUtilities that can be limited to specific Media Query breakpoints.\n\n* `u-sm-sizeXofY` - To use at the smallest Media Query breakpoint.\n* `u-md-sizeXofY` - To use at the medium Media Query breakpoint.\n* `u-lg-sizeXofY` - To use at the largest Media Query breakpoint.\n\n### Configuration\n\nThere are 3 Media Query breakpoints:\n\n* `--sm-viewport`\n* `--md-viewport`\n* `--lg-viewport`\n\nWhen using [postcss-custom-media](https://github.com/postcss/postcss-custom-media),\nbreakpoints can be configured using `@custom-media`. For example:\n\n```css\n@custom-media --sm-viewport (min-width:320px) and (max-width:640px);\n@custom-media --md-viewport (min-width:640px) and (max-width:960px);\n@custom-media --lg-viewport (min-width:960px);\n```\n\n## Usage\n\nPlease refer to the README for [SUIT CSS utils](https://github.com/suitcss/utils/)\n\n## Testing\n\nInstall [Node](http://nodejs.org) (comes with npm).\n\n```\nnpm install\n```\n\nTo generate a build:\n\n```\nnpm run build\n```\n\nTo generate the testing build.\n\n```\nnpm run build-test\n```\n\nTo lint code with [postcss-bem-linter](https://github.com/postcss/postcss-bem-linter) and [stylelint](http://stylelint.io/)\n\n```\nnpm run lint\n```\n\nTo watch the files for making changes to test:\n\n```\nnpm run watch\n```\n\nBasic visual tests are in `test/index.html`.\n\n## Browser support\n\nRefer to the [caniuse](http://caniuse.com/) page for [flexbox](http://caniuse.com/#feat=flexbox).\nThis package can still be used in older browsers if `width` is required\n\n* Google Chrome (latest)\n* Opera (latest)\n* Firefox 28+\n* Safari 6.1+\n* Internet Explorer 10+\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuitcss%2Futils-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuitcss%2Futils-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuitcss%2Futils-size/lists"}