不是 100% 清楚你在你的问题中要求什么,但我希望我做对了 - 你想知道如何在不改变网格大小的情况下更改字体吗?
然后可以在文档中找到答案:
/* Since the typical default browser font-size is 16px, that makes the calculation for grid size. */
/* If you want your base font-size to be a different size and not have it effect grid size too, */
/* set the value of $em-base to $base-font-size ($em-base: $base-font-size;) */
$em-base: 16px !default;
所以基本上只是设置:
@import "foundation/variables";
$base-font-size: 4px;
$em-base: $base-font-size;
将 em-base 改回默认值,您会看到网格也相应更改为 $base-font-size。您还可以通过设置行宽来做正确的事情。
如果您在使 SASS 函数 em-calc() 工作时遇到问题,请确保在@import "foundation/variables";
我不知道文档中为什么使用 em-calc() 之后调用它,也许git上的源代码已过时 - 但是我不得不使用 emCalc(#px) - 即:emCalc(2000px);