scinote-web/app/assets/stylesheets/tiny_mce.scss

274 lines
4.3 KiB
SCSS
Raw Normal View History

// scss-lint:disable ImportantRule SelectorDepth
@import "constants";
@font-face {
font-family: "tinymce";
src: asset-url("tinymce/skins/lightgray/fonts/tinymce.woff");
}
.tinymce-view {
border: solid 1px;
border-color: $color-white;
border-radius: 3px;
float: left;
width: 100%;
&:hover {
border-color: $color-gainsboro;
cursor: pointer;
}
&:empty::before {
color: $color-silver-chalice;
content: attr(data-placeholder);
}
p {
margin: 0;
padding: 0;
}
}
.mce-tinymce {
opacity: 0;
position: absolute !important;
&.show {
opacity: 1;
position: static !important;
}
}
.mce-container-body {
position: relative !important;
}
.tox.tox-tinymce {
left: -100000px;
2022-12-22 17:37:47 +08:00
position: absolute;
&.tox-tinymce--loaded {
left: 0;
2022-12-22 17:37:47 +08:00
position: relative;
}
}
.tinymce-placeholder {
background: $color-concrete;
opacity: .7;
transition: .2s;
width: 100%;
}
.tox-edit-area {
label {
color: $color-silver-chalice !important;
2022-12-22 17:37:47 +08:00
padding: 5px !important;
}
}
.tinymce-save-button.tox-mbtn,
.tinymce-cancel-button.tox-mbtn {
cursor: pointer;
button {
align-items: center;
cursor: pointer;
display: flex;
gap: .25rem;
}
.fas {
font-family: "Font Awesome 5 Free";
font-weight: 900;
margin-top: 3px;
}
&:hover {
background: transparent !important;
}
}
.tinymce-save-controls {
display: flex;
margin-left: auto !important;
}
.tinymce-status-badge {
color: $color-silver-chalice;
margin-top: -20px;
}
.tinymce-placeholder-text {
color: $color-silver-chalice;
}
.mce-toolbar {
background: $color-white !important;
}
.restore-draft-notification {
align-items: center;
background: $state-info-bg !important;
display: flex;
flex-basis: 100%;
height: 30px !important;
padding: 10px !important;
.notification-text {
flex-grow: 1;
font-size: 14px;
max-width: 85%;
overflow: hidden;
text-overflow: ellipsis;
}
2019-09-24 15:24:16 +08:00
.restore-draft-btn {
border: 1px solid $color-silver-chalice;
cursor: pointer;
2019-09-24 15:24:16 +08:00
font-size: 12px;
margin-left: auto;
2019-09-24 15:24:16 +08:00
padding: 3px 10px 3px 10px;
}
.fas {
color: $color-silver-chalice;
cursor: pointer;
font-family: 'Font Awesome 5 Free';
font-weight: 501;
margin-left: 10px;
}
}
2019-04-28 22:16:31 +08:00
.mce-stack-layout {
.tinymce-active-object-handler {
border-top: 1px solid rgb(226, 228, 231);
height: 33px;
width: 100%;
.tool-button {
border: 1px solid transparent;
cursor: pointer;
display: inline-block;
line-height: 27px;
2019-04-29 01:11:41 +08:00
margin: 2px;
2019-04-28 22:16:31 +08:00
text-align: center;
width: 30px;
&:hover {
border: 1px solid rgb(226, 228, 231);
}
}
}
}
.mce-i-download::before {
content: "\F019";
font-family: "Font Awesome 5 Free";
font-weight: 900;
line-height: 16px;
position: absolute;
}
.mce-i-pencil::before {
content: "\F303";
font-family: "Font Awesome 5 Free";
font-weight: 900;
line-height: 16px;
position: absolute;
}
2019-04-28 22:16:31 +08:00
.mce-floatpanel[aria-label="Inline toolbar"] {
border: 0;
box-shadow: 0;
height: 0 !important;
opacity: 1;
z-index: 10 !important;
&::before,
&::after {
display: none;
}
2019-04-28 22:16:31 +08:00
}
2020-03-03 22:55:17 +08:00
.mce-window {
.mce-abs-layout {
overflow: visible !important;
}
.mce-error {
padding-top: 15px;
}
.mce-primary[disabled=disabled] {
pointer-events: none;
button {
background: $color-alto;
color: $color-volcano;
}
}
}
// fix for TinyMCE 6 vs Boostrap 3 .show conflict
.tox.tox-tinymce.show {
display: flex !important;
}
.tox .tox-pop {
margin-top: -12px;
&::after,
&::before {
display: none !important;
}
.tox-pop__dialog {
border: 0;
border-radius: 0 0 3px 3px;
box-shadow: none;
}
.tox-toolbar {
background: $brand-primary !important;
top: -10px;
button {
color: $color-white;
}
.tox-icon svg {
fill: $color-white;
}
}
}
.tox-edit-area__iframe {
background-color: transparent !important;
z-index: 1;
}
2022-09-09 21:42:53 +08:00
.tox-sidebar-wrap {
flex-direction: column !important;
.restore-draft-notification {
flex-basis: 30px;
}
}
.tox-editor-header {
z-index: 2 !important;
}
.tox-dialog-wrap {
.tox-dialog__body-nav {
.tox-dialog__body-nav-item:nth-child(3) {
display: none;
}
}
}
// scss-lint:enable ImportantRule SelectorDepth