Commit 6ac9aafe authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'email-block-formatting' into 'master'

Format email messages in code blocks

See merge request gitlab-org/gitlab!76977
parents a39b5ded d9e12b8f
...@@ -419,6 +419,30 @@ ...@@ -419,6 +419,30 @@
height: $gl-font-size * $code-line-height * 0.9; height: $gl-font-size * $code-line-height * 0.9;
} }
@mixin email-code-block {
.code.language-email {
font-family: inherit;
font-size: inherit;
code {
white-space: pre-wrap;
font-family: inherit;
// Rouge `Name.Tag` and `Operator` token (email header key + ':')
.nt,
.o {
color: inherit;
font-weight: bold;
}
// Rouge `Name.Attribute` token (email header value)
.na {
color: inherit;
}
}
}
}
@mixin avatar-counter($border-radius: 1em) { @mixin avatar-counter($border-radius: 1em) {
background-color: $gray-darkest; background-color: $gray-darkest;
color: $white; color: $white;
......
...@@ -597,6 +597,8 @@ ...@@ -597,6 +597,8 @@
.text-justify { .text-justify {
text-align: justify !important; text-align: justify !important;
} }
@include email-code-block;
} }
/** /**
......
@import 'framework/mixins';
@import 'framework/variables'; @import 'framework/variables';
img { img {
...@@ -38,3 +39,14 @@ pre.commit-message { ...@@ -38,3 +39,14 @@ pre.commit-message {
.gl-label-text-dark { .gl-label-text-dark {
color: $gl-text-color; color: $gl-text-color;
} }
.content {
.markdown-code-block pre.code {
padding: $gl-padding-8 $input-horizontal-padding;
margin: 0 0 $gl-padding-8;
border: 1px solid $gray-100;
border-radius: $border-radius-small;
}
@include email-code-block;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment