2020-04-09 00:29:13 +03:00
|
|
|
import * as Constants from "~/common/constants";
|
2020-02-19 09:30:47 +03:00
|
|
|
|
2020-04-09 00:29:13 +03:00
|
|
|
import { css } from "@emotion/react";
|
2020-02-19 09:30:47 +03:00
|
|
|
|
2020-04-09 00:29:13 +03:00
|
|
|
/* prettier-ignore */
|
|
|
|
export const injectGlobalStyles = () => css`
|
2020-02-19 09:30:47 +03:00
|
|
|
@font-face {
|
|
|
|
font-family: 'mono';
|
2020-09-08 10:01:21 +03:00
|
|
|
src: url('https://bafkreialkhtjtpwocdadbmra3o7mii47bzgl3k2v2ossrpvhk3qqsbqtza.ipfs.slate.textile.io');
|
2020-02-19 09:30:47 +03:00
|
|
|
}
|
|
|
|
|
2020-04-09 00:29:13 +03:00
|
|
|
@font-face {
|
|
|
|
font-family: 'mono-bold';
|
2020-09-08 10:01:21 +03:00
|
|
|
src: url('https://bafkreigaktonxehwl5bzah5ze4iruw272qybj22wpy32pgrcka3y4jvhc4.ipfs.slate.textile.io');
|
2020-04-09 00:29:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
|
|
|
font-family: 'inter-regular';
|
2020-09-08 10:01:21 +03:00
|
|
|
src: url('https://bafkreic3hkcuwvrmf6trweqcjp62valsfjh3zvwacikoreynakgw67wrvy.ipfs.slate.textile.io');
|
2020-04-09 00:29:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
|
|
|
font-family: 'inter-semi-bold';
|
2020-09-08 10:01:21 +03:00
|
|
|
src: url('https://bafkreiaezvuz6wawoqyntfl4gbprol3e7majovgof3uxvhilvd2pgk4w54.ipfs.slate.textile.io');
|
2020-04-09 00:29:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
|
|
|
font-family: 'inter-medium';
|
2020-09-08 10:01:21 +03:00
|
|
|
src: url('https://bafkreiapyxmqjwoowqpek2cjocouzxoalwlzwwbv3dscug3e5l2ok7xmqe.ipfs.slate.textile.io');
|
2020-04-09 00:29:13 +03:00
|
|
|
}
|
|
|
|
|
2020-07-08 11:43:37 +03:00
|
|
|
@font-face {
|
2020-07-09 06:17:25 +03:00
|
|
|
font-family: 'fira-code-regular';
|
2020-09-08 10:01:21 +03:00
|
|
|
src: url('https://bafkreibtxh3xdwh6rp2k2uhtjssialbm25girhsck7qks2psycnzwvmtke.ipfs.slate.textile.io');
|
2020-07-08 11:43:37 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
2020-07-09 06:17:25 +03:00
|
|
|
font-family: 'fira-code-bold';
|
2020-09-08 10:01:21 +03:00
|
|
|
src: url('https://bafkreidyich64vyb4nqzvn6uvfcgsbegafe7dqd2ks4wjtcg5jwte6aetm.ipfs.slate.textile.io');
|
2020-07-08 11:43:37 +03:00
|
|
|
}
|
|
|
|
|
2020-07-15 06:54:46 +03:00
|
|
|
@font-face {
|
|
|
|
font-family: 'jet-brains-regular';
|
2020-09-08 10:01:21 +03:00
|
|
|
src: url('https://bafkreiabqv4534pnjhohcc2aclsgbp2twugldrlzg6wqdehajerrcwgu7e.ipfs.slate.textile.io');
|
2020-07-15 06:54:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
|
|
|
font-family: 'jet-brains-bold';
|
2020-09-08 10:01:21 +03:00
|
|
|
src: url('https://bafkreiejfxvbejf4a56x5tdo6w3n2kkrynwniv65rkkmrozxujroq6v4am.ipfs.slate.textile.io');
|
2020-07-15 06:54:46 +03:00
|
|
|
}
|
|
|
|
|
2020-02-19 09:30:47 +03:00
|
|
|
html, body, div, span, applet, object, iframe,
|
|
|
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
|
|
a, abbr, acronym, address, big, cite, code,
|
|
|
|
del, dfn, em, img, ins, kbd, q, s, samp,
|
|
|
|
small, strike, strong, sub, sup, tt, var,
|
|
|
|
b, u, i, center,
|
|
|
|
dl, dt, dd, ol, ul, li,
|
|
|
|
fieldset, form, label, legend,
|
|
|
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
|
|
article, aside, canvas, details, embed,
|
|
|
|
figure, figcaption, footer, header, hgroup,
|
|
|
|
menu, nav, output, ruby, section, summary,
|
|
|
|
time, mark, audio, video {
|
|
|
|
box-sizing: border-box;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
border: 0;
|
|
|
|
vertical-align: baseline;
|
|
|
|
}
|
|
|
|
|
|
|
|
article, aside, details, figcaption, figure,
|
|
|
|
footer, header, hgroup, menu, nav, section {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
html, body {
|
2020-04-09 00:29:13 +03:00
|
|
|
background: ${Constants.system.foreground};
|
|
|
|
color: ${Constants.system.black};
|
2020-02-19 09:30:47 +03:00
|
|
|
font-size: 16px;
|
2020-07-02 11:24:14 +03:00
|
|
|
font-family: ${Constants.font.text};
|
2020-04-09 00:29:13 +03:00
|
|
|
scrollbar-width: none;
|
|
|
|
-ms-overflow-style: -ms-autohiding-scrollbar;
|
2020-02-19 09:30:47 +03:00
|
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
display: none;
|
|
|
|
}
|
2020-07-19 04:39:52 +03:00
|
|
|
-webkit-font-feature-settings: "liga"1, "ss01"1, "zero"1, "cv11"1, 'frac'1, 'calt'1, 'tnum'1;
|
|
|
|
-moz-font-feature-settings: "liga"1, "ss01"1, "zero"1, "cv11"1, 'frac'1, 'calt'1, 'tnum'1;
|
|
|
|
-ms-font-feature-settings: "liga"1, "ss01"1, "zero"1, "cv11"1, 'frac'1, 'calt'1, 'tnum'1;
|
|
|
|
font-feature-settings: "liga"1, "ss01"1, "zero"1, "cv11"1, 'frac'1, 'calt'1, 'tnum'1;
|
2020-02-19 09:30:47 +03:00
|
|
|
}
|
|
|
|
`;
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-08-22 20:30:03 +03:00
|
|
|
export const injectGlobalGridStyles = () => css`
|
|
|
|
.react-grid-layout {
|
|
|
|
position: relative;
|
|
|
|
transition: height 200ms ease;
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-grid-item {
|
|
|
|
transition: all 200ms ease;
|
|
|
|
transition-property: left, top;
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-grid-item.cssTransforms {
|
|
|
|
transition-property: transform;
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-grid-item.resizing {
|
|
|
|
z-index: 1;
|
|
|
|
will-change: width, height;
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-grid-item.react-draggable-dragging {
|
|
|
|
transition: none;
|
|
|
|
z-index: 3;
|
|
|
|
will-change: transform;
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-grid-item.dropping {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-grid-item.react-grid-placeholder {
|
|
|
|
background: rgba(0, 0, 0, 0.7);
|
|
|
|
z-index: 2;
|
|
|
|
transition-duration: 100ms;
|
|
|
|
-webkit-user-select: none;
|
|
|
|
-moz-user-select: none;
|
|
|
|
-ms-user-select: none;
|
|
|
|
-o-user-select: none;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-grid-item > .react-resizable-handle {
|
|
|
|
position: absolute;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
|
|
|
cursor: se-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-grid-item > .react-resizable-handle::after {
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
|
|
|
right: 3px;
|
|
|
|
bottom: 3px;
|
|
|
|
width: 5px;
|
|
|
|
height: 5px;
|
|
|
|
border-right: 2px solid rgba(0, 0, 0, 0.4);
|
|
|
|
border-bottom: 2px solid rgba(0, 0, 0, 0.4);
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-resizable-hide > .react-resizable-handle {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.react-resizable {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
.react-resizable-handle {
|
|
|
|
position: absolute;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-origin: content-box;
|
|
|
|
box-sizing: border-box;
|
|
|
|
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+");
|
|
|
|
background-position: bottom right;
|
|
|
|
padding: 0 3px 3px 0;
|
|
|
|
}
|
|
|
|
.react-resizable-handle-sw {
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
cursor: sw-resize;
|
|
|
|
transform: rotate(90deg);
|
|
|
|
}
|
|
|
|
.react-resizable-handle-se {
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
|
|
|
cursor: se-resize;
|
|
|
|
}
|
|
|
|
.react-resizable-handle-nw {
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
cursor: nw-resize;
|
|
|
|
transform: rotate(180deg);
|
|
|
|
}
|
|
|
|
.react-resizable-handle-ne {
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
cursor: ne-resize;
|
|
|
|
transform: rotate(270deg);
|
|
|
|
}
|
|
|
|
.react-resizable-handle-w,
|
|
|
|
.react-resizable-handle-e {
|
|
|
|
top: 50%;
|
|
|
|
margin-top: -10px;
|
|
|
|
cursor: ew-resize;
|
|
|
|
}
|
|
|
|
.react-resizable-handle-w {
|
|
|
|
left: 0;
|
|
|
|
transform: rotate(135deg);
|
|
|
|
}
|
|
|
|
.react-resizable-handle-e {
|
|
|
|
right: 0;
|
|
|
|
transform: rotate(315deg);
|
|
|
|
}
|
|
|
|
.react-resizable-handle-n,
|
|
|
|
.react-resizable-handle-s {
|
|
|
|
left: 50%;
|
|
|
|
margin-left: -10px;
|
|
|
|
cursor: ns-resize;
|
|
|
|
}
|
|
|
|
.react-resizable-handle-n {
|
|
|
|
top: 0;
|
|
|
|
transform: rotate(225deg);
|
|
|
|
}
|
|
|
|
.react-resizable-handle-s {
|
|
|
|
bottom: 0;
|
|
|
|
transform: rotate(45deg);
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2020-07-16 06:44:58 +03:00
|
|
|
/* prettier-ignore */
|
|
|
|
export const injectCodeBlockStyles = () => css`
|
2020-07-16 21:03:52 +03:00
|
|
|
.language-javascript {
|
|
|
|
code,
|
|
|
|
pre {
|
2020-07-24 12:54:39 +03:00
|
|
|
color: #fff5b1;
|
|
|
|
font-family: ${Constants.font.code};
|
2020-07-16 21:03:52 +03:00
|
|
|
font-size: 12px;
|
|
|
|
text-align: left;
|
|
|
|
white-space: pre;
|
|
|
|
word-spacing: normal;
|
|
|
|
word-break: normal;
|
|
|
|
word-wrap: normal;
|
2020-07-24 12:54:39 +03:00
|
|
|
tab-size: 2;
|
2020-07-16 21:03:52 +03:00
|
|
|
hyphens: none;
|
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
/* Code blocks */
|
|
|
|
pre {
|
|
|
|
padding: none;
|
|
|
|
margin: none;
|
|
|
|
overflow: auto;
|
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
:not(pre) > code,
|
|
|
|
pre {
|
2020-07-24 12:54:39 +03:00
|
|
|
background: none;
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
/* Inline code */
|
|
|
|
:not(pre) > code {
|
|
|
|
padding: .1em;
|
|
|
|
border-radius: .3em;
|
|
|
|
white-space: normal;
|
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.comment,
|
|
|
|
.token.block-comment,
|
|
|
|
.token.prolog,
|
|
|
|
.token.doctype,
|
|
|
|
.token.cdata {
|
2020-07-29 02:08:38 +03:00
|
|
|
color: #FF00FF;
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.punctuation {
|
2020-07-24 12:54:39 +03:00
|
|
|
color: #ffd33d;
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.tag,
|
|
|
|
.token.attr-name,
|
|
|
|
.token.namespace,
|
2020-07-24 12:54:39 +03:00
|
|
|
.token.number,
|
|
|
|
.token.unit,
|
|
|
|
.token.hexcode,
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.deleted {
|
2020-09-09 12:40:23 +03:00
|
|
|
color: ${Constants.system.moonstone};
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-24 12:54:39 +03:00
|
|
|
.token.property,
|
|
|
|
.token.selector {
|
|
|
|
color: #ffdf5d;
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-24 12:54:39 +03:00
|
|
|
.token.function-name {
|
|
|
|
color: #ffd33d;
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-24 12:54:39 +03:00
|
|
|
.token.boolean,
|
|
|
|
.token.selector .token.id,
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.class-name,
|
2020-07-24 12:54:39 +03:00
|
|
|
.token.function,
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.constant,
|
|
|
|
.token.symbol {
|
2020-09-09 12:40:23 +03:00
|
|
|
color: ${Constants.system.gray};
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.important,
|
|
|
|
.token.atrule,
|
|
|
|
.token.keyword,
|
2020-07-24 12:54:39 +03:00
|
|
|
.token.selector .token.class,
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.builtin {
|
2020-09-09 12:40:23 +03:00
|
|
|
color: #FFFFFF;
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.string,
|
|
|
|
.token.char,
|
|
|
|
.token.attr-value,
|
|
|
|
.token.regex,
|
|
|
|
.token.variable {
|
2020-07-24 12:54:39 +03:00
|
|
|
color: #fff;
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.operator,
|
|
|
|
.token.entity,
|
|
|
|
.token.url {
|
2020-09-09 12:40:23 +03:00
|
|
|
color: ${Constants.system.moonstone};
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.important,
|
|
|
|
.token.bold {
|
2020-07-24 12:54:39 +03:00
|
|
|
font-weight: 400;
|
|
|
|
font-family: ${Constants.font.codeBold};
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.italic {
|
|
|
|
font-style: italic;
|
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.entity {
|
|
|
|
cursor: help;
|
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
|
2020-07-16 21:03:52 +03:00
|
|
|
.token.inserted {
|
2020-07-24 12:54:39 +03:00
|
|
|
color: ${Constants.system.brand};
|
2020-07-16 21:03:52 +03:00
|
|
|
}
|
2020-07-16 06:44:58 +03:00
|
|
|
}
|
2020-07-16 21:03:52 +03:00
|
|
|
`;
|