Comments (5)
Nice work ;) I tested it on Mac in latest Chrome, Firefox and Safari and on iOS latest Safari.
It seems interesting to me for different type of listing, but I don't know if this feature must be added to the layout
module.
from objects.layout.
@florianbouvot yeah, but how do you use .layout
now when you have more than one row of layout items? For example, you don't know how many layout items there's gonna be? How do you set (consistent) spacing between layout items then?
With the solution I proposed we control the spacing within layout abstraction/object with $inuit-layout-gutter
(for small and large variants too) and don't rely on .layout__item
children to get bottom spacing from.
One addition, though, we could probably benefit from:
.layout__item {
> :last-child {
margin-bottom: 0;
}
}
from objects.layout.
@csswizardry any thoughts on this?
from objects.layout.
Hey.
I can’t remember that layout items ever carried a margin-bottom
; it doesn’t feel like it’s one of its responsibilities. If it did carry a margin bottom then this feels like a mistake/oversight on my part.
What I would suggest is simply adding that functionality yourself—it should be very simple. In your main.scss
:
@import "bower_components/inuit-layout/objects.layout"
.layout__item {
@extend %margin-bottom;
}
I’m really not sure layout items should carry ‘vertical gutters’.
from objects.layout.
If it did carry a margin bottom then this feels like a mistake/oversight on my part.
Oh, no, no, it never did (as far as I know) so no mistake on your part ;) It is a feature I personally missed when I learned about first version of csswizardry-grids.
I’m really not sure layout items should carry ‘vertical gutters’.
Yeah, it might be that I (and I lot of guys I work with) have a different view on this. There are number of circumstances where .layout
has items that span in multiple rows (gallery, eccomerce, blog posts etc.) and handling their vertical space from one place (layout object) seems logical to me. I am curious how to handle these situations currently?
This is how I see layout/grid with horizontal AND vertical spacing between them (even though in the link items are spaced using child <p>
element). With the solution I proposed you could even set different vertical gutter via $inuit-layout-gutter-bottom
(which could default to $inuit-layout-gutter
or $inuit-base-spacing-unit
). But the point is all of these settings are taking place within layout object, not via extending or child elements. There you can set it using variables for small and large layouts as well.
But.. I do not have a problem extending this functionality, just would be happier if it was part of the module itself :)
from objects.layout.
Related Issues (9)
- How do you handle responsive design with the layout object? HOT 1
- inline-block and spaces HOT 1
- Using flexbox? HOT 2
- `o-` prefix HOT 3
- Idea: Use font-size: 0; HOT 2
- Why the name change? HOT 2
- Fighting gaps between layout__item HOT 2
- responsive layout gaps HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from objects.layout.