{"id":16232187,"url":"https://github.com/ryanfitzgerald/construct","last_synced_at":"2025-06-30T11:03:44.987Z","repository":{"id":57206318,"uuid":"93693106","full_name":"RyanFitzgerald/construct","owner":"RyanFitzgerald","description":"Ultra-simple, Sass-based grid boilerplate for quick project setups","archived":false,"fork":false,"pushed_at":"2017-08-29T22:39:37.000Z","size":42,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T03:51:08.871Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RyanFitzgerald.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-08T01:01:09.000Z","updated_at":"2020-07-18T17:14:52.000Z","dependencies_parsed_at":"2022-09-11T05:30:16.881Z","dependency_job_id":null,"html_url":"https://github.com/RyanFitzgerald/construct","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RyanFitzgerald/construct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanFitzgerald%2Fconstruct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanFitzgerald%2Fconstruct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanFitzgerald%2Fconstruct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanFitzgerald%2Fconstruct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RyanFitzgerald","download_url":"https://codeload.github.com/RyanFitzgerald/construct/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanFitzgerald%2Fconstruct/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262762432,"owners_count":23360326,"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-10-10T13:08:21.197Z","updated_at":"2025-06-30T11:03:44.967Z","avatar_url":"https://github.com/RyanFitzgerald.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Construct\n\nConstruct is an ultra-simple, Sass-based grid boilerplate system that is mobile first (~7KB Minified). The goal is to only provide the absolute necessities and stay out of your way for the rest. Construct provides style normalization, a simple grid system, and a small number of helper classes to make life a little easier. Construct doesn't make any changes to page colours, fonts (except base size), backgrounds, form elements, or anything of the sort.\n\n![Grid](https://user-images.githubusercontent.com/9112801/27518314-f93f9760-59aa-11e7-9cb1-12cee2b6e41b.png)\n\n## Installation\n\nClone this repo or simply pull the compiled CSS file into any project you're working on.\n\n```html\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"path/to/construct.css\"\u003e\n```\n\nAlternatively, you can run ```npm install construct-css``` to download it as an npm module.\n\n## Usage\n\nConstruct works in terms of rows and columns, meaning each row has a series of nested columns that indicate their relative widths (more on the grid below). For example, the basic structure is as follows:\n\n```html\n\u003cdiv class=\"row\"\u003e\n    \u003cdiv class=\"sm-6 column\"\u003e\n        Column Content Here\n    \u003c/div\u003e\n    \u003cdiv class=\"sm-6 column\"\u003e\n        Column Content Here\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nFor more extensive examples on how to use the grid, take a look at the ```index.html``` within the project repo.\n\n## Grid\n\nThe grid system works in terms of small, medium, large, and extra large screen sizes (defined within ```_variables.scss```). The grid works mobile-first, meaning if you apply a class at a smaller screen size, it will ripple up to larger screen sizes unless any of the larger screen sizes have their own class applied.\n\n### Basic\n\nBy default, rows consist of a total of 12 columns (this can be changed within ```_variables.scss```), therefore when defining columns for a row, they should total 12. The basic syntax is *SIZE-#COLS*. The available sizes are small (sm), medium (md), large (lg), and extra large (xl). An example usage is as follows:\n\n```html\n\u003cdiv class=\"row\"\u003e\n    \u003cdiv class=\"sm-6 lg-8 column\"\u003e\n        Column Content Here\n    \u003c/div\u003e\n    \u003cdiv class=\"sm-6 lg-4 column\"\u003e\n        Column Content Here\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nThe above example has both columns 6 wide on both small and medium screens and 8 and 4 wide respectively on large and extra large screens. The ```column``` class is added to each column to indicate that its a column and if it's the only class defined, it will default to a full row width column.\n\n#### Screen Sizes\n\nThe default screen sizes are as follows:\n- Small: 0 - 639px\n- Medium: 640px - 1023px\n- Large: 1024px - 1439px\n- Extra Large: 1440px onwards\n\n### Nesting\n\nRows can also be nested easily by defining another row + column pair within a parent column. For example:\n\n```html\n\u003cdiv class=\"row\"\u003e\n    \u003cdiv class=\"md-6 column\"\u003e\n        md-6 column\n    \u003c/div\u003e\n    \u003cdiv class=\"md-6 column\"\u003e\n        \u003cdiv class=\"row\"\u003e\n            \u003cdiv class=\"md-8 column\"\u003e\n                md-8 column\n            \u003c/div\u003e\n            \u003cdiv class=\"md-4 column\"\u003e\n                md-4 column\n            \u003c/div\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nTo see it in action, take a look at the \"Nested Grid\" section of ```index.html```.\n\n### Offsets\n\nIf you don't necessarily need columns taking up the entire row, you can offset columns as well. For example:\n\n```html\n\u003cdiv class=\"row\"\u003e\n    \u003cdiv class=\"sm-4 column\"\u003e\n        sm-4 column\n    \u003c/div\u003e\n    \u003cdiv class=\"sm-4 sm-offset-4 column\"\u003e\n        sm-4 sm-offset-4 column\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nThe above example has 2 columns, both 4 wide, however the second column offsets by 4 as well, so the end result would be a 4-width column on the left and a 4-width column on the right, with 4 column space in the middle.\n\nTo see it in action, take a look at the \"Offsets\" section of ```index.html```.\n\n### Column Ordering\n\nYou can change the order of columns by utilizing ```SIZE-push-NUM \u0026 SIZE-pull-NUM```. For example:\n\n```html\n\u003cdiv class=\"row\"\u003e\n    \u003cdiv class=\"sm-4 md-push-8 column\"\u003e\n        sm-4 md-push-8 column\n    \u003c/div\u003e\n    \u003cdiv class=\"sm-8 md-pull-4 column\"\u003e\n        sm-8 md-pull-4 column\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nOn small screens, the order will be the 4-col and then the 8-col, however once you hit a medium screen and up, the order will be the 8-col and then the 4-col. In order to use push/pull, you must use push on the first column in the amount of the second column and pull on the second column in the amount of the first column.\n\n### Full-Width Rows\n\nIf you don't want a row to be capped by the max-width for whatever reason, you can simply add a ```.full-width``` class to the row to make it fill the width of the viewport. For example:\n\n```html\n\u003cdiv class=\"row full-width\"\u003e\n    \u003cdiv class=\"sm-6 md-4 lg-6 column\"\u003e\n        sm-6 md-4 lg-6 column\n    \u003c/div\u003e\n    \u003cdiv class=\"sm-6 md-4 lg-3 column\"\u003e\n        sm-6 md-4 lg-3 column\n    \u003c/div\u003e\n    \u003cdiv class=\"md-4 lg-3 column\"\u003e\n        md-4 lg-3 column\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nTo see it in action, take a look at the \"Full Width\" section of ```index.html```.\n\n## Helpers\n\nConstruct comes with a number of helper classes to try and make life a little easier. The helpers currently available are:\n\n| Name | Description | Class |\n| ---- | ----------- | ----- |\n| Clearfix | Self-clears it's child elements | .clearfix |\n| Text Center | Centers text within an element | .text-center |\n| Small Center | Centers a column on small size and up | .sm-center |\n| Medium Center | Centers a column on medium size and up | .md-center |\n| Large Center | Centers a column on large size and up | .lg-center |\n| Extra Large Center | Centers a column on extra large size and up | .xl-center |\n| Hide Small | Hides an element only on small sizes | .hide-sm |\n| Hide Medium | Hides an element only on medium sizes | .hide-md |\n| Hide Large | Hides an element only on large sizes | .hide-lg |\n| Hide Extra Large | Hides an element only on extra large sizes | .hide-xl |\n| Hide Medium Up | Hides an element on medium sizes and up | .hide-md-up |\n| Hide Large Up | Hides an element on large sizes and up | .hide-lg-up |\n| No Print | Hides an element on print | .no-print |\n\n## Credits\n\n- [Normalize.css](https://github.com/necolas/normalize.css/) for style normalization\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfitzgerald%2Fconstruct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanfitzgerald%2Fconstruct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfitzgerald%2Fconstruct/lists"}