Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid system #11

Closed
tristen opened this issue Dec 5, 2016 · 4 comments
Closed

Grid system #11

tristen opened this issue Dec 5, 2016 · 4 comments
Assignees

Comments

@tristen
Copy link
Member

tristen commented Dec 5, 2016

We're going to build our grid system using Flexbox. Mostly because it happily does what you'd expect: containers of variable heights flow evenly. I'm just going to get started using it for our column rules!

The goal is to create something like this:

screen shot 2016-12-05 at 3 41 14 pm

In a clean and efficient way using base. Establish a grid, be able to break out of the grid and still line up evenly against columns in the container.

Notes

Naming cols, col-2

A parent container cols defines the Flexbox properties how immediate child columns should operate. each column container has col- followed by the number it takes up.

Gutters cols-gut-10

Gutters provide proper spacing between the content within containers. If a gutter is defined it should create the spacing in-between each column and still be flush to the left and right of the parent container. Frameworks typically use negative margins to get around this. I'll look into other possibilities but will probably use a margin right with nth-child(Nn+N) selector to zero out margins on last elements.

Limiters

limiter name should be explicit by pixel width (i.e limiter-1500 where width is 1500px). There should be a handful of limiter widths we can use.

Breakpoints

Breakpoints supported are: mobile, tablet, & wide. Adapting to the number of columns you should see for each of these breakpoints should be explicit and to the choice of the content creator by a class naming convention like col-mobile-4.

@tristen tristen self-assigned this Dec 5, 2016
@davidtheclark
Copy link
Contributor

@tristen What are the .col-mar- classes for? Are those to offset columns (e.g. I only want a 1/3-width column in the last third of the row)? If so, what do we think about just asking people to use empty divs for such spacers? Are you opposed to that?

@tristen
Copy link
Member Author

tristen commented Dec 7, 2016

Ahhh I'm not really into the idea of using empty containers to represent spacing. Not only does it look awkward in HTML it's strange If you're doing something like document.createElement('div') to insert nodes.

Instead of .col-mar- what if we named it .col-offset-?

@davidtheclark
Copy link
Contributor

Instead of .col-mar- what if we named it .col-offset-?

👍

tristen added a commit that referenced this issue Dec 7, 2016
@tristen
Copy link
Member Author

tristen commented Dec 7, 2016

This is in a good place. Closing out!

@tristen tristen closed this as completed Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants