Skip to content

Instantly share code, notes, and snippets.

@marcfly7
Last active April 23, 2017 07:00
Show Gist options
  • Save marcfly7/994ad179acb7913b5362ae68fa1b81a8 to your computer and use it in GitHub Desktop.
Save marcfly7/994ad179acb7913b5362ae68fa1b81a8 to your computer and use it in GitHub Desktop.
Markdown-here-marcfly7
/*
* NOTE:
* - The use of browser-specific styles (-moz-, -webkit-) should be avoided.
* If used, they may not render correctly for people reading the email in
* a different browser than the one from which the email was sent.
* - The use of state-dependent styles (like a:hover) don't work because they
* don't match at the time the styles are made explicit. (In email, styles
* must be explicitly applied to all elements -- stylesheets get stripped.)
*/
/* This is the overall wrapper, it should be treated as the `body` section. 这里提示说,这个是整体的格式包装器,用来渲染整个body部分,所以正文的部分格式,应该是在这里设置的*/
.markdown-here-wrapper {
/* 字号设置为14px;line-height行高为1.8em(通常来讲1.8em相当于1.8 x 16px = 28.8px),letter-spacing设置为2px,字体等等*/
font-size: 15px;
line-height: 1.8em;
letter-spacing: 3px;
font-family: -apple-system-font,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
margin: auto 15px !important; /*外边框上下自动,左右各15px*/
/*这里的两端对齐对微信公众号没有作用,有知道的人麻烦告知下怎么做。
text-align: justify;
text-justify: inter-ideograph;
*/
}
/* To add site specific rules, you can use the `data-md-url` attribute that we
add to the wrapper element. Note that rules like this are used depending
on the URL you're *sending* from, not the URL where the recipient views it.
*/
/* .markdown-here-wrapper[data-md-url*="mail.yahoo."] ul { color: red; } */
/*设置pre和code,pre就是那个>引用,code就是包括在```和```之间的代码*/
pre, code {
font-size: 14px;
font-family: -apple-system-font,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
margin: auto 5px;/*auto表示自动调整,在这里表示上下居中,左右各5px*/
}
/*对文章代码的设置*/
code {
margin: 0 0.15em;
padding: 0 0.3em;
white-space: pre-wrap;
border: 1px solid #EAEAEA;
background-color: #F8F8F8;
border-radius: 3px;
display: inline; /* added to fix Yahoo block display of inline code */
}
/*对引用的设置:设置成block*/
pre {
font-size: 14px;
line-height: 1.4em;
display: block; !important;
}
/*对引用的后代code(就是不管第几代,这里也就是引用里面的内容,不管引用多少次,都这样设置)的设置*/
pre code {
white-space: pre;
overflow: auto; /* fixes issue #70: Firefox/Thunderbird: Code blocks with horizontal scroll would have bad background colour */
border-radius: 5px;
border: 1px solid #CCC;
background: #fff;
padding: 0.5em 0.7em;
display: block !important; /* added to counteract the Yahoo-specific `code` rule; without this, code blocks in Blogger are broken */
}
/* In edit mode, Wordpress uses a `* { font: ...;} rule+style that makes highlighted
code look non-monospace. This rule will override it.
.markdown-here-wrapper[data-md-url*="wordpress."] code span {
font: inherit;
}
上面是markdown here默认代码,这个是针对使用wordpress人的设置,这里我没用到就把它给注释掉了。
*/
/* Wordpress adds a grey background to `pre` elements that doesn't go well with
our syntax highlighting.
.markdown-here-wrapper[data-md-url*="wordpress."] pre {
background-color: transparent;
}
上面是markdown here默认代码,这个是针对使用wordpress人的设置,这里我没用到就把它给注释掉了。
*/
/*文本中加粗字体的格式,例如这里设置了加粗的颜色*/
strong, b{
color: #FF5722;
}
/*斜体的格式*/
em, i {
color: #056fd5;
}
/*水平线的格式设置*/
hr {
border: 1px solid #FF5722;
margin: 1.5em auto;
}
/* This spacing has been tweaked to closely match Gmail+Chrome "paragraph" (two line breaks) spacing.
Note that we only use a top margin and not a bottom margin -- this prevents the
"blank line" look at the top of the email (issue #243).
*/
p {
/* !important is needed here because Hotmail/Outlook.com uses !important to
kill the margin in <p>. We need this to win.
这里加上!important的意思是Hotmail/Outlook.com 使用了!important来强制不让后面不使用这个的来覆盖该设置,所以我们必须加上!important,才能强制设置成这样。
*/
margin: 1.5em 7px !important;
}
/*table, pre, dl, blockquote, q, ul, ol整体设置*/
table, pre, dl, blockquote, q, ul, ol {
margin: 10px 5px;
}
ul, ol {
padding-left: 2em;
}
li {
margin: 0.5em 0;
}
/* Space paragraphs in a list the same as the list itself. */
li p {
/* Needs !important to override rule above. */
margin: 0.5em 0 !important;
}
/* Smaller spacing for sub-lists */
ul ul, ul ol, ol ul, ol ol {
margin: 0;
padding-left: 1em;
}
/* Use Roman numerals for sub-ordered-lists. (Like Github.) */
ol ol, ul ol {
list-style-type: lower-roman;
}
/* Use letters for sub-sub-ordered lists. (Like Github.) */
ul ul ol, ul ol ol, ol ul ol, ol ol ol {
list-style-type: lower-alpha;
}
dl {
padding: 0;
}
dl dt {
font-size: 1em;
font-weight: bold;
font-style: italic;
}
dl dd {
margin: 0 0 1em;
padding: 0 1em;
}
/*代码块引用、代码引用的设置*/
blockquote, q {
border-left: 4px solid #a4a7a9;
padding: 0 1em;
color: #a4a7a9;
quotes: none;
margin-left: 0.7em;
}
blockquote::before, blockquote::after, q::before, q::after {
content: none;
}
/*标题的设置*/
h3, h4, h5, h6 {
padding: 0;
font-weight: bold;
color: #056fd5 !important;
text-align: center !important;
margin: 1.5em 5px !important;
padding: 0.5em 1em !important;
}
/*特别注意,我这里把好设置成符号了,就是01,02,03,这样子。*/
h1 {
font-size: 15px;
color: #056fd5;
font-weight: bold;
text-align: center !important;
border: 1px dashed #a4a7a9;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-right-radius: 50%;
border-bottom-left-radius: 50%;
width: 30px;
height: 30px;
/*margin-left: 47%;*/
margin: auto;
}
h2 {
margin: 10px 0 !important;
font-size: 17px;
color: #056fd5 !important;
font-weight: bold;
text-align: center !important;
margin: auto;
/*border-bottom: 1px solid #eee;*/
}
h3 {
font-size: 17px;
}
h4 {
font-size: 16px;
}
/*数据放圆圈的效果*/
h5 {
font-size: 15px;
color: #056fd5;
}
h6 {
font-size: 15px;
}
table {
padding: 0;
border-collapse: collapse;
border-spacing: 0;
font-size: 1em;
font: inherit;
border: 0;
}
tbody {
margin: 0;
padding: 0;
border: 0;
}
table tr {
border: 0;
border-top: 1px solid #CCC;
background-color: white;
margin: 0;
padding: 0;
}
table tr:nth-child(2n) {
background-color: #F8F8F8;
}
table tr th, table tr td {
font-size: 1em;
border: 1px solid #CCC;
margin: 0;
padding: 0.5em 1em;
}
table tr th {
font-weight: bold;
color: #eee;
border: 1px solid #056fd5;
background-color: #056fd5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment