问题
I have an issue where susy grids doesn't seem to be applying fixed widths to inner columns. Here is my issue http://sassmeister.com/gist/7633527
What I was expecting is that when I have $container-style: static
that any inner columns widths would get pixel widths but they don't. If $container-style: fluid
is set then percentage widths would be applied.
Am I misunderstanding something about how $container-style
works? Any pointers would be appreciated.
回答1:
You're right, but in this case you've provided Susy with conflicting settings. Your basic grid settings (80px
columns, 20px
gutters, and 20px
grid-padding) don't add up to your $container-width
setting:
(12*80px)+(13*20px) = 1220px != 1180px
Really, Susy should probably throw an error in this case (and in Susy 2.0 it will). But 1.x was built around the idea of fluid internals, and a container to control the overall width/style. So in 1.x, when Susy can't make the static numbers add up, it simply uses your container settings on the container, and your column/gutter settings to get the right ratio for internal elements.
If you want fully static grids, you need to get rid of your $container-width
setting. If you want an 1180px
grid, make sure your columns/gutters/padding add up to 1180px
.
来源:https://stackoverflow.com/questions/20182204/susy-container-style-fixed-widths