susy container-style fixed widths

假装没事ソ 提交于 2019-12-25 08:56:55

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!