diff --git a/components/style/mixins/typography.less b/components/style/mixins/typography.less index 53432f594c26..9899b7cf669f 100644 --- a/components/style/mixins/typography.less +++ b/components/style/mixins/typography.less @@ -3,12 +3,14 @@ margin-bottom: 1em; } -.typography-title(@fontSize; @fontWeight; @lineHeight; @headingColor; @headingMargin) { +.typography-title(@fontSize; @fontWeight; @lineHeight; @headingColor; @headingMarginRight; @headingMarginBottom; @headingMarginLeft) { font-size: @fontSize; font-weight: @fontWeight; line-height: @lineHeight; color: @headingColor; - margin: @headingMargin; + margin-right: @headingMarginRight; + margin-bottom: @headingMarginBottom; + margin-left: @headingMarginLeft; } .typography-title-1() { @@ -17,7 +19,9 @@ @typography-title-font-weight, 1.23, @heading-color, - @typography-title-margin + @typography-title-margin-right, + @typography-title-margin-bottom, + @typography-title-margin-left ); } .typography-title-2() { @@ -26,7 +30,9 @@ @typography-title-font-weight, 1.35, @heading-color, - @typography-title-margin + @typography-title-margin-right, + @typography-title-margin-bottom, + @typography-title-margin-left ); } .typography-title-3() { @@ -35,7 +41,9 @@ @typography-title-font-weight, 1.35, @heading-color, - @typography-title-margin + @typography-title-margin-right, + @typography-title-margin-bottom, + @typography-title-margin-left ); } .typography-title-4() { @@ -44,6 +52,8 @@ @typography-title-font-weight, 1.4, @heading-color, - @typography-title-margin + @typography-title-margin-right, + @typography-title-margin-bottom, + @typography-title-margin-left ); } diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 35aa005d3a8f..1f4a4f2d2f07 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -681,6 +681,7 @@ // Typography // --- @typography-title-font-weight: 600; -@typography-title-margin: 0 0 0.5em 0; @typography-title-margin-top: 1.2em; -@typography-prefix-cls: ~'@{ant-prefix}-typography'; +@typography-title-margin-right: 0; +@typography-title-margin-bottom: 0.5em; +@typography-title-margin-left: 0; diff --git a/components/typography/style/index.less b/components/typography/style/index.less index ccb447ac1c29..6d7375972dba 100644 --- a/components/typography/style/index.less +++ b/components/typography/style/index.less @@ -1,6 +1,8 @@ @import '../../style/themes/index'; @import '../../style/mixins/index'; +@typography-prefix-cls: ~'@{ant-prefix}-typography'; + // =============== Basic =============== .@{typography-prefix-cls} { color: @text-color;