@dodona/papyros
Version:
Scratchpad for multiple programming languages in the browser.
657 lines (526 loc) • 13.3 kB
CSS
/* Utitilies are prefixed by Tailwind */
._tw-col-span-2 {
grid-column: span 2 / span 2 ;
}
._tw-col-span-6 {
grid-column: span 6 / span 6 ;
}
._tw-m-10 {
margin: 2.5rem ;
}
._tw-m-2 {
margin: 0.5rem ;
}
._tw-mx-1 {
margin-left: 0.25rem ;
margin-right: 0.25rem ;
}
._tw-my-1 {
margin-top: 0.25rem ;
margin-bottom: 0.25rem ;
}
._tw-mr-0\.5 {
margin-right: 0.125rem ;
}
._tw-mr-3 {
margin-right: 0.75rem ;
}
._tw-box-border {
box-sizing: border-box ;
}
._tw-flex {
display: flex ;
}
._tw-grid {
display: grid ;
}
._tw-h-\[10px\] {
height: 10px ;
}
._tw-h-\[20px\] {
height: 20px ;
}
._tw-h-full {
height: 100% ;
}
._tw-max-h-1\/5 {
max-height: 16vh ;
}
._tw-max-h-3\/5 {
max-height: 48vh ;
}
._tw-min-h-1\/4 {
min-height: 20vh ;
}
._tw-min-h-screen {
min-height: 100vh ;
}
._tw-w-\[10px\] {
width: 10px ;
}
._tw-w-\[20px\] {
width: 20px ;
}
._tw-w-full {
width: 100% ;
}
@keyframes _tw-spin {
to {
transform: rotate(360deg);
}
}
._tw-animate-spin {
animation: _tw-spin 1s linear infinite ;
}
._tw-grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr)) ;
}
._tw-grid-cols-8 {
grid-template-columns: repeat(8, minmax(0, 1fr)) ;
}
._tw-flex-row {
flex-direction: row ;
}
._tw-flex-row-reverse {
flex-direction: row-reverse ;
}
._tw-items-center {
align-items: center ;
}
._tw-justify-between {
justify-content: space-between ;
}
._tw-gap-4 {
gap: 1rem ;
}
._tw-overflow-auto {
overflow: auto ;
}
._tw-whitespace-pre {
white-space: pre ;
}
._tw-rounded-full {
border-radius: 9999px ;
}
._tw-rounded-lg {
border-radius: 0.5rem ;
}
._tw-border {
border-width: 1px ;
}
._tw-border-2 {
border-width: 2px ;
}
._tw-border-b-2 {
border-bottom-width: 2px ;
}
._tw-border-solid {
border-style: solid ;
}
._tw-border-blue-500 {
--tw-border-opacity: 1 ;
border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)) ;
}
._tw-border-gray-200 {
--tw-border-opacity: 1 ;
border-color: rgb(229 231 235 / var(--tw-border-opacity, 1)) ;
}
._tw-border-red-500 {
--tw-border-opacity: 1 ;
border-color: rgb(239 68 68 / var(--tw-border-opacity, 1)) ;
}
._tw-border-b-red-500 {
--tw-border-opacity: 1 ;
border-bottom-color: rgb(239 68 68 / var(--tw-border-opacity, 1)) ;
}
._tw-bg-blue-500 {
--tw-bg-opacity: 1 ;
background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)) ;
}
._tw-bg-slate-200 {
--tw-bg-opacity: 1 ;
background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1)) ;
}
._tw-bg-slate-500 {
--tw-bg-opacity: 1 ;
background-color: rgb(100 116 139 / var(--tw-bg-opacity, 1)) ;
}
._tw-p-4 {
padding: 1rem ;
}
._tw-px-1 {
padding-left: 0.25rem ;
padding-right: 0.25rem ;
}
._tw-px-2 {
padding-left: 0.5rem ;
padding-right: 0.5rem ;
}
._tw-py-1 {
padding-top: 0.25rem ;
padding-bottom: 0.25rem ;
}
._tw-text-center {
text-align: center ;
}
._tw-text-4xl {
font-size: 2.25rem ;
line-height: 2.5rem ;
}
._tw-text-lg {
font-size: 1.125rem ;
line-height: 1.75rem ;
}
._tw-font-bold {
font-weight: 700 ;
}
._tw-font-medium {
font-weight: 500 ;
}
._tw-text-\[\#FF8F00\] {
--tw-text-opacity: 1 ;
color: rgb(255 143 0 / var(--tw-text-opacity, 1)) ;
}
._tw-text-black {
--tw-text-opacity: 1 ;
color: rgb(0 0 0 / var(--tw-text-opacity, 1)) ;
}
._tw-text-blue-500 {
--tw-text-opacity: 1 ;
color: rgb(59 130 246 / var(--tw-text-opacity, 1)) ;
}
._tw-text-red-500 {
--tw-text-opacity: 1 ;
color: rgb(239 68 68 / var(--tw-text-opacity, 1)) ;
}
._tw-text-white {
--tw-text-opacity: 1 ;
color: rgb(255 255 255 / var(--tw-text-opacity, 1)) ;
}
._tw-border-b-red-500 {
border-bottom-color: #ef4444 ;
}
/* Tailwind base css that is used in Papyros */
/* Source: node_modules/tailwindcss/src/css/preflight.css */
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
.tailwind *,
.tailwind ::before,
.tailwind ::after {
box-sizing: border-box;
/* 1 */
border-width: 0;
/* 2 */
border-style: solid;
/* 2 */
border-color: #e5e7eb;
/* 2 */
}
.tailwind ::before,
.tailwind ::after {
--tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
*/
.tailwind-html {
line-height: 1.5;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */
-moz-tab-size: 4;
/* 3 */
-o-tab-size: 4;
tab-size: 4;
/* 3 */
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* 4 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
.tailwind-body {
margin: 0;
/* 1 */
line-height: inherit;
/* 2 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
.tailwind button,
.tailwind input,
.tailwind select,
.tailwind textarea {
font-family: inherit;
/* 1 */
font-size: 100%;
/* 1 */
line-height: inherit;
/* 1 */
color: inherit;
/* 1 */
margin: 0;
/* 2 */
padding: 0;
/* 3 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
.tailwind :-moz-focusring {
outline: auto;
}
/*
Removes the default spacing and border for appropriate elements.
*/
.tailwind p {
margin: 0;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
.tailwind input::-moz-placeholder, .tailwind textarea::-moz-placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
.tailwind input::placeholder,
.tailwind textarea::placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
/* Ensure the default browser behavior of the `hidden` attribute. */
[hidden] {
/* Make it invisible while keeping page layout */
visibility: hidden ;
}
/* CodeMirror search panel close button*/
.cm-search > [name="close"] {
cursor: pointer;
}
.cm-content,
.papyros-font-family {
font-family: Monaco, Menlo, "Ubuntu Mono", Consolas, source-code-pro, monospace;
}
/* Override top border generated by @codemirror/one-dark-theme */
.ͼo .cm-panels.cm-panels-bottom {
/* dark-mode-content in tailwind.config.js*/
border-color: #37474F;
}
/* Change styling of tooltips generated by CodeMirror */
.cm-completionInfo {
white-space: pre;
overflow: auto;
resize: both;
/* override default max width/height to allow resizing */
max-width: 600px ;
max-height: 600px ;
}
/*
Disable resizing left completion infos as its movements are mirrored
According to https://github.com/codemirror/codemirror.next/issues/815
this feature is out of scope for CodeMirror
*/
.cm-completionInfo-left {
resize: none;
}
/* Add placeholder to an empty element */
.with-placeholder:empty:before {
content: attr(data-placeholder);
/* same value as placeholder-grey in tailwind.config.js */
color: #888;
}
/* Also override CodeMirror buttons to use this style */
.papyros-button,
.cm-button,
.tailwind .papyros-button,
.tailwind .cm-button {
margin: 0.25rem;
cursor: pointer;
border-radius: 0.5rem;
padding-left: 0.75rem;
padding-right: 0.75rem;
padding-top: 0.25rem;
padding-bottom: 0.25rem;
}
.papyros-button:disabled,
.cm-button:disabled,
.tailwind .papyros-button:disabled,
.tailwind .cm-button:disabled {
cursor: not-allowed;
opacity: 0.5;
}
.papyros-button,
.cm-button,
.tailwind .papyros-button,
.tailwind .cm-button{
min-width: 60px;
}
/* Round the corners of textfields created by CodeMirror */
.cm-textfield {
border-radius: 0.5rem ;
}
.papyros-button.btn-primary {
--tw-bg-opacity: 1;
background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1));
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.papyros-button.btn-secondary {
--tw-bg-opacity: 1;
background-color: rgb(107 114 128 / var(--tw-bg-opacity, 1));
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.papyros-button.btn-danger {
--tw-bg-opacity: 1;
background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.papyros-button.with-icon {
padding-left: 8px;
}
.papyros-button.with-icon svg{
vertical-align: middle;
}
.papyros-test-code {
background-color: rgba(143, 182, 130, 0.1);
}
.papyros-test-code.cm-activeLine {
background-color: rgba(143, 182, 130, 0.1)
}
.papyros-test-code-widget {
background-color: rgba(143, 182, 130, 0.1);
color: #7d8799;
padding: 0 2px 0 6px;
position: relative;
}
.papyros-test-code-buttons {
position: absolute;
top: -2px;
left: -42px;
z-index: 220;
}
.papyros-icon-link {
--tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity, 1));
font-size: 16px;
padding: 2px;
cursor: pointer;
}
.papyros-icon-link:hover {
--tw-text-opacity: 1;
color: rgb(96 165 250 / var(--tw-text-opacity, 1));
}
.papyros-state-card.cm-panels {
display: none;
position: absolute;
right: 8px;
top: -31px;
left: initial;
padding: 4px 8px;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
border: 1px solid;
--tw-border-opacity: 1;
border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));
}
.papyros-state-card.cm-panels:is(._tw-dark *) {
border-style: none;
}
.papyros-state-card.cm-panels.show {
display: flex;
}
.papyros-bottom-padding-widget {
position: relative;
height: 0;
}
.papyros-bottom-padding-widget div {
background-color: rgba(143, 182, 130, 0.1);
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
}
#__papyros-code-output-area.papyros-debug > * {
opacity: 0.1;
}
#__papyros-code-output-area.papyros-debug > .papyros-highlight-debugged {
opacity: 1;
}
.papyros-code-editor .cm-content[contenteditable="false"] {
cursor: default;
}
.papyros-code-editor .cm-gutters {
cursor: default;
}
.placeholder\:_tw-text-placeholder-grey::-moz-placeholder {
--tw-text-opacity: 1 ;
color: rgb(136 136 136 / var(--tw-text-opacity, 1)) ;
}
.placeholder\:_tw-text-placeholder-grey::placeholder {
--tw-text-opacity: 1 ;
color: rgb(136 136 136 / var(--tw-text-opacity, 1)) ;
}
.hover\:_tw-cursor-pointer:hover {
cursor: pointer ;
}
.focus\:_tw-outline-none:focus {
outline: 2px solid transparent ;
outline-offset: 2px ;
}
.focus\:_tw-ring-1:focus {
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) ;
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) ;
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) ;
}
.focus\:_tw-ring-blue-500:focus {
--tw-ring-opacity: 1 ;
--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)) ;
}
.disabled\:_tw-cursor-not-allowed:disabled {
cursor: not-allowed ;
}
.dark\:_tw-border-dark-mode-blue:is(._tw-dark *) {
--tw-border-opacity: 1 ;
border-color: rgb(2 119 189 / var(--tw-border-opacity, 1)) ;
}
.dark\:_tw-border-dark-mode-content:is(._tw-dark *) {
--tw-border-opacity: 1 ;
border-color: rgb(55 71 79 / var(--tw-border-opacity, 1)) ;
}
.dark\:_tw-bg-dark-mode-bg:is(._tw-dark *) {
--tw-bg-opacity: 1 ;
background-color: rgb(38 50 56 / var(--tw-bg-opacity, 1)) ;
}
.dark\:_tw-bg-dark-mode-blue:is(._tw-dark *) {
--tw-bg-opacity: 1 ;
background-color: rgb(2 119 189 / var(--tw-bg-opacity, 1)) ;
}
.dark\:_tw-bg-slate-500:is(._tw-dark *) {
--tw-bg-opacity: 1 ;
background-color: rgb(100 116 139 / var(--tw-bg-opacity, 1)) ;
}
.dark\:_tw-text-dark-mode-blue:is(._tw-dark *) {
--tw-text-opacity: 1 ;
color: rgb(2 119 189 / var(--tw-text-opacity, 1)) ;
}
.dark\:_tw-text-white:is(._tw-dark *) {
--tw-text-opacity: 1 ;
color: rgb(255 255 255 / var(--tw-text-opacity, 1)) ;
}