{"id":19739522,"url":"https://github.com/suitcss/utils","last_synced_at":"2025-04-05T05:04:05.150Z","repository":{"id":4870546,"uuid":"6025564","full_name":"suitcss/utils","owner":"suitcss","description":"CSS utility classes","archived":false,"fork":false,"pushed_at":"2017-04-28T20:43:46.000Z","size":68,"stargazers_count":304,"open_issues_count":0,"forks_count":27,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-10-15T10:03:14.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://suitcss.github.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"BenHall/heroku-buildpack-mono","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":"2012-10-01T05:09:45.000Z","updated_at":"2024-03-05T00:24:30.000Z","dependencies_parsed_at":"2022-08-20T07:20:46.946Z","dependency_job_id":null,"html_url":"https://github.com/suitcss/utils","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suitcss%2Futils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suitcss%2Futils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suitcss%2Futils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suitcss%2Futils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suitcss","download_url":"https://codeload.github.com/suitcss/utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266562,"owners_count":20910836,"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:34.630Z","updated_at":"2025-04-05T05:04:05.135Z","avatar_url":"https://github.com/suitcss.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SUIT CSS utilities\n\nThe full collection of SUIT CSS utility classes. Requires\n[suitcss-preprocessor](https://github.com/suitcss/preprocessor) or similar in\nyour build process, if you choose to use the packages directly.\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`\n* [Download](https://github.com/suitcss/utils/releases/latest) (compiled)\n\n…is a convenient way to install all the SUIT utility packages:\n\n* [utils-align](https://github.com/suitcss/utils-align/): Vertical alignment\n* [utils-display](https://github.com/suitcss/utils-display/): Display types\n* [utils-layout](https://github.com/suitcss/utils-layout/): Clearfix, floats, and new block formatting contexts\n* [utils-link](https://github.com/suitcss/utils-link/): Link things\n* [utils-offset](https://github.com/suitcss/utils-offset/): The `before` and `after` packages\n* [utils-position](https://github.com/suitcss/utils-position/): Positioning utilities\n* [utils-size](https://github.com/suitcss/utils-size/): Percentage sizing utilities\n* [utils-text](https://github.com/suitcss/utils-text/): Text truncation, breaking, and alignment\n* [utils-flex](https://github.com/suitcss/utils-flex): Align elements with Flexbox\n\n## Usage\n\nUtilities are low-level. They have a very narrow scope and may end up being\nused frequently, due to their separation from the semantics of the document and\nthe theming of a component. As a result, once a class is in significant use\ngreat care should be taken when introducing any modifications to it.\n\nUtilities make use of `!important` to ensure that their styles always apply\nahead of those defined in a component's dedicated CSS.\n\n### Templating\n\nEach utility class modifies a single trait (a small collection of similar\nstyles).\n\nTo apply a trait, or a combination of traits to an element, add the\ncorresponding class directly to the HTML.\n\nTogether, they can form a wide variety of UI patterns from simple principles.\nAlthough you won't _always_ want to use combinations of utilities to generate\nmore complicated patterns, the option is there. Refactoring a component's HTML\nto move particular utility traits into the component's own styles is a\nrelatively simple task.\n\nThe following contrived example would be a structural template for a simple\nTweet-like component. You would then create a new CSS file for the component to\ncontain any additional, specific styles (often a \"skin\" or \"theme\") needed to\nfully realise the component.\n\n```html\n\u003carticle class=\"Tweet\"\u003e\n  \u003ca class=\"u-floatRight\" href=\"{{permalinkUrl}}\"\u003e\n    {{time}}\n  \u003c/a\u003e\n  \u003ca class=\"u-floatLeft\" href=\"{{userUrl}}\"\u003e\n    \u003cimg src=\"{{userAvatar}}\" alt=\"{{username}}'s avatar\"\u003e\n  \u003c/a\u003e\n  \u003cdiv class=\"u-sizeFill\"\u003e\n    \u003ca class=\"u-linkComplex\" href=\"{{userUrl}}\"\u003e\n      \u003cspan class=\"u-linkComplexTarget\"\u003e{{fullname}}\u003c/span\u003e\n      \u003cspan\u003e@{{username}}\u003c/span\u003e\n    \u003c/a\u003e\n\n    \u003cp class=\"u-textBreak\"\u003e{{text}}\u003c/p\u003e\n\n    \u003cdiv\u003e\n      \u003ca class=\"u-linkComplex\" href=\"#\" role=\"button\"\u003e\n        \u003cspan class=\"Icon Icon--reply\"\u003e\u003c/span\u003e\n        \u003cspan class=\"u-linkComplexTarget\"\u003eReply\u003c/span\u003e\n      \u003c/a\u003e\n      \u003ca href=\"#\" role=\"button\"\u003e\n        \u003cspan class=\"Icon Icon--favorite\"\u003e\u003c/span\u003e\n        \u003cspan class=\"u-hiddenVisually\"\u003eFavorite\u003c/span\u003e\n      \u003c/a\u003e\n      ...\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/article\u003e\n```\n\n## Building\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\n## Browser support\n\n* Google Chrome (latest)\n* Opera (latest)\n* Firefox 4+ (28+ for `flex`)\n* Safari 5+ (6.1+ for `flex`)\n* Internet Explorer 9+ (10+ for `flex`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuitcss%2Futils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuitcss%2Futils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuitcss%2Futils/lists"}