Scrollbar and rich text dark

pull/1/head
yflory 4 years ago
parent 436d28d077
commit 0575a7a233

@ -10,10 +10,10 @@ body
font-size: 13px; font-size: 13px;
/* Text color */ /* Text color */
color: #333; color: inherit;
/* Remove the background color to make it transparent */ /* Remove the background color to make it transparent */
background-color: #fff; background-color: inherit !important;
margin: 0; margin: 0;
padding: 20px; padding: 20px;

@ -1,8 +1,21 @@
@import (reference) "./colortheme-all.less";
.app-noscroll_main() { .app-noscroll_main() {
--LessLoader_require: LessLoader_currentFile(); --LessLoader_require: LessLoader_currentFile();
} }
& { & {
.cp-app-noscroll { .cp-app-noscroll {
scrollbar-color: @scrollbar_color;
* {
scrollbar-width: thin;
}
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-thumb {
background-color: @cp_scrollbar-fg;
width: 6px;
}
height: 100%; height: 100%;
width: 100%; width: 100%;
padding: 0px; padding: 0px;

@ -61,6 +61,9 @@
@cryptpad_color_pro: #E4FFDD; @cryptpad_color_pro: #E4FFDD;
@cryptpad_color_power: #F6DDFF; @cryptpad_color_power: #F6DDFF;
@cp_scrollbar-fg: hsla(0,0%,100%,.2);
@scrollbar_color: @cp_scrollbar-fg transparent;
// Loading screen // Loading screen
@cp_loading-bg: #FFF-#E7E7E7; @cp_loading-bg: #FFF-#E7E7E7;
@cp_loading-fg: @cryptpad_text_col; @cp_loading-fg: @cryptpad_text_col;

@ -61,6 +61,9 @@
@cryptpad_color_pro: #E4FFDD; @cryptpad_color_pro: #E4FFDD;
@cryptpad_color_power: #F6DDFF; @cryptpad_color_power: #F6DDFF;
@cp_scrollbar-fg: fade(@cryptpad_color_black, 20%);
@scrollbar_color: @cp_scrollbar-fg transparent;
// Loading screen // Loading screen
@cp_loading-bg: #E7E7E7; @cp_loading-bg: #E7E7E7;
@cp_loading-fg: @cryptpad_text_col; @cp_loading-fg: @cryptpad_text_col;

@ -30,7 +30,7 @@
CKEDITOR.plugins.add('comments', { CKEDITOR.plugins.add('comments', {
onLoad: function() { onLoad: function() {
CKEDITOR.addCss('comment { background-color: ' + color1 + '; }' + CKEDITOR.addCss('comment { background-color: ' + color1 + '; color:#333; }' +
'@keyframes color { 0% { background-color: ' + color2 + '; } 50% { background-color: ' + color1 + '; } 100% { background-color: ' + color2 + '; } }' + '@keyframes color { 0% { background-color: ' + color2 + '; } 50% { background-color: ' + color1 + '; } 100% { background-color: ' + color2 + '; } }' +
'comment.active { animation-name: color; animation-duration: 1s; animation-iteration-count: 2; background-color: ' + color2 + '; outline: none;}' + 'comment.active { animation-name: color; animation-duration: 1s; animation-iteration-count: 2; background-color: ' + color2 + '; outline: none;}' +
'comment media-tag { border: 2px solid ' + color1 + ' !important; }' + 'comment media-tag { border: 2px solid ' + color1 + ' !important; }' +

@ -1216,6 +1216,14 @@ define([
$contentContainer.append(h('div#cp-app-pad-comments')); $contentContainer.append(h('div#cp-app-pad-comments'));
$contentContainer.prepend(h('div#cp-app-pad-toc')); $contentContainer.prepend(h('div#cp-app-pad-toc'));
$ckeToolbar.find('.cke_button__image_icon').parent().hide(); $ckeToolbar.find('.cke_button__image_icon').parent().hide();
if (window.CryptPad_theme === 'dark') {
var $iframe = $('iframe').contents();
$iframe.find('html').css({
'background-color': '#222', // XXX
'color': '#aaa' // XXX
});
}
}).nThen(waitFor()); }).nThen(waitFor());
}).nThen(function(waitFor) { }).nThen(function(waitFor) {

Loading…
Cancel
Save