From bd7e569f725327f0ad784273741aa38e756ed495 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 29 Jul 2013 21:24:38 +0300 Subject: [PATCH] Prevent top margin for first element in markdown/wiki/readme typography --- app/assets/stylesheets/gitlab_bootstrap/mixins.scss | 4 ++++ app/assets/stylesheets/gitlab_bootstrap/typography.scss | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/gitlab_bootstrap/mixins.scss b/app/assets/stylesheets/gitlab_bootstrap/mixins.scss index 865c593..b9abb5e 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/mixins.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/mixins.scss @@ -76,6 +76,10 @@ } @mixin md-typography { + *:first-child { + margin-top: 0; + } + code { padding: 0 4px; } h1 { margin-top: 30px;} h2 { margin-top: 25px;} diff --git a/app/assets/stylesheets/gitlab_bootstrap/typography.scss b/app/assets/stylesheets/gitlab_bootstrap/typography.scss index 07df7f5..69292ca 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/typography.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/typography.scss @@ -94,12 +94,16 @@ a:focus { * */ .wiki { - font-size: 14px; - line-height: 1.6; @include md-typography; - .white .highlight pre { background: #f5f5f5; } - ul { margin: 0 0 9px 25px !important; } + font-size: 14px; + line-height: 1.6; + .white .highlight pre { + background: #f5f5f5; + } + ul { + margin: 0 0 9px 25px !important; + } } .md { -- libgit2 0.21.2