Skip to content
New issue

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

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

Already on GitHub? # to your account

image grid margins #102

Closed
Sciss opened this issue Nov 20, 2014 · 1 comment
Closed

image grid margins #102

Sciss opened this issue Nov 20, 2014 · 1 comment

Comments

@Sciss
Copy link

Sciss commented Nov 20, 2014

in _sass/grid.scss I can see some macros like "prefix", "push" etc. What is their purpose and how to I use them? I would like to sometimes add a margin to an image grid. If I just add a style="padding-right: 4ex" to the img, for example, the image size is not affected.

@mmistakes
Copy link
Owner

They grid system is fairly basic. With my latest theme and personal site I moved over to Bourbon's Neat.

But the basic idea is you include various mixins that help take care of all the maths. By default I'm using a 12 column grid but that can be changed in _sass/grid.scss if you want to go with a 16 or something else.

To make an element span 10 out of 12 columns you'd use the following mixin @include column(12,10); to make it span 6 out of 12 @include column(12,6);

Then there are mixins to add space before and after an element. @include prefix(12,1); would add 1 column before and @include suffix(12,2); would add 2 columns after.

You can also do things like @include prefix(12,0.5); and add a half column of space before. The push and pull mixins work in the same way. Instead of adding margin to an element it moves them by relatively positioning them to the left or right of the parent element.

Doing image grids/galleries can be tricky and if that's your intention I'd suggest using a more fleshed out system like Susy. It's way more customizable and meant for that sort of thing.

cjmadsen pushed a commit to cjmadsen/cjmadsen.github.io that referenced this issue Dec 7, 2016
theRealSuperMario pushed a commit to theRealSuperMario/therealsupermario.github.io that referenced this issue Jul 18, 2020
nweat pushed a commit to nweat/nweat-old-portfolio that referenced this issue Feb 1, 2023
…n/eslint-plugin-vue-9.6.0

chore(deps-dev): bump eslint-plugin-vue from 9.4.0 to 9.6.0
koyumi0601 pushed a commit to koyumi0601/koyumi0601.github.io that referenced this issue Jul 31, 2023
Remove unnecessary console.log()
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants