rhino-editor
Version:
A custom element wrapped rich text editor
8 lines (7 loc) • 7.64 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/exports/styles/rhino-editor.css"],
"sourcesContent": ["/* THIS FILE IS AUTO-GENERATED. DO NOT EDIT BY HAND! */\n\n/* src/exports/styles/editor.js:hostStyles */\n\n :host,\n .trix-content {\n /* General tokens */\n --rhino-focus-ring: 0px 0px 1px 1px var(--rhino-button-active-border-color);\n --rhino-border-radius: 4px;\n\n --rhino-danger-border-color: red;\n --rhino-danger-background-color: #ffdddd;\n\n /* Editor tokens */\n --rhino-text-color: #374151;\n --rhino-dark-text-color: white;\n\n --rhino-border-color: #cecece;\n --rhino-placeholder-text-color: #cecece;\n --rhino-dark-placeholder-text-color: gray;\n\n /* Regular buttons */\n --rhino-button-text-color: #889;\n --rhino-button-dark-text-color: #eee;\n --rhino-button-border-color: #cecece;\n\n /** Disabled Buttons */\n --rhino-button-disabled-text-color: #d1d5db;\n --rhino-button-disabled-border-color: #d1d5db;\n --rhino-button-disabled-background-color: #d1d5db;\n\n /** Active buttons */\n --rhino-button-active-border-color: #005a9c;\n --rhino-button-active-background-color: rgb(226 239 255);\n\n --rhino-toolbar-text-color: hsl(219, 6%, 43%);\n --rhino-toolbar-icon-size: 1em;\n\n --rhino-dialog-border-color: hsl(\n var(--rhino-button-focus-background-color-hsl) / 50%\n );\n\n /** Focus buttons */\n --rhino-button-focus-background-color: hsl(\n var(--rhino-button-focus-background-color-hsl)\n );\n\n --rhino-button-focus-background-color-hsl: 219 26% 95%;\n\n /**\n * Override \"--rhino-fake-selection-color\" to change the color of .rhino-selection when the editor is not focused.\n */\n --rhino-fake-selection-color: rgb(220, 220, 220);\n\n display: block;\n\n color: var(--rhino-text-color);\n color: light-dark(var(--rhino-text-color), var(--rhino-dark-text-color));\n }\n\n\n/* src/exports/styles/editor.js:toolbarButtonStyles */\n\n /**\n * Cursor styles that are useful for providing a more \"pleasant\" editor experience.\n */\n /**\n* https://github.com/curvenote/editor/blob/main/packages/prosemirror-codemark/src/codemark.css\n*/\n @keyframes rhino-blink {\n 49% {\n border-color: unset;\n }\n 50% {\n border-color: Canvas;\n }\n 99% {\n border-color: Canvas;\n }\n }\n .rhino-editor .no-cursor {\n caret-color: transparent;\n }\n\n :where(.rhino-editor) .fake-cursor {\n margin: 0;\n padding: 0;\n margin-right: -1px;\n border-left-width: 1px;\n border-left-style: solid;\n animation: rhino-blink 1s;\n animation-iteration-count: infinite;\n position: relative;\n z-index: 1;\n }\n\n /** This is for actual \"selection\" which are highlighting more than 1 character. */\n :where(.rhino-editor .ProseMirror):not(:focus-within) .rhino-selection {\n background: var(--rhino-fake-selection-color);\n }\n\n .ProseMirror-separator {\n display: none !important;\n }\n\n\n/* src/exports/styles/editor.js:toolbarButtonStyles */\n\n .rhino-toolbar-button {\n appearance: none;\n -webkit-appearance: none;\n border: 1px solid var(--rhino-border-color);\n border-radius: var(--rhino-border-radius);\n padding: 0.4em;\n color: var(--rhino-button-text-color);\n color: light-dark(\n var(--rhino-button-text-color),\n var(--rhino-button-dark-text-color)\n );\n background: Canvas;\n font-size: inherit;\n display: inline-grid;\n }\n\n .rhino-toolbar-button:is([aria-disabled=\"true\"], :disabled) {\n color: var(--rhino-button-disabled-text-color);\n border-color: var(--rhino-button-disabled-border-color);\n }\n\n .rhino-toolbar-button[aria-disabled=\"true\"]:focus {\n border-color: var(--rhino-button-disabled-border-color);\n }\n\n .rhino-toolbar-button svg {\n min-height: var(--rhino-toolbar-icon-size);\n min-width: var(--rhino-toolbar-icon-size);\n\n /* max-height / max-width needs to be set for safari */\n max-height: var(--rhino-toolbar-icon-size);\n max-width: var(--rhino-toolbar-icon-size);\n }\n\n .rhino-toolbar-button:is(:focus, :hover):not(\n [aria-disabled=\"true\"],\n :disabled\n ) {\n outline: transparent;\n border-color: var(--rhino-button-active-border-color);\n }\n\n .rhino-toolbar-button:is(:focus):not([aria-disabled=\"true\"], :disabled) {\n box-shadow: var(--rhino-focus-ring);\n }\n\n /* Only change the background color in certain scenarios */\n .rhino-toolbar-button:is(:hover):not(\n [aria-disabled=\"true\"],\n :disabled,\n [aria-pressed=\"true\"],\n [part~=\"toolbar__button--active\"]\n ) {\n background-color: var(--rhino-button-focus-background-color);\n background-color: light-dark(\n var(--rhino-button-focus-background-color),\n gray\n );\n }\n\n .rhino-toolbar-button:is([aria-disabled=\"true\"], :disabled):not(\n [part~=\"toolbar__button--active\"]\n ) {\n color: var(--rhino-button-disabled-text-color);\n color: light-dark(var(--rhino-button-disabled-text-color), gray);\n border-color: var(--rhino-button-disabled-border-color);\n }\n\n .rhino-toolbar-button:is(:focus, :hover):is(\n [aria-disabled=\"true\"],\n :disabled\n ):not([part~=\"toolbar__button--active\"]) {\n outline: transparent;\n color: var(--rhino-button-disabled-text-color);\n color: light-dark(var(--rhino-button-disabled-text-color), gray);\n border-color: var(--rhino-button-disabled-border-color);\n box-shadow: 0 0 0 1px var(--rhino-button-disabled-border-color);\n box-shadow: 0 0 0 1px\n light-dark(var(--rhino-button-disabled-border-color), transparent);\n }"],
"mappings": ";AAIE;AACA,CAAC;AAEC,sBAAoB,IAAI,IAAI,IAAI,IAAI,IAAI;AACxC,yBAAuB;AAEvB,+BAA6B;AAC7B,mCAAiC;AAGjC,sBAAoB;AACpB,2BAAyB;AAEzB,wBAAsB;AACtB,kCAAgC;AAChC,uCAAqC;AAGrC,6BAA2B;AAC3B,kCAAgC;AAChC,+BAA6B;AAG7B,sCAAoC;AACpC,wCAAsC;AACtC,4CAA0C;AAG1C,sCAAoC;AACpC,0CAAwC,IAAI,IAAI,IAAI;AAEpD,8BAA4B,IAAI,GAAG,EAAE,EAAE,EAAE;AACzC,6BAA2B;AAE3B,+BAA6B,KAC3B,IAAI,2CAA2C,EAAE;AAInD,yCAAuC,KACrC,IAAI;AAGN,6CAA2C,IAAI,IAAI;AAKnD,gCAA8B,IAAI,GAAG,EAAE,GAAG,EAAE;AAE5C,WAAS;AAET,SAAO,IAAI;AACX,SAAO,WAAW,IAAI,mB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