Browse Source

Update Code block style & Source code reformat

develop
pandao 6 years ago
parent
commit
506472d3aa
  1. 2
      Gulpfile.js
  2. 50
      css/editormd.css
  3. 2
      css/editormd.min.css
  4. 36
      css/editormd.preview.css
  5. 2
      css/editormd.preview.min.css
  6. 52
      scss/editormd.preview.scss
  7. 20
      scss/editormd.preview.themes.scss
  8. 2
      scss/prettify.scss

2
Gulpfile.js

@ -325,7 +325,7 @@ gulp.task("jsdoc2md", function() {
});
*/
gulp.task("watch", function() {
gulp.watch("scss/editormd.scss", ["scss"]);
gulp.watch("scss/*.scss", ["scss"]);
gulp.watch("scss/editormd.preview.scss", ["scss", "scss2"]);
gulp.watch("scss/editormd.logo.scss", ["scss", "scss3"]);
gulp.watch("src/editormd.js", ["js", "amd"]);

50
css/editormd.css

@ -4340,7 +4340,7 @@ li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee;
background: #fff;
}
.editormd-preview-container pre.prettyprint, .editormd-html-preview pre.prettyprint {
@ -4348,15 +4348,41 @@ li.L9 {
border: 1px solid #ddd;
white-space: pre-wrap;
word-wrap: break-word;
background: #fff;
-webkit-transition: border-color 0.3s ease, background-color 0.3s ease;
/* Safari, Chrome */
-moz-transition: border-color 0.3s ease, background-color 0.3s ease;
/* Firefox 4.0~16.0 */
transition: border-color 0.3s ease, background-color 0.3s ease;
/* IE >9, FF >15, Opera >12.0 */
}
.editormd-preview-container pre.prettyprint li, .editormd-html-preview pre.prettyprint li {
border-left: 1px solid #ddd;
padding-left: 0.8em;
-webkit-transition: background-color 0.3s ease;
/* Safari, Chrome */
-moz-transition: background-color 0.3s ease;
/* Firefox 4.0~16.0 */
transition: background-color 0.3s ease;
/* IE >9, FF >15, Opera >12.0 */
}
.editormd-preview-container pre.prettyprint li:hover, .editormd-html-preview pre.prettyprint li:hover {
background-color: #fafafa;
}
.editormd-preview-container ol.linenums, .editormd-html-preview ol.linenums {
.editormd-preview-container pre.prettyprint li + li, .editormd-html-preview pre.prettyprint li + li {
margin-top: 0;
}
.editormd-preview-container pre.prettyprint:hover, .editormd-html-preview pre.prettyprint:hover {
border: 1px solid #d5d5d5;
}
.editormd-preview-container pre.prettyprint ol.linenums, .editormd-html-preview pre.prettyprint ol.linenums {
color: #999;
padding-left: 2.5em;
padding-left: 2.7em;
}
.editormd-preview-container ol.linenums li, .editormd-html-preview ol.linenums li {
.editormd-preview-container pre.prettyprint ol.linenums li, .editormd-html-preview pre.prettyprint ol.linenums li {
list-style-type: decimal;
}
.editormd-preview-container ol.linenums li code, .editormd-html-preview ol.linenums li code {
.editormd-preview-container pre.prettyprint ol.linenums li code, .editormd-html-preview pre.prettyprint ol.linenums li code {
border: none;
background: none;
padding: 0;
@ -4633,6 +4659,20 @@ hr.editormd-page-break {
.editormd-preview-theme-dark pre .pln {
color: #999;
}
.editormd-preview-theme-dark pre.prettyprint {
border: none;
background-color: #111;
}
.editormd-preview-theme-dark pre.prettyprint li {
border-left: 1px solid #222;
}
.editormd-preview-theme-dark pre.prettyprint:hover {
border: none;
background-color: #000;
}
.editormd-preview-theme-dark pre.prettyprint:hover li:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.editormd-preview-theme-dark li.L1, .editormd-preview-theme-dark li.L3, .editormd-preview-theme-dark li.L5, .editormd-preview-theme-dark li.L7, .editormd-preview-theme-dark li.L9 {
background: none;
}

2
css/editormd.min.css

File diff suppressed because one or more lines are too long

36
css/editormd.preview.css

@ -3622,7 +3622,7 @@ li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee;
background: #fff;
}
.editormd-preview-container pre.prettyprint, .editormd-html-preview pre.prettyprint {
@ -3630,15 +3630,41 @@ li.L9 {
border: 1px solid #ddd;
white-space: pre-wrap;
word-wrap: break-word;
background: #fff;
-webkit-transition: border-color 0.3s ease, background-color 0.3s ease;
/* Safari, Chrome */
-moz-transition: border-color 0.3s ease, background-color 0.3s ease;
/* Firefox 4.0~16.0 */
transition: border-color 0.3s ease, background-color 0.3s ease;
/* IE >9, FF >15, Opera >12.0 */
}
.editormd-preview-container pre.prettyprint li, .editormd-html-preview pre.prettyprint li {
border-left: 1px solid #ddd;
padding-left: 0.8em;
-webkit-transition: background-color 0.3s ease;
/* Safari, Chrome */
-moz-transition: background-color 0.3s ease;
/* Firefox 4.0~16.0 */
transition: background-color 0.3s ease;
/* IE >9, FF >15, Opera >12.0 */
}
.editormd-preview-container pre.prettyprint li:hover, .editormd-html-preview pre.prettyprint li:hover {
background-color: #fafafa;
}
.editormd-preview-container pre.prettyprint li + li, .editormd-html-preview pre.prettyprint li + li {
margin-top: 0;
}
.editormd-preview-container pre.prettyprint:hover, .editormd-html-preview pre.prettyprint:hover {
border: 1px solid #d5d5d5;
}
.editormd-preview-container ol.linenums, .editormd-html-preview ol.linenums {
.editormd-preview-container pre.prettyprint ol.linenums, .editormd-html-preview pre.prettyprint ol.linenums {
color: #999;
padding-left: 2.5em;
padding-left: 2.7em;
}
.editormd-preview-container ol.linenums li, .editormd-html-preview ol.linenums li {
.editormd-preview-container pre.prettyprint ol.linenums li, .editormd-html-preview pre.prettyprint ol.linenums li {
list-style-type: decimal;
}
.editormd-preview-container ol.linenums li code, .editormd-html-preview ol.linenums li code {
.editormd-preview-container pre.prettyprint ol.linenums li code, .editormd-html-preview pre.prettyprint ol.linenums li code {
border: none;
background: none;
padding: 0;

2
css/editormd.preview.min.css

File diff suppressed because one or more lines are too long

52
scss/editormd.preview.scss

@ -113,24 +113,46 @@
@import "prettify";
#{$prefix}preview-container, #{$prefix}html-preview {
pre.prettyprint {
padding: 10px;
border: 1px solid $borderColor;
white-space: pre-wrap;
word-wrap: break-word;
}
pre {
&.prettyprint {
padding: 10px;
border: 1px solid $borderColor;
white-space: pre-wrap;
word-wrap: break-word;
background: #fff;
@include transition(border-color .3s ease, background-color .3s ease);
li {
border-left: 1px solid #ddd;
padding-left: 0.8em;
@include transition(background-color .3s ease);
&:hover {
background-color: #fafafa;
}
}
li + li {
margin-top: 0;
}
&:hover {
border: 1px solid darken($borderColor, 3%);
}
ol.linenums {
color: #999;
padding-left: 2.5em;
ol.linenums {
color: #999;
padding-left: 2.7em;
li {
list-style-type: decimal;
li {
list-style-type: decimal;
code {
border: none;
background:none;
padding: 0;
code {
border: none;
background:none;
padding: 0;
}
}
}
}
}

20
scss/editormd.preview.themes.scss

@ -74,6 +74,26 @@
.pln {
color: #999;
}
&.prettyprint {
border: none;
background-color: #111;
li {
border-left: 1px solid #222;
}
&:hover {
border: none;
background-color: #000;
li {
&:hover {
background-color: rgba(#fff, .1);
}
}
}
}
}
li.L1, li.L3, li.L5, li.L7, li.L9 {

2
scss/prettify.scss

@ -50,4 +50,4 @@ li.L1,
li.L3,
li.L5,
li.L7,
li.L9 { background: #eee }
li.L9 { background: #fff }

Loading…
Cancel
Save