UNPKG

@uiw/react-md-editor

Version:

A markdown editor with preview, implemented with React.js and TypeScript.

117 lines (112 loc) 2.37 kB
@md-editor:~ "w-md-editor"; .@{md-editor} { &-aree { overflow: auto; border-radius: 5px; } &-text { min-height: 100%; position: relative; text-align: left; white-space: pre-wrap; word-break: keep-all; overflow-wrap: break-word; box-sizing: border-box; padding: 10px; margin: 0; font-size: 14px; line-height: 18px; font-variant-ligatures: common-ligatures; &-pre, &-input, & > &-pre { margin: 0; border: 0; background: none; box-sizing: inherit; display: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-ligatures: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; tab-size: inherit; text-indent: inherit; text-rendering: inherit; text-transform: inherit; white-space: inherit; overflow-wrap: inherit; word-break: inherit; word-break: normal; padding: 0; } &-pre { position: relative; pointer-events: none; } &-input { position: absolute; top: 0px; left: 0px; height: 100%; width: 100%; resize: none; color: inherit; overflow: hidden; outline: 0; padding: 10px; -webkit-font-smoothing: antialiased; -webkit-text-fill-color: transparent; &:empty { -webkit-text-fill-color: inherit !important; } } } } /** * Hack to apply on some CSS on IE10 and IE11 */ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { /** * IE doesn't support '-webkit-text-fill-color' * So we use 'color: transparent' to make the text transparent on IE * Unlike other browsers, it doesn't affect caret color in IE */ .@{md-editor}-text-input { color: transparent !important; &::selection { background-color: #accef7 !important; color: transparent !important; } } } .@{md-editor}-text-pre { color: #333; .table { .punctuation { color: #c3c3c3; } .table-header { color: #000; } } .url { color: #032f62; .content { color: #0366d6; text-decoration: underline; } } .hr { color: #999; } .blockquote { color: #a6a6a6; } .title, .bold { color: #000; } }