UNPKG

pxt-core

Version:

Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors

311 lines (271 loc) • 7.41 kB
/* Import all components */ @import 'themes/default/globals/site.variables'; @import 'themes/pxt/globals/site.variables'; /* Reference import */ @import (reference) "semantic.less"; /******************************* Debugger *******************************/ /* Debugger toolbox */ .debuggerToolbox.elements { height: 100%; display: flex; flex-direction: column; } /* Debugger toolbox flyout */ .debugging .blocklyFlyout { display: none!important; } .debugging .blocklyFlyoutScrollbar { display: none!important; } /* Debugger toolbar */ .debugtoolbar { // don't show the toolbar unless we're debugging. display: none; } .debugging .debugtoolbar { width: 100%; z-index: @debuggerToolsZIndex; display: flex; position: sticky; top: 0; .ui.menu { border-radius: 0 !important; border-left: none; display: flex; width: 100%; .item { padding-left: 10px; padding-right: 10px; } .separator-after { border-right: 1px solid var(--pxt-neutral-stencil1); } } } /* Debugger toolbar handle */ .ui.item.dbg-handle { cursor: move; background: var(--pxt-neutral-background3) !important; color: var(--pxt-neutral-foreground3) !important; .icon { color: var(--pxt-neutral-foreground3); } } /* Debugger toolbar buttons */ .ui.item.dbg-btn { white-space: pre; } .ui.item.dbg-btn .icon.blue { color: var(--pxt-colors-blue-background) !important; } .ui.item.dbg-btn .icon.red { color: var(--pxt-colors-red-background) !important; } .ui.button.dbg-btn .icon.green { color: var(--pxt-colors-green-background) !important; } .ui.compact.menu .dbg-btn.dbg-trace { border-radius: 0; } .ui.compact.menu .dbg-btn.dbg-trace.tracing { background-color: var(--pxt-primary-background); .icon { color: var(--pxt-primary-foreground); } } .ui.compact.menu .dbg-btn.dbg-trace.tracing:hover { background-color: var(--pxt-primary-accent); .icon { color: var(--pxt-primary-foreground); } } .ui.item.link.dbg-btn.dbg-exit { background-color: var(--pxt-colors-red-foreground1); color: var(--pxt-colors-red-background); } .ui.item.link.dbg-btn.disabled { color: var(--pxt-neutral-foreground1); } /* Debugger variables view */ .ui.varExplorer { width: 100%; .ui.variableTableHeader { padding-top: 1rem; padding-bottom: 0.5rem; padding-left: 1rem; border: none; font-family: @pageFont; font-size: larger; color: var(--pxt-neutral-foreground1); } .ui.variableTablePlaceholder { padding: 1rem; border: none; font-family: @pageFont; font-size: larger; color: var(--pxt-neutral-foreground1); } } .ui.segment.debugvariables { width: 100%; display: none; max-width: 100%; font-family: @segoeUIFont; .ui.middle.aligned.list { overflow-y: auto; max-height: 25rem; } .item { max-width: 100%; } .variableAndValue { display: flex; padding-right: 0.4rem; padding-left: 0.4rem; } .transparent{ opacity: 0; } .variable { padding: 0.15rem; } .variable.varname { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; flex-grow: 2; } .variable.detail { overflow: hidden; text-align: right; max-width: 50%; text-overflow: ellipsis; white-space: nowrap; } .varval.number { color: var(--pxt-colors-purple-background); } .varval.string { color: var(--pxt-colors-orange-background) } .varval.boolean { color: var(--pxt-colors-green-background); } .varval.array { color: var(--pxt-colors-brown-background); } .varval.Sprite { color: var(--pxt-colors-blue-background); } .previousval { text-decoration: line-through; font-size: 90%; margin-left: 0.5rem; } .exception { font-style: italic; } } .debugger-preview { position: fixed; background-color: var(--pxt-neutral-background1); color: var(--pxt-neutral-foreground1); border: solid 1px var(--pxt-neutral-foreground1); padding: 0.25rem; -webkit-touch-callout: text; /* iOS Safari */ -webkit-user-select: text; /* Chrome/Safari/Opera */ -khtml-user-select: text; /* Konqueror */ -moz-user-select: text; /* Firefox */ -ms-user-select: text; /* Internet Explorer/Edge */ user-select: text; /* Non-prefixed version, currently not supported by any browser */ overflow-wrap: break-word; max-width: 500px; } // When the preview appears, the text is selected so that the user can copy it. // Hide the selection formatting because it makes it look like the text can be edited .debugger-preview::selection { color: var(--pxt-neutral-foreground1); background-color: var(--pxt-neutral-background1); } .debugging .ui.segment.debugvariables { display: block; margin: 0; border: none; } .ui.segment.debugvariables:not(.frozen) .item:nth-child(even) { background-color: var(--pxt-neutral-background1); color: var(--pxt-neutral-foreground1); } .ui.segment.debugvariables:not(.frozen) .item:nth-child(odd) { background-color: var(--pxt-neutral-background2); color: var(--pxt-neutral-foreground2); } .ui.segment.debugvariables.frozen { background-color: var(--pxt-neutral-background3); color: var(--pxt-neutral-foreground3); } /* sim overlay */ div.simframe div.pause-overlay { background:var(--pxt-neutral-foreground1); color: var(--pxt-neutral-background1); opacity: 0.01; left: 0; top: 0; width: 100%; height: 100%; position: absolute; z-index: 100; } /* Old debugger view */ #root .debuggerview h4 { margin: 0.9em 0 0 0; } .monaco-breakpoint { cursor: pointer; background-image: url("data:image/svg+xml, %3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle fill='red' cx='50%25' cy='50%25' r='30%25' /%3E%3C/svg%3E"); background-position: center; background-repeat: no-repeat; opacity: 0; transition: opacity 0.2s; } .monaco-editor .margin-view-overlays:hover { .codicon.monaco-breakpoint { opacity: 0; } .codicon.monaco-breakpoint:hover { opacity: 0.7; } .monaco-breakpoint.active { opacity: 1; } } .monaco-breakpoint.active { opacity: 1; } .callstack-row { cursor: pointer; } @media only screen and (min-width: @computerBreakpoint) { .debugger div.monacoToolboxDiv { min-width: calc(@blocklyRowWidthWide + 100px); } } @media only screen and (max-width: @largeMonitorBreakpoint) { .dbg-btn.dbg-step .ui.text { display: none; } .ui.varExplorer .ui.variableTableHeader, .ui.varExplorer .ui.variableTablePlaceholder { padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 0.5rem; font-size: large; } } @media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) { .debugger div.monacoToolboxDiv { min-width: calc(@blocklyRowWidthTablet + 100px); } }