指南针中的垂直节奏和边距调整

时间:2014-04-14 19:17:27

标签: html css sass compass-sass

我试图理解为什么我需要增加像素值来减少边际。让我添加一些代码。

首先是基本的:

$base-font-size: 16px; 
$base-line-height: 24px;
@include establish-baseline; 

我想减少标签中的一些边距,为此我增加了像素值:

 h3 {
  font-weight:500;
  @include adjust-font-size-to(26px); 
  margin: rhythm(1, 56px) 0 0 0; /* 2 line above, 1 line below */
} 

为什么我需要增加px值?

1 个答案:

答案 0 :(得分:0)

好的,我认为你的问题有点不清楚。

首先,你的意思是"增加像素值#34;哪个值?

另外,它非常不完整,你使用了一些重置或蓝图吗?

$base-font-size: 16px; 
$base-line-height: 24px;
@include establish-baseline; 

所以,通过这个你设置你的基线,没关系。

h3 {
 font-weight:500;
 @include adjust-font-size-to(26px); 
 margin: rhythm(1, 56px) 0 0 0; /* 2 line above, 1 line below */

}

但这一部分尚不清楚。如果您没有使用您编写的代码,则不会应用边距或填充,因此您的问题无效。

您必须指定此值的来源。另外我认为你应该参考一下:

http://compass-style.org/reference/compass/typography/vertical_rhythm/

此外,这可以提供帮助:

https://medium.com/typography/34fe2f1d2c02

请更新答案并添加额外信息。