pxt-core-own
Version:
Microsoft MakeCode, also known as Programming Experience Toolkit (PXT), provides Blocks / JavaScript tools and editors
443 lines (365 loc) • 10.8 kB
text/less
/* Import all components */
@import 'themes/default/globals/site.variables';
@import 'themes/pxt/globals/site.variables';
/* Reference import */
@import (reference) "semantic.less";
/*******************************
High Contrast
*******************************/
@selected: #10C8CD;
@disabled: #3ff23f;
@hcYellow: yellow;
/* Messages */
#msg .hc {
background-color: black ;
border: 1px solid white ;
border-radius: 0em;
color: white ;
}
@HCRootBackground: black;
@HCblocklySvgColor: black;
@HCsimulatorBackground: black;
@HCblocklySvgColor: black;
@HCmainMenuBackground: white;
@HCmainMenuTextColor: black;
@HCmainMenuInverseTextColor: white;
@HCblocklyToolboxColor: white;
@HCblocklyTreeLabelColor: black;
@HCblocklyTreeLabelSelectedColor: white;
@HCeditorToolsBackground: black;
@HCbuttonBackground: white;
@HCbuttonTextColor: black;
@HChomeScreenBackground: black;
@HCaccessibleMenuBackground: black;
@HCaccessibleMenuColor: white;
.hc {
/* Focus */
*[tabindex='0']:focus,
*[tabindex*='d1']:focus,
*[tabindex*='d2']:focus, /* Takes items with a defined tabIndex from 0 to 29. */
*[role='menuitem']:focus,
a:not([tabindex='-1']):focus,
input:not([tabindex='-1']):focus,
button:not([tabindex='-1']):focus {
outline: 2px solid @selected ;
}
@media all and (pointer:coarse) { /* If touch screen */
*[tabindex='0']:focus,
*[tabindex*='d1']:focus,
*[tabindex*='d2']:focus,
*[role='menuitem']:focus,
a:not([tabindex='-1']):focus,
input:not([tabindex='-1']):focus,
button:not([tabindex='-1']):focus {
outline: 1px solid transparent ;
}
}
.blocklyWidgetDiv *:focus,
.blocklySVG *:focus,
.monaco-editor *:focus,
#monacoEditor *:focus {
outline: none ;
}
.blocklyTreeRoot:focus {
outline: none ;
}
/* Blockly toolbox */
.pxtToolbox:not(.invertedToolbox) {
span.blocklyTreeLabel {
color: @HCblocklyTreeLabelColor;
}
.blocklyTreeSelected span.blocklyTreeLabel {
color: @HCblocklyTreeLabelSelectedColor;
}
}
/* Blockly flyout */
path.blocklyFlyoutBackground {
fill: @HCblocklySvgColor ;
fill-opacity: 1 ;
stroke-width: 4px;
stroke: white;
}
.monacoFlyout {
background: @HCblocklySvgColor ;
border-right: 4px solid white ;
}
/* Main editor areas */
#root {
background: @HCRootBackground ;
}
#filelist {
background: @HCsimulatorBackground ;
#boardview {
background: @HCsimulatorBackground ;
}
}
svg.blocklySvg {
background-color: @HCblocklySvgColor ;
}
.blocklyMainBackground {
fill: transparent ;
}
.blocklyToolboxDiv, .monacoToolboxDiv {
background: @HCblocklyToolboxColor ;
border-right: 0px ;
}
.blocklyPath {
stroke-width: 3px;
}
/* Menu bar */
.menubar .menu > .item:focus > i,
.menubar .menu > .item:focus > span {
color: @selected ;
}
#mainmenu:not(.inverted), #homemenu:not(.inverted) {
background-color: @HCmainMenuBackground ;
color: @HCmainMenuTextColor ;
border-bottom: 4px solid white;
.ui.item {
color: @HCmainMenuTextColor;
}
.item.editor-menuitem .ui.grid {
border: 1px solid black ;
}
}
#mainmenu.inverted, #homemenu.inverted {
background-color: @HCmainMenuTextColor ;
color: @HCmainMenuBackground ;
border-bottom: 4px solid white;
.ui.item {
color: @HCmainMenuBackground;
}
.item.editor-menuitem .ui.grid {
border: 1px solid white ;
}
}
/* Editor switch toggle */
.menubar .ui.menu.fixed .item.editor-menuitem .ui.grid {
background: black ;
.item:not(.active) {
opacity: 1 ;
color: @HCmainMenuInverseTextColor ;
}
.item.active {
background: white ;
color: @HCmainMenuTextColor ;
}
}
/* Editor toolbar */
#editortools, #downloadArea {
background: @HCeditorToolsBackground ;
}
#editortools {
border-top: 4px solid white;
}
/* Buttons */
.ui.button {
background: @HCbuttonBackground ;
color: @HCbuttonTextColor ;
border: 1px solid @HCbuttonTextColor ;
&:focus {
color: @selected ;
border-color: @selected ;
i, span {
color: @selected ;
}
}
.inverted.icon {
color: @HCbuttonTextColor ;
}
}
.ui.button.disabled {
opacity: 1 ;
border: 1px solid @disabled ;
i, span {
color: @disabled ;
}
}
/* Inputs */
.ui.input input {
background: white ;
color: black ;
border: 1px solid black ;
}
input::placeholder {
color: @selected ;
}
/* Home screen */
.projectsdialog, .projectsdialog .tabsegment {
background: @HChomeScreenBackground ;
color: white ;
border-color: white ;
.header {
opacity: 1 ;
color: white;
}
.homefooter a {
color: white
}
}
/* Cards */
.card {
background: black ;
border: 2px solid white ;
border-radius: initial ;
box-shadow: initial ;
.header, .description, .meta {
color: white ;
}
&:hover {
.header, .description, .meta {
color: @hcYellow ;
}
}
&:focus {
.header, .description, .meta {
color: @selected ;
}
}
.ui.orange.labels .label, .ui.orange.label {
background: @disabled ;
border-color: @disabled ;
color: black ;
}
}
/* File menu */
.filemenu {
.item, .ui.button {
background: black ;
color: white ;
border: 1px solid white ;
}
.item:focus, .item.active {
background: @selected ;
span {
color: black ;
}
}
}
/* PxtJson */
#maineditor {
border-left: 1px solid white ;
}
/* Serial editor */
#serialPreview div {
color: white;
}
#serialCharts .ui.segment {
background-color: #fff;
}
#serialEditor {
background-color: #000;
}
#serialHeader .ui.header {
color: black;
}
#serialConsole {
background-color: #000;
color: #fff;
border-color: #fff;
}
#serialPreview .label {
border: 10px solid #fff ;
&:hover {
border-color: darken(#fff, 10.0) ;
}
}
.ui.button.labeled.icon.editorBack {
background: white ;
}
/* Hyperlinks */
a {
color: @selected ;
}
#sidedocsbar {
a {
color: black ;
&:focus {
color: @selected ;
i, span {
color: @selected ;
}
}
}
}
/* Dropdown */
.ui.menu .ui.dropdown .menu {
border: 1px solid white ;
}
.ui.menu .ui.dropdown .menu, .ui.menu .ui.dropdown .menu > .item {
background: white ;
color: black ;
&:focus {
color: @selected ;
font-weight: normal ;
i, span {
color: @selected ;
font-weight: normal ;
}
}
}
.ui.menu .ui.dropdown .menu > .divider {
background: black ;
border-top: 1px solid white ;
}
/* Tab list in Modals*/
.ui.secondary.menu > .item:not(.active), .ui.secondary.pointing.menu > .item:not(.active), .ui.secondary.inverted.menu .link.item:not(.active) {
color: black ;
border: 1px solid white ;
}
.ui.secondary.menu > .item.active, .ui.secondary.menu > .item.active:hover,
.ui.secondary.pointing.menu > .item.active, .ui.secondary.pointing.menu > .item.active:hover {
color: @selected ;
border: 2px solid @selected ;
border-radius: initial ;
box-shadow: initial ;
}
/* Tutorial */
.ui.message {
background-color: black ;
color: white ;
.tutorialmessage {
outline: 1px solid white ;
border: none ;
&:focus {
color: @selected ;
}
}
}
.ui.label {
background-color: black ;
border: 2px solid white ;
}
.ui.blue.labels .label, .ui.blue.label {
background-color: @selected ;
border-color: @selected ;
}
/* Modals */
.ui.modal {
border: 2px solid black ;
border-radius: initial ;
box-shadow: initial ;
> .closeIcon .close {
color: black ;
}
}
.ui.modal, .ui.modal > .header, .ui.modal > .content, .ui.modal > .actions, .ui.modal > .segment {
background: white ;
color: black ;
}
/* Accessible menu */
.ui.menu.accessibleMenu, #accessibleMenu {
.ui.item.link {
color: @HCaccessibleMenuColor ;
background: @HCaccessibleMenuBackground ;
}
}
}
/* > Small Monitor */
@media only screen and (min-width: @computerBreakpoint) {
/* Hide the editor toolbor in tutorial mode */
.hc.tutorial #editortools {
background: transparent ;
border-top: 0px;
}
}