Commit bd7e569f725327f0ad784273741aa38e756ed495
1 parent
2c6577a1
Exists in
master
and in
4 other branches
Prevent top margin for first element in markdown/wiki/readme typography
Showing
2 changed files
with
12 additions
and
4 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap/mixins.scss
@@ -76,6 +76,10 @@ | @@ -76,6 +76,10 @@ | ||
76 | } | 76 | } |
77 | 77 | ||
78 | @mixin md-typography { | 78 | @mixin md-typography { |
79 | + *:first-child { | ||
80 | + margin-top: 0; | ||
81 | + } | ||
82 | + | ||
79 | code { padding: 0 4px; } | 83 | code { padding: 0 4px; } |
80 | h1 { margin-top: 30px;} | 84 | h1 { margin-top: 30px;} |
81 | h2 { margin-top: 25px;} | 85 | h2 { margin-top: 25px;} |
app/assets/stylesheets/gitlab_bootstrap/typography.scss
@@ -94,12 +94,16 @@ a:focus { | @@ -94,12 +94,16 @@ a:focus { | ||
94 | * | 94 | * |
95 | */ | 95 | */ |
96 | .wiki { | 96 | .wiki { |
97 | - font-size: 14px; | ||
98 | - line-height: 1.6; | ||
99 | @include md-typography; | 97 | @include md-typography; |
100 | 98 | ||
101 | - .white .highlight pre { background: #f5f5f5; } | ||
102 | - ul { margin: 0 0 9px 25px !important; } | 99 | + font-size: 14px; |
100 | + line-height: 1.6; | ||
101 | + .white .highlight pre { | ||
102 | + background: #f5f5f5; | ||
103 | + } | ||
104 | + ul { | ||
105 | + margin: 0 0 9px 25px !important; | ||
106 | + } | ||
103 | } | 107 | } |
104 | 108 | ||
105 | .md { | 109 | .md { |