1

I would like to use the "column-span" function to return the width of the grid column, but without including a specific grid in this function, the global "grid" variable is used.

As I'm creating a mobile first design, the global grid variable is set to 4, but with breakpoint, using "add-grid", the div should include 16 columns at this specific grid. column-span ignores this, so it returns the column as If the grid is 4 column, not 16.

4

1 回答 1

1

因此,add-*在 Singularity 中的工作方式是,它不会自动为您编写不同的代码,而是在匹配的breakpoint媒体查询中更改默认值。Singularity 不会自动为您编写所有更改的原因是它无法知道您希望如何在不同的网格定义之间更改某些内容,而不是猜测和弄乱事物,它需要您准确指定您的方式想要改变。

我已经更新了您的链接,以显示column-span在适当的breakpointmixin 中再次调用实际上如何使用您定义的默认值。

于 2014-02-25T02:03:25.117 回答