{"id":32263089,"url":"https://github.com/startae/hagrid","last_synced_at":"2026-02-19T09:32:14.151Z","repository":{"id":15527863,"uuid":"18262406","full_name":"startae/hagrid","owner":"startae","description":":straight_ruler: Hagrid is a mixin library for responsive websites and web applications.","archived":false,"fork":false,"pushed_at":"2017-11-26T23:38:17.000Z","size":364,"stargazers_count":30,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-12T05:30:28.070Z","etag":null,"topics":["css","flexbox","grid","mixins","sass","scss"],"latest_commit_sha":null,"homepage":"https://hagrid.netlify.com/","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/startae.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-03-30T11:05:30.000Z","updated_at":"2025-02-06T02:32:07.000Z","dependencies_parsed_at":"2022-08-04T05:00:16.878Z","dependency_job_id":null,"html_url":"https://github.com/startae/hagrid","commit_stats":null,"previous_names":["felics/hagrid"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/startae/hagrid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startae%2Fhagrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startae%2Fhagrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startae%2Fhagrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startae%2Fhagrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/startae","download_url":"https://codeload.github.com/startae/hagrid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startae%2Fhagrid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29609524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["css","flexbox","grid","mixins","sass","scss"],"created_at":"2025-10-22T20:47:24.143Z","updated_at":"2026-02-19T09:32:14.146Z","avatar_url":"https://github.com/startae.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis](https://img.shields.io/travis/fspoettel/hagrid.svg?maxAge=2592000)]()\n[![npm](https://img.shields.io/npm/v/npm.svg?maxAge=2592000)]()\n\n**Hagrid is a mixin library for responsive websites and web applications.**\n\nIt helps you with authoring flexbox grid systems and local media queries by providing easy-to-use mixins. You do not have to edit your markup to make it work - the semantics are up to you.\n\n## Installation\n\n```\nbower install hagrid\n\nnpm install hagrid\n```\n\n```scss\n@import \"[path to hagrid]/hagrid\";\n```\n\n## Usage\n\n```scss\n\n// * Initialize a basic grid\n.parent {\n\n  @include g;\n\n  // * Initialize a grid with a set of modifiers\n  // * Modifiers are applied to all items of one grid\n  @include g(full, rev);\n\n  // * Alt. Syntax\n  @include grid(full, rev);\n\n}\n\n// * Initialize a grid-item with a set of responsive widths\n.item {\n\n  // * The general width is set without a breakpoint-keyword (e.g. md)\n  // * Responsive widths are set in the config-map $hagrid-breakpoints\n  @include i(1/2, 1/3 md, 1/4 lg);\n\n  // * If you initialize an item without arguments or a general width, it defaults to 100% (mobile first)\n  @include i;\n  @include i(2/3 md, 3/4 lg);\n\n  // * You can use whatever you want as values\n  // * Fractions work great for grids and allow for complex grids without doing math\n  // * Passing in false will prevent @i from setting any general width\n\n  // * Recommended\n  @include i(1/2, 1/3 md, 1/4 lg);\n\n  //* Possible\n  @include i(false, lg 50%);\n\n  // * You can use custom breakpoints in Hagrid. Those should be quoted\n  // * Breakpoints pointing at $hagrid-breakpoints should not be quoted\n  @include i(2/3 \"(min-width: 580px)\", 1/3 lg);\n\n  // * Alt. Syntax\n  @include item();\n}\n```\n\n## Options\n\n```scss\n\n// * Specify gutters between items. They are used like modifiers or applied to all grids\n// * If $layout-gutters exists it will be used instead (so you don't have to modify this file directly)\n$hagrid-gutters: (\n  default: 1.5rem,\n  full: 0,\n  narrow: 0.5rem,\n  wide: 3rem\n) !default;\n\n// * Set common breakpoints used in your project. Can be used in the @bp-mixin (see below)\n// * If $layout-breakpoints exists it will be used instead (so you don't have to modify this file directly)\n$hagrid-breakpoints: (\n  sm: \"(min-width: 35.5em)\",\n  md: \"(min-width: 48em)\",\n  lg: \"(min-width: 64em)\",\n  xl: \"(min-width: 80em)\"\n) !default;\n\n// * Gutters and modifiers are applied to all items of each grid-container\n// * By default, the selector `\u003e *` is used. If you use a consistent selector for grid-items, you can set it here\n$hagrid-item-selector: \"\u003e *\" !default;\n```\n\n## Modifiers\n\n```scss\n\n// * Modifiers are set on grids\n@include g(center, middle, full);\n```\n\n### x-axis Alignment\n\n- **right:** Align grid-items to the right in partially filled rows.\n- **center:** Center grid-items in partially filled rows.\n- **space-around:** Distribute items in partially filled rows by using variable space around them.\n- **space-between:** Distribute items in partially filled rows by using variable space between them.\n\n### y-axis Alignment\n\n- **bottom**: Align items to the bottom of the grid.\n- **middle**: Vertically center grid items.\n\n### Spacing\n\n\u003e You can provide custom gutters to the grid via the config-variable `$hagrid-gutters`. Use them as you would use a normal modifier. (e.g. `@include g(wide)`)\n\n### Direction\n\n- **rev:**  Reverted grid on x-axis.\n- **flip:** Reverted grid on y-axis.\n\n## Mixins\n\n- **bp:** Use breakpoints directly in a class.\n- **stretch:** Assign stretch-mixin to a group of grid-items in a grid to stretch-align their contents.\n\n### Example (bp)\n\n```scss\n\n.item {\n  // * Single Breakpoint\n  @include bp(md) {\n    text-align: left;\n  }\n\n  // * Multiple Breakpoints\n  @include bp(md, lg) {\n    text-align: left;\n  }\n\n  // * Specific Breakpoints\n  @include bp(\"(min-width: 568px and max-width: 640px)\") {\n    text-align: left;\n  }\n}\n```\n\n### Example (stretch)\n\n```scss\n\n.stretch {\n  @include g;\n  \u003e .item {\n    @include i;\n    @include stretch;\n  }\n}\n\n// Stretch accepts a selector as parameter, it defaults to \"\u003e *\"\n.stretch {\n  @include g;\n  \u003e .item {\n    @include i;\n    @include stretch(\".stretched-items\");\n  }\n}\n\n```\n\n## Auto Grids\n\nStarting in v3.0.0, you can let flexbox work out the grid for you - on any breakpoint - by passing `auto` to the `i`-mixin.\n\n### Example (Auto Grids)\n\n```scss\n\n// Basic automatic grid\n.auto {\n  @include g;\n}\n\n.auto-item {\n  @include i(auto);\n}\n\n// Pinned elements will keep their width - while their surrounding elements change.\n.auto-pinned {\n  @include g;\n}\n\n.auto-item--pinned {\n  @include i(1/3);\n}\n\n.auto-item {\n  @include i(auto);\n}\n\n// You can use automatic grids on any breakpoint you like\n.auto--responsive {\n  @include g;\n}\n\n.auto-item--responsive {\n  @include i(1/2, md auto);\n}\n\n```\n## Browser Support\n\n- Chrome\n- Firefox\n- Safari **6.1+**\n- Android **4.4+**\n- IE **10+**\n- Opera **12+**\n\nIf you need support for older browsers, you can use the `2.x` version range of hagrid. You can install it by running:\n\n```\nnpm install hagrid@2.0.2\nbower install hagrid@2.0.2\n```\n\n## Prefixes\n\nHagrid does not generate prefixes (`-webkit-`,`-ms-`) as it is designed to be integrated with common SASS workflows in mind (Gulp / Grunt with [Autoprefixer](https://github.com/postcss/autoprefixer)). A sample configuration for Autoprefixer is available in the [test build-file](https://github.com/felics/hagrid/blob/master/gulpfile.js#L24). Be careful not to set browsers in a way that generates legacy flexbox syntax!\n\n## Development\n\n### Requirements\n\n#### Gulp\n```\nnpm install gulp-cli -g\nnpm install gulp -D\n```\n\n### Running Locally\n```\ncd __test__/\ngulp\nopen index.html\n```\nIf you want to use sassdoc, you can build it by running `gulp sassdoc`.\n\n### Testing\nHagrid uses sass-lint to keep everything neat.\n```\nnpm test\n```\n\n## Credits\n\n- Started as a fork of [csswizardry-grids](http://github.com/csswizardry/csswizardry-grids)\n\n## License\n\nThe MIT License (MIT)\n\nCopyright © **2017 Felix Spöttel**\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartae%2Fhagrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstartae%2Fhagrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartae%2Fhagrid/lists"}