diff options
author | Douwe Maan <douwe@selenight.nl> | 2019-03-23 14:09:14 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2019-03-26 14:29:33 +0100 |
commit | 838f7e56a407aa335cf4406632373bac3d05dee0 (patch) | |
tree | 07848abf08df3b4724e6e2a746636856766ab95f /app/assets/stylesheets/framework/typography.scss | |
parent | 30479246ed4ed2cdbadb4d359a38e592ffef2fe5 (diff) | |
download | gitlab-ce-838f7e56a407aa335cf4406632373bac3d05dee0.tar.gz |
Remove .wiki and @md-typography mixin in favor of .md and .md-file
Before, the styling for `img:not(.emoji)`` was repeated between
`.md:not(.use-csslab):not(.wiki)` (for comments and the Markdown
preview), `.documentation.wiki` (for help pages), and
`.issuable-details .description .wiki` (for MR and issue descriptions).
In these places, we now simply use `.md`. Wherever we use `.md` but
don't want this image styling (like wikis and blobs), `.md-file` is
added.
Diffstat (limited to 'app/assets/stylesheets/framework/typography.scss')
-rw-r--r-- | app/assets/stylesheets/framework/typography.scss | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index 5e5e8bcc3d6..89b8957543d 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -1,4 +1,8 @@ -@mixin md-typography { +/** + * Apply Markdown typography + * + */ +.md:not(.use-csslab) { color: $gl-text-color; word-wrap: break-word; @@ -28,6 +32,14 @@ max-width: 100%; } + &:not(.md-file) img:not(.emoji) { + border: 1px solid $white-normal; + padding: 5px; + margin: 5px 0; + // Ensure that image does not exceed viewport + max-height: calc(100vh - 100px); + } + p a:not(.no-attachment-icon) img { // Remove bottom padding because // <p> already has $gl-padding bottom @@ -368,28 +380,6 @@ code { } /** - * Apply Markdown typography - * - */ -.wiki:not(.use-csslab) { - @include md-typography; -} - -.md:not(.use-csslab) { - @include md-typography; - - &:not(.wiki) { - img:not(.emoji) { - border: 1px solid $white-normal; - padding: 5px; - margin: 5px 0; - // Ensure that image does not exceed viewport - max-height: calc(100vh - 100px); - } - } -} - -/** * Textareas intended for GFM * */ |