UNPKG

pxt-core

Version:

Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors

2,220 lines (1,919 loc) 67.4 kB
/* Import all components */ @import 'themes/default/globals/site.variables'; @import 'themes/pxt/globals/site.variables'; /* Reference import */ @import (reference) "semantic.less"; /******************************* Layout *******************************/ @mobileAndBelow: ~"only screen and (max-width: @{largestMobileScreen})"; @tabletAndBelow: ~"only screen and (max-width: @{largestTabletScreen})"; @computerAndBelow: ~"only screen and (max-width: @{largestSmallMonitor})"; @largeMonitorAndBelow: ~"only screen and (max-width: @{largestLargeMonitor})"; html { height: 100%; width: 100%; overflow: hidden; font-size: 16px!important; } body { height: 100%; width: 100%; padding: 0; overflow: auto; margin: 0; -webkit-overflow-scrolling: touch; overflow-scrolling: touch; position: fixed; } * { min-height: 0; min-width: 0; } pre { tab-size: 4; } /* Main Layout */ #allcontent { height: 100%; width: 100%; display: flex; flex-direction: column; position: absolute; } #editorcontent { flex: 1 1 auto; position: relative; } #simulator .editor-sidebar, #maineditor, #sidedocs { position: absolute; bottom: 0rem; } #simulator .editor-sidebar, #maineditor, #sidedocs { top: @mainMenuHeight; } .hideMenuBar:not(.headless) #simulator .editor-sidebar, .hideMenuBar #maineditor, .hideMenuBar #sidedocs { top: 0 !important; } .full-abs { position: absolute !important; left: 0; top: 0; bottom: 0; right: 0; } .no-select { -webkit-touch-callout: none; /* iOS Safari */ -webkit-user-select: none; /* Chrome/Safari/Opera */ -khtml-user-select: none; /* Konqueror */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* Internet Explorer/Edge */ user-select: none; /* Non-prefixed version, currently not supported by any browser */ } /* Main Editor layout */ #maineditor { left: @simulatorWidth; right: 0; overflow: visible; } /* Editor tools */ @editorToolsHeight: 10rem; @editorToolsCollapsedHeight: 4.7rem; @editorToolsCollapsedMobileHeight: 3.4rem; #editortools { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: @editorToolsZIndex; height: @editorToolsCollapsedHeight; background-color: var(--pxt-target-background3); color: var(--pxt-target-foreground3); border-top: 2px solid var(--pxt-target-stencil3); display: flex; justify-content: space-between; align-items: center; > div { padding: 1rem; } } .zoomSliderBar { -webkit-appearance: none; /* Override default CSS styles */ appearance: none; width: 100%; height: .5rem; background: @black; outline: none; opacity: 0.7; -webkit-transition: .2s; transition: opacity .2s; top: 50%; position: relative; border-bottom: .2rem solid @grey; margin-left: 10px; margin-right: 10px; } #zoomSlider { display: inline-block; position: relative; } #root { --extra-mobile-sim-padding: 0px; &.errorListHeader { --extra-mobile-sim-padding: @errorListHeaderHeight; } &.errorListExpanded { --extra-mobile-sim-padding: @errorListHeight; } } .transparentEditorTools #editortools { background-color: transparent; z-index: (@blocklyFlyoutZIndex)-1; border: unset; } #blocksArea, #monacoEditor, #pxtJsonEditor, #serialEditor, #assetEditor, #simulator .editor-sidebar { bottom: @editorToolsCollapsedHeight; } .hideEditorToolbar #blocksArea, .hideEditorToolbar #monacoEditor, .hideEditorToolbar #pxtJsonEditor, .hideEditorToolbar #serialEditor, .hideEditorToolbar #githubEditor, .hideEditorToolbar #assetEditor, .hideEditorToolbar #simulator .editor-sidebar { bottom: 0rem !important; } #miniSimOverlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: none; cursor: pointer; } /* File list / Simulator layout */ #simulator { height: 100%; } #simulator .editor-sidebar, #downloadArea { min-width: @simulatorWidth; max-width: @simulatorWidth; left: 0; } #simulator .editor-sidebar { overflow-x: hidden; overflow-y: auto; margin-top: 0; margin-bottom: 0; right: 0; background-color: var(--pxt-target-background2); color: var(--pxt-target-foreground2); z-index: @filelistZIndex; } .invisibleScrollbar::-webkit-scrollbar { background: transparent !important; } .invisibleScrollbar::-webkit-scrollbar-thumb { display: none !important; } .invisibleScrollbar::-webkit-scrollbar-track { background: transparent !important; } #simulator .editor-sidebar .simtoolbar { -webkit-transition: opacity 0.2s; /* Safari */ -moz-transition: opacity 0.2s; /* Mozilla */ -webkit-transition-timing-function: linear; /* Mozilla */ -o-transition: opacity 0.2s; /* Opera */ transition: opacity 0.2s; transition-timing-function: linear; .debug-button.active, .mute-button.active { background-color: var(--pxt-secondary-accent); &:focus, &:hover { filter: none; } } } .editor-sidebar .simtoolbar .ui.button:focus-visible { outline: @editorFocusBorderSize solid var(--pxt-focus-border); } #downloadArea { margin: unset; > div { margin: 0; } .ui.button:focus, .ui.button:hover { // Semantic UI darkens background using a filter, which affects the menu as well as the button that opened it. // Turn that off for the download menu, then simply change bkg color instead. filter: none; background-color: var(--pxt-primary-background-hover) !important; color: var(--pxt-primary-foreground-hover) !important; } } #downloadArea .button:focus-visible, #editortools .button:focus-visible { outline: @editorFocusBorderSize solid var(--pxt-focus-border); outline-offset: 2px; } #editorToolbarArea { margin: 0; margin-left: auto; } #editortools .download-button { text-align: center; } .transparentEditorTools #downloadArea { background-color: transparent !important; } #simulator .editor-sidebar .filemenu { direction: ltr; width: 100% !important; margin: 0; margin-top: 1rem; background: var(--pxt-primary-background); color: var(--pxt-primary-foreground); .item, .link.item { color: var(--pxt-primary-foreground) !important; // override !important in semantic ui border-radius: inherit; &:hover { background: var(--pxt-primary-background-hover) !important; color: var(--pxt-primary-foreground-hover) !important; } } } .filemenu .nested.item { padding: .92857143em 1.14285714em; padding-left: 1rem; } .filemenu .header.item { background: var(--pxt-neutral-alpha10); } .filemenu .folder.item { font-weight: bold; } .filemenu .folderitem.item { padding-left: 2rem; } #simulators { text-align: center; } .simulator .ui.embed .icon.xicon::before { transform: translateX(-50%) translateY(-50%); transition: opacity .25s ease,color .25s ease; } .simulator .ui.embed .icon.xicon::after { background: rgba(0,0,0,.3); transition: opacity .25s ease; } .simulator .ui.embed .icon.xicon:hover:before { color: var(--pxt-colors-green-background); } .simulator .ui.embed .icon.xicon:hover:after { opacity: 0.6; } /* Simulator */ div.simframe { border:none; margin:0 0 0.5rem 0; position: relative; background:transparent; width:100%; padding-bottom: 81.96%; } div.simframe > iframe { position:absolute; top:0; left: 0; width:100%; height:100%; } #boardview:focus-visible { outline: 3px solid var(--pxt-focus-border); outline-offset: 3px; } .simHeadless { height: 0 !important; width: 0 !important; } /* Menu */ // The classname .menubar is also used by monaco. This rule just negates the clashing // values #root > .menubar, #homescreen > .home > .menubar { height: unset; overflow: unset; } .menubar .ui.menu .item.editor-menuitem { padding: 0; } .menubar .ui.menu .item.editor-menuitem:hover { background: none !important; } .menubar .ui.menu.fixed .item.editor-menuitem .ui.grid { background: var(--pxt-neutral-alpha20) !important; border: 3px solid var(--pxt-neutral-alpha10); border-radius: 2.5rem !important; position: relative; } .menubar .ui.menu.fixed .ui.item.editor-menuitem .item { border-radius: 2.5rem !important; width: 140px; z-index: 2; } .menubar .ui.menu.fixed #editordropdown .item { border-radius: 0 !important; } .menubar .ui.menu.fixed .ui.item.editor-menuitem .item.link:hover { background: none; } .menubar .ui.menu.fixed .ui.item.editor-menuitem .item:not(.active) * { opacity: 0.8; } .menubar .ui.menu.inverted.fixed .ui.item.editor-menuitem .active.item { background: none; color: var(--pxt-header-background) !important; } .menubar { .left.menu, .right.menu, .center.menu { display: flex; flex: 1; } .right.menu { justify-content: flex-end; } .center.menu { justify-content: center; } .ui.item { margin: 0; } .ui.menu .brand { &::before { position: relative; height: 1.5rem; border-left: 2px solid @white; content: " "; } } } .sandbox .menubar { .logo.organization, .logo.brand::before { display: none; } } .ui.menu .ui.dropdown.item .menu .item.link.menuitemcheckbox { display: flex; } .settings-menuitem, .help-dropdown-menuitem { flex-shrink: 0; ul.common-menu-dropdown-pane { overflow-y: auto; max-height: calc(100vh - @mainMenuHeight); } & > button.common-button { &:focus-visible { background: var(--pxt-neutral-alpha10); color: #fff; outline: 3px solid var(--pxt-neutral-stencil3); outline-offset: -3px } &:focus-visible::after { outline: none; border: none; } & > span > i { opacity: 0.9; } } } /* toggle style */ .ui.item.editor-menuitem .item.toggle { z-index: 1 !important; margin: 1px; height: 46px; left: 0; position: absolute; opacity: 1 !important; background: none; margin: 0; -webkit-transition: margin-left .3s; /* Safari */ -moz-transition: margin-left .3s; /* Mozilla */ -webkit-transition-timing-function: ease-in; /* Mozilla */ -o-transition: margin-left .3s; /* Opera */ transition: margin-left .3s; transition-timing-function: ease-in; } /* active toggle */ .ui.item.editor-menuitem .active ~ .item.toggle { box-shadow: 2px 0 0 rgba(0,0,0,.1)!important; background: #fff!important; } #editortoggle > .link { justify-content: center; } #editortoggle > .item { outline: none; } #editortoggle { /* toggle positioning, no dropdown */ .base-menuitem:nth-of-type(1).active ~ .toggle { margin-left: 0!important; } .base-menuitem:nth-of-type(2).active ~ .toggle { margin-left: 140px!important; } .base-menuitem:nth-of-type(3).active ~ .toggle { margin-left: 280px!important; } /* toggle positioning after dropdown */ & > #editordropdown:nth-of-type(2) ~ .active ~ .toggle { margin-left: 185px!important; } & > #editordropdown:nth-of-type(3) ~ .active ~ .toggle { margin-left: 326px!important; } .toggle.dropdown-attached { border-top-right-radius: 0!important; border-bottom-right-radius: 0!important; } .base-menuitem:focus-visible { outline: 3px solid white; outline-offset: -5px; } .base-menuitem.active:focus-visible { outline-color: var(--pxt-target-stencil1); } } #editordropdown { width: auto; border-top-left-radius: 0px!important; border-bottom-left-radius: 0px!important; } #editordropdown .menu > .item { width: 184px; opacity: 1; } #editordropdown .menu > .item.selected:after { content: '✔'; float: right; } .main:not(.hc) #editordropdown { .menu { background-color: var(--pxt-neutral-background1) !important; > .item { background: none; color: var(--pxt-neutral-foreground1) !important; &:hover { background: var(--pxt-neutral-background1-hover) !important; color: var(--pxt-neutral-foreground1-hover) !important; } } } &.active, #mainmenu #editordropdown.active:focus { background-color: var(--pxt-header-foreground) !important; color: var(--pxt-header-background) !important; } } /* Help card */ #helpcard { position: absolute; right: 7rem; bottom: 2.2rem; margin: 0; z-index: @helpCardZIndex; font-size:0.8rem; } /* Logo */ .ui.menu .ui.item.logo { font-size: 2.2rem; margin: 0; padding: 0rem !important; } .ui.menu .ui.item.logo:hover { background: none; } .ui.item.logo.organization, .inHome .ui.item.logo.brand { pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } .ui.item.logo.brand[role=menuitem] { cursor: pointer; } .ui.item.logo .name, .ui.item.logo .name-short { font-family: @segoeUIFont; font-size: 18px; font-weight: 700; color: #fff; margin-left: 1rem; margin-bottom: 1px; } .ui.item.logo .name-short { display: none; } .ui.item.logo svg { width: 1.2rem; height: 1.2rem; } .ui.item.logo img { margin: 0 1rem; height: 1.4rem; } /* Native Host (iOS app) back button */ .nativeback.ui.item { margin-right: -1rem; } /* Powered by Microsoft logo*/ #editorlogo { position: fixed; bottom: 0; right: 0; height: 42px; background-color: var(--pxt-target-background1); color: var(--pxt-target-foreground1); z-index: @editorLogoZIndex; display: none; } #editorlogo > .poweredbylogo { position: absolute; left: 10px; bottom: 5px; width: 100%; height: 32px; background-repeat: no-repeat; background-size: contain; } /* Sandbox */ .sandboxfooter { position:absolute; bottom:0rem; right:0rem; z-index: @sandboxFooterZIndex; margin-bottom: 0.2rem !important; } .sandboxfooter .item { font-size: 0.8rem !important; } /* code card */ .ui.card { .image pre { margin-left:0.5rem; margin-right:0.5rem; color: #000; font-size:0.7rem; white-space: pre-wrap; max-height: 10rem; overflow-y: hidden; } } /* Popup message */ #msg { position: absolute; bottom: 5rem; left: 0; right: 0; text-align: center; } #msg > div { display: inline-block !important; z-index: @editorMessageZIndex; } #msg > div:empty { display: none !important; } /* Button Colors */ .ui.button.editortools-btn { &:extend(.ui.grey.button all); /* Fixes an error in some webkit browsers where icons get repositioned on hover */ position: relative; } .ui.button.big-play-button, .ui.button.hw-button, .ui.button.hw-button > .icon.caret { /* Fixes an error in some webkit browsers where icons get repositioned on hover */ position: relative; } .hw-button.ui.dropdown .menu { background: var(--pxt-neutral-background1); color: var(--pxt-neutral-foreground1); border: 1px solid var(--pxt-neutral-stencil1); & > .item { color: var(--pxt-neutral-foreground1); &:hover, &:focus { background: var(--pxt-neutral-background1-hover); color: var(--pxt-neutral-foreground1-hover); } } } .ui.button:hover, .ui.button:focus { filter: grayscale(.15) brightness(.85) contrast(1.3); } /* Icon and text */ .ui.item.link.dbg-btn > .icon-and-text.icon ~ .ui.text, .ui.item.link > .icon-and-text.icon ~ .ui.text.exit-debugmode-btn, .ui.item.icon > .icon-and-text.icon ~ .ui.text, .ui.button.icon > .icon-and-text.icon ~ .ui.text { margin-left: 0.5em !important; } /* Beta */ .ui.label.betalabel { padding: 0.3em; } /* Collapse/expand button for simulator, sidedocs */ #computertogglesim, #mobiletogglesim, #sidedocstoggle { position: absolute; border-top-left-radius: 100px; border-bottom-left-radius: 100px; top: 40%; height: 20%; padding: 0; margin: 0; background: @grey; box-shadow: none!important; transition: none; opacity: 0.8; &:hover, &:focus { opacity: 1; } &:focus-visible { outline: @editorFocusBorderSize solid var(--pxt-focus-border); } } #computertogglesim, #sidedocstoggle { z-index: @sidedocZIndex; } #mobiletogglesim { z-index: @blocklyToolboxZIndex; } // Factor in 4rem height of top bar #mobiletogglesim, #computertogglesim { left: -21px; top: calc(~'40% - 2.4rem'); height: calc(~'20% + 0.8rem'); } .collapsedEditorTools #computertogglesim, .collapsedEditorTools #mobiletogglesim { border-top-left-radius: 0; border-bottom-left-radius: 0; border-top-right-radius: 100px; border-bottom-right-radius: 100px; left: -21px; } /******************************* Notification banner *******************************/ #notificationBanner { z-index: 1000; } .notificationBannerVisible #simulator .editor-sidebar, .notificationBannerVisible #maineditor, .notificationBannerVisible.sideDocs #sidedocs { top: calc(@mainMenuHeight + @bannerHeight); } .notificationBannerVisible #mainmenu { top: @bannerHeight; margin: 0; } #notificationBanner { padding: 0; font-family: @segoeUIFont; height: @bannerHeight; margin-top: 0; display: flex; flex-direction: row; align-items: center; width: 100%; .bannerLeft { display: block; .content { display: flex; flex-direction: row; align-items: center; line-height: 100%; > * { margin-left: 0.25rem; } img { height: @bannerHeight; } a.link { font-weight: bold; text-decoration: underline; &:hover, &:focus { cursor: pointer; } } } } .bannerRight { display: flex; flex-direction: row-reverse; flex-grow: 1; line-height: 100%; .close { &:hover, &:focus { cursor: pointer; opacity: 0.7; } } } } #notificationBanner.default { background-color: var(--pxt-neutral-background1); color: var(--pxt-neutral-foreground1); outline: 2px solid var(--pxt-neutral-stencil1); a.link { color: var(--pxt-link); &:hover, &:focus { color: var(--pxt-link-hover); } } } /****************************** Avatar ******************************/ .avatar { position: relative; } @media only screen { .avatar .avatar-image { position: absolute; left: 0; top: 1em; width: 3em; height: 3em; background-size: contain; background-image: @avatarImage; } } @media only print { .avatar .avatar-image { display: list-item; list-style-image: @avatarImage; list-style-position: inside; } } .avatar .message:after { top: 1.1em; left: -1em; bottom: auto; border-width: 0px 1em 0.7em 0; border-color: rgba(0, 0, 0, 0) #EEE; content: ''; position: absolute; border-style: solid; display: block; width: 0; } /* Json editor */ #pxtJsonEditor .ui.content { padding: 1rem; } .rtl #fileNameInput { text-align: right; } /* Simulator effects */ @keyframes glow { to { outline-color: yellow; } } .glow > div { outline: 3px solid transparent; animation: glow 0.3s infinite alternate; transition: outline 0.3s linear; } /* ping anim */ @keyframes ping { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } } .ping2s { animation: ping 1s; animation-iteration-count: 2; } .ping { animation: ping 1s infinite; } .grayscale { -moz-filter: grayscale(1); -webkit-filter: grayscale(1); filter: grayscale(1); } .sepia { -webkit-filter: sepia(1); filter: sepia(1); } .blur { -moz-filter: blur(1); -webkit-filter: blur(1); filter: blur(1); } // clashes with highlighted typescript code snippets svg .highlight { border-bottom: 2px solid #FFC107; } /* Modulator */ #modulatorWrapper, #modulatorAudioOutput { display: none; } /******************************* Field editors *******************************/ .hidden { display: none !important; } /******************************* Social Buttons *******************************/ .social-icons a.facebook { color: white; background-color: #3b5998; } .social-icons a.twitter { color: white; background-color: #1da1f2; } .social-icons a.discourse { color: var(--pxt-primary-foreground); background-color: var(--pxt-primary-background); } /******************************* Extensions *******************************/ .extensions-browser.hide { display: none; } @keyframes cardGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .extension-card.loading { background: @loadingAnimation; background-size: 400% 400%; animation: cardGradient 3s infinite alternate; } .fullscreen.extensions-browser > { .common-modal > { .common-modal-header { height: @mainMenuHeight; background-color: var(--pxt-header-background); z-index: 202; display: flex; padding-left: 0rem; .header-left, .header-right, .header-center { flex: 1 } .header-left { display: flex; height: 100%; } .header-center { color: @white; height: 100%; display: flex; align-items: center; justify-content: center; } } .common-modal-body { padding: 0rem; } } } @media @tabletAndBelow { .fullscreen.extensions-browser > .common-modal > .common-modal-header { height: @mobileMenuHeight; } .extensions-browser { .extension-header > .import-button>.common-button { .common-button-label { display: none; } } } .settings-menuitem, .help-dropdown-menuitem { ul.common-menu-dropdown-pane { overflow-y: auto; max-height: calc(100vh - @mobileMenuHeight); } } } @media @mobileAndBelow { .extensions-browser { .common-modal > .common-modal-header > .common-modal-back { .common-button-label { display: none; } } } } .extensions-browser { position: absolute; background-color: var(--pxt-neutral-background1); color: var(--pxt-neutral-foreground1); width: 100%; min-height: 100%; z-index: 200; font-size: 1.2rem; .extension-search-header { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; padding-top: 2rem; padding-bottom: 2rem; background-color: var(--pxt-neutral-alpha10); .common-input-wrapper { width: 70%; .common-input-group { height: 3rem; border-radius: 500rem; padding: 0.7rem 1rem; & i.fas.fa-search { position: relative; margin-top: 0.1rem; right: 0; bottom: 0; opacity: .5; transition: opacity 0.3s ease; } & > button:focus-visible { outline: 3px solid var(--pxt-focus-border); border-radius: 20%; &::after { content: none; } } &:focus-within { outline: 3px solid var(--pxt-focus-border); &:has(button:focus-visible) { outline: none; } } &:focus-within::after { content: none; } & > input:focus { outline: none !important; } } &:focus-within .common-input-group > i.fas.fa-search { opacity: 1; } } } .importButton { width: 100%; display: flex; justify-content: center; padding-bottom: 3rem; gap: .8rem; .importButtonLink { color: var(--pxt-link); cursor: pointer; } .importButtonLink:hover { text-decoration: underline; } } .extension-display { display: flex; flex-wrap: wrap; justify-content: center; padding: 2rem; gap: .8rem; .breadcrumbs { font-family: @segoeUIFont; width: 100%; padding-bottom: 1.5rem; .link { color: var(--pxt-link); cursor: pointer; } >span { padding-right: .5rem; } .common-button { font-size: 1.2rem; padding-right: .5rem; margin-right: 0rem; } } } .extension-header { font-family: @segoeUIFont; width: 95%; display: flex; align-items: flex-end; justify-content: space-between; } .import-button>.common-button { padding: .8rem 1rem .95rem; background-color: var(--pxt-neutral-background1) !important; color: var(--pxt-neutral-foreground1) !important; /* Add some additional contrast against bkg */ box-shadow: 0 1px var(--pxt-neutral-stencil1) !important; &:hover { background-color: var(--pxt-neutral-background1-hover) !important; color: var(--pxt-neutral-foreground1-hover) !important; } &:focus-visible { outline: 3px solid var(--pxt-focus-border); } } .extension-grid { display: flex; flex-wrap: wrap; gap: .8rem; } .extension-card:hover { border: var(--pxt-focus-border) .15rem solid; } .extension-tags { display: flex; gap: 1rem; width: 80%; justify-content: center; flex-wrap: wrap; } .extension-tag { border: .1rem solid var(--pxt-neutral-foreground1); padding: .6rem 1.25rem; border-radius: 1.6rem; cursor: pointer; color: var(--pxt-neutral-foreground1); background-color: inherit; } .extension-tag:hover { background-color: var(--pxt-neutral-alpha20); } .extension-tag.selected { background-color: var(--pxt-focus-border); border-color: var(--pxt-focus-border); color: @white } .extension-tag:focus-visible { outline: 3px solid var(--pxt-focus-border); &::after { content: none; } } .tab-header { width: 100%; .common-button { border: 2px solid var(--pxt-neutral-stencil1); background-color: var(--pxt-neutral-background1); color: var(--pxt-neutral-foreground1); &:hover { background-color: var(--pxt-neutral-background1-hover); color: var(--pxt-neutral-foreground1-hover); } } .common-button.selected { border-bottom: 2px solid var(--pxt-focus-border); font-weight: 600; } } .common-modal > .common-modal-body { overflow-y: auto; padding: 0rem; } .extension-grid { overflow-y: auto; overflow-x: hidden; margin-top: 0.5rem; } .ui.card { height: 20rem; .ui.cardimage { background-color: transparent; height: 11rem; &.upload { margin: 3em auto; } } .content:not(.extra) { .header { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } .description { height: 2.8em; overflow: hidden; } .description.long { height: 14em; } } } .ui.card.loading { background: @loadingAnimation; background-size: 400% 400%; animation: gradient 3s infinite alternate; } /* Search input */ .ui.search { margin: auto; } .ui.inline.loader { margin-top: 4em; :after, :before { width: 4rem; height: 4rem; } } } .extension-cards { display: grid; grid-template-columns: repeat(auto-fit, 18rem); justify-content: center; gap: 1rem; max-width: 95%; width: 95%; } .import-extension-modal { .common-modal-body { display: flex; flex-direction: column; } } // reduce all card sizes @media @mobileAndBelow { .extensions-browser { .ui.card, .ui.cards > .card { width: 9rem; height: 9rem; .ui.cardimage { height: 5rem; &.upload { margin: auto; } } } } } /******************************* Editor Sidebar *******************************/ @sidebarPrimaryColor: var(--pxt-colors-blue-background); @sidebarSecondaryColor: var(--pxt-focus-border); @sidbarActiveTabIconColor: var(--pxt-focus-border); #simulator .editor-sidebar { border-right: 2px solid var(--pxt-neutral-stencil1); .tab-navigation { color: @sidebarSecondaryColor; background-color: @sidebarPrimaryColor; } .tab-icon.active { color: @sidbarActiveTabIconColor; background-color: @sidebarPrimaryColor; } } #serialPreview .label:focus { outline: 3px solid var(--pxt-focus-border) !important; outline-offset: -15px; } /******************************* Layout Variables *******************************/ .ui.widedesktop.only { display:none !important; } .ui.tablet.only { display:none !important; } .ui.mobile.only { display: none !important; } /******************* Font size *************************/ p.ui.font.small { font-size:0.8em; } /** App **/ .ui.app .ui.app.hide { display: none !important; } /** Screen modes **/ @media only screen and (min-width: @largeMonitorBreakpoint) and (min-height:30em) { .ui.widedesktop.only { display:unset !important; } .ui.widedesktop.hide { display:none !important; } } /* smaller desktop screen */ @media only screen and (max-width: @largestTabletScreen), only screen and (max-aspect-ratio: 12/10) { .ui.desktop.only { display:none !important; } } /* thin desktop portrait mode */ @media only screen and (max-width: @largestTabletScreen), only screen and (max-aspect-ratio: 7/10) { .ui.landscape.only { display:none !important; } } @media only screen and (min-width: @computerBreakpoint) { .ui.portrait.only { display:none !important; } } /* Tablet only */ @media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) { .ui.tablet.only { display:unset !important; } .collapse-button.ui.tablet.only { display:inherit !important; // fix for simulator toggle, IE11 does not have "unset" } } /* Mobile + Tablet */ @media only screen and (max-width: @largestTabletScreen) { .simView #boardview { padding-top: @sandboxMobileMenuHeight; } .ui.portrait.only { display:unset !important; } .ui.portrait.hide { display:none !important; } .collapse-button.ui.computer.only { display:none !important; // hide desktop simulator toggle } .hideEditorToolbar #simulator .editor-sidebar { display:none !important; } // Menu bar text logos ("MakeCode Arcade") .ui.item.logo .name { display: none; } .ui.item.logo .name-short { display: block; } .menubar .right.menu .signin-button { height: 2.5rem; } .sign-in-dropdown { padding-left: .1rem; padding-right: .1rem; } } /* Mobile only */ @media only screen and (max-width: @largestMobileScreen) { .menubar .right.menu .signin-button .icon { margin-left: -.2rem; } .ui.mobile.only { display:unset !important; } .ui.mobile.only.inherit { display:inherit !important; } .ui.mobile.hide { display:none !important; } } /* Scren heights */ /** Thin **/ @media only screen and (max-height: @tallEditorBreakpoint) and (min-width: @largestMobileScreen) { .ui.tall.only { display:none !important; } .simView #boardview { padding-top: @thinMenuHeight; } .menubar .right.menu .signin-button { height: 2.5rem; } } @media only screen and (min-height: @thinEditorBreakpoint) { .ui.thin.only { display:none !important; } } /******************************* fullscreensim *******************************/ .fullscreensim { z-index: @aboveEverythingZIndex; /* Full screen */ .simPanel { position: fixed; z-index: @fullscreenZIndex; top:0 !important; left:0 !important; bottom:0 !important; right:0 !important; padding: 0 !important; margin: 0 !important; max-width: 100%; min-width: 100%; height:100% !important; background-color: var(--pxt-target-background2); color: var(--pxt-target-foreground2); } #miniSimOverlay { display: none; } #boardview { position: relative; height:100%; background-color: white; padding-top: 1rem; padding-bottom: 4.5rem; padding-left: 0rem; padding-right: 0rem; background-color: var(--pxt-target-background2); background: var(--pxt-target-background2); /* For browsers that do not support gradients */ background: -webkit-linear-gradient(var(--pxt-secondary-background) 50%, var(--pxt-target-background2)); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(var(--pxt-secondary-background) 50%, var(--pxt-target-background2)); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(var(--pxt-secondary-background) 50%, var(--pxt-target-background2)); /* For Firefox 3.6 to 15 */ background: linear-gradient(var(--pxt-secondary-background) 50%, var(--pxt-target-background2)); /* Standard syntax */ } #simulator .hidefullscreen, .menubar .ui.item:not(.logo), #maineditor, #editortools, #serialPreview { display: none !important; z-index: -10 !important; } .tutorialWrapper { display: none; } .sandboxfooter { z-index: @sandboxFooterZIndex; bottom: 1rem; } #mainmenu { background: transparent !important; } .simPanel .simtoolbar { position: fixed; bottom: 1rem; left: auto; right: auto; display: block !important; } .simPanel .multiplayer-presence { position: fixed; bottom: 4rem; } .simPanel.multiplayer-preview #simulators { height: calc(100% - 1.5rem); } #simulators { position: relative; padding: 3rem 1rem 3rem; width: 100%; height: 100%; } div.simframe { position:relative; width: 50%; height: 100%; float: left; padding-bottom: 0 !important; } div.simframe > iframe { position:relative; max-width: 90%; } div.simframe:only-child { width: 100%; } div.simframe:only-child > iframe { max-width: 100%; } .simtoolbar .ui.button { font-size: 1.7rem; } div.simframe:not(:first-child) { display: unset; } } .sandbox .simPanel .simtoolbar { display: none !important; } /*********************************** Headless Simtoolbar (Minecraft) ************************************/ #root.headless { .simPanel { display: block; bottom: 0 !important; } .simPanel .simtoolbar.item { margin: 1rem 0; } i.green.icon { color: rgba(0,0,0,.6)!important; } #boardview.headless-sim { height: 100%; padding: 1rem; width: @simulatorWidth; } } #root.headless.collapsedEditorTools { #simulator .editor-sidebar { display: none; } #boardview, .filemenu { display: none; } } #root.headless:not(.collapsedEditorTools) { #simulator .editor-sidebar { left: 0; z-index: 40; } } #root.headless.transparentEditorTools { #editortools { left: auto; height: 5.7rem; margin-right: 1rem; bottom: var(--extra-mobile-sim-padding); } #editortools #downloadArea, #editortools > div > div > .ui.grid > .column.left { display: none; } @media only screen and (max-width: @largestTabletScreen) { #editortools > div > div > .ui.grid > .column.right { width: 100%!important; } } } #editortools #projectNameArea { padding: 1rem 0; input { font-size: 0.95rem; } } .cloudstatusarea { color: var(--pxt-tertiary-background); align-self: center; display: flex; .cloudicon { margin-left: 0.5rem; } .cloudprogress { margin-left: 0.5rem !important; } .cloudtext { margin-left: 0.5rem; } .ui.loader:after { border-top-color: var(--pxt-tertiary-background); } } /******************************* Download dialogs *******************************/ .ui.modal .actions .dialog-help-large, .downloaddialog.ui.modal .actions .icon.help { float: left; margin-left: 4px; } .downloaddialog.ui.modal .actions .icon-and-text.icon~.ui.text { margin-left: -0.5em !important; } .ui.modal .actions .left-action { float: left; } .download-callout { background-color: #EAE7FF; color: #4C309D; border-radius: 1em; padding: 1em; position: relative; margin-top: 1.5rem; .ui.purple.ribbon.label { position: absolute; left: -1rem; top: -1rem; padding-left: 1.5rem; } > .content { padding-top: .25rem; } button.ui.button { margin-top: .5rem; } } .ui.grid>.icon-align.wide.column { display: flex; flex-direction: column; div { flex-grow: 1; } } .download-device-name { color: #4C309D; } .header>.header-inline-icon ~ .header-title { display: inline; } .downloaddialog .content .webusb-connect-image { padding: 0 !important; margin: 0 auto; } .download-dialog-image img:not(.large) { max-height: 200px; object-fit: contain; } .download-dialog .column .ui, .download-dialog .column .ui .content { height: 100%; display: flex; height: 100%; align-items: center; } .downloaddialog .actions .approve.secondary { float: left; } #downloadArea button .icon.xicon { font-family: "xicon"; } .download-troubleshoot-header { padding: 0 1rem; } .download-troubleshoot { display: flex; flex-direction: row; margin-top: 1rem; .download-column { padding: 0 1rem; display: flex; flex-direction: column; } .download-row { padding-bottom: 1rem; min-height: 30%; img { width: 300px; height: 100%; object-fit: contain; object-position: center; } } .download-row.image-row { flex: 2; } } /******************************* Mini sim view *******************************/ #root.miniSim:not(.fullscreensim):not(.sandbox) { /* Layout */ .simPanel.ui.items { position: fixed; padding: 0; margin: 1em 1em 0; bottom: ~"calc(5.5rem + var(--extra-mobile-sim-padding))" !important; right: 0.5rem; top: unset; left: unset; width: auto; height: auto; min-width: inherit; max-width: inherit; background: transparent !important; overflow: visible; z-index: 20; } .simPanel .simtoolbar > .buttons { > .debug-button { display: block !important; } } &.collapsedEditorTools:not(.tabTutorial) .simPanel { > div { display: none !important; } } &.collapsedEditorTools .simPanel { aside.simtoolbar button:not(.expand-button) { display: none !important; } } #miniSimOverlay { position: absolute; display: block; width: 10rem; /* match width of div.simframe */ height: 8rem; } .simPanel { bottom: @editorToolsCollapsedMobileHeight; } &:not(.headless):not(.sandbox) { #boardview { display: inline-block; width: 10rem; } .simPanel .simtoolbar { margin: 1rem 0; width: 3rem; float: right; } .simPanel .simtoolbar > div:not(:first-child), .simPanel .simtoolbar > .buttons > .button { display: none; } .simPanel .simtoolbar > div:first-child { flex-direction: column; border-radius: 4px; overflow: hidden; } .simPanel .simtoolbar > div:first-child > button { border-radius: 0; font-size: .92857143rem; } #editortools .left .buttons:first-child { position: absolute; bottom: 0; } } &.headless { .simPanel { left: 5rem!important; z-index: 42!important; } } /* Simulator */ div.simframe { display:inline-block; width: 10rem; margin-right:0.5rem; margin-bottom: 1rem; padding-bottom: 81.96% !important; } div.simframe:not(:first-child) { display:none; } #simulators { flex-direction: row; display: flex !important; } /* Simulator Toggle Button */ #mobiletogglesim, .collapsedEditorTools #mobiletogglesim { border-top-right-radius: 100px; border-top-left-radius: 100px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; top: auto; left: 40%; width: 20%; height: auto; bottom: 10rem; } .collapsedEditorTools #mobiletogglesim { bottom: @editorToolsCollapsedHeight; } } /******************************* Media Adjustments *******************************/ /* Large Monitor */ @media only screen and (min-width: @largeMonitorBreakpoint) { #editorlogo > .poweredbylogo { .includePoweredByLogos(); // set the @poweredByLarge variable background-image: @poweredByLarge; } } /* Small Monitor */ @media only screen and (min-width: @computerBreakpoint) and (max-width: @largestSmallMonitor) { #editorlogo > .poweredbylogo { .includePoweredByLogos(); // set the @poweredByLarge variable background-image: @poweredByLarge; } } /* Tablet */ @media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) { #editorlogo { height: 18px; } #editorlogo > .poweredbylogo { height: 12px; bottom: 3px; .includePoweredByLogos(); // set the @poweredBySmall variable background-image: @poweredBySmall; } #root.headless.transparentEditorTools { #editortools { margin-bottom: 1.5rem; } } .ui.button.hw-button > .icon.ellipsis { left: -1px; position: relative; } .collapsedEditorTools .hw-button:hover:after { transform: translateX(0%)!important; left: -2rem; } #downloadArea { // .25rem from padding around editortoolbar in portrait mode width: ~"calc(@{blocklyRowWidthTablet} - .25rem)"; margin-right: 0 !important; } .download-troubleshoot .download-column .download-row img { width: 200px; } } /* Mobile */ @media only screen and (max-width: @largestMobileScreen) { #editorlogo { height: 18px; } #editorlogo > .poweredbylogo { height: 13px; bottom: 3px; .includePoweredByLogos(); // set the @poweredBySmall variable background-image: @poweredBySmall; } .hw-button:hover:after { transform: translateX(-100%)!important; left: 3rem; } .collapsedEditorTools .hw-button:hover:after { transform: translateX(0%)!important; left: -2rem; } #root:not(.fullscreensim):not(.headless):not(.sandbox) { #boardview { width: 6.5rem !important; } #miniSimOverlay { width: 6.5rem !important; height: 5.5rem !important; } } .download-troubleshoot .download-column .download-row img { width: 200px; } } /* >= Small Monitor (Small Monitor + Large Monitor + Wide Monitor) */ @media only screen and (min-width: @computerBreakpoint) { .collapsedEditorTools:not(.headless):not(.tabTutorial) #simulator .editor-sidebar { min-width: 21px; width: 21px; padding: 0; > * { display: none; } } .collapsedEditorTools #downloadArea { background: var(--pxt-target-background3); color: var(--pxt-target-foreground3); } .collapsedEditorTools:not(.headless):not(.tabTutorial) #maineditor { left: 21px; } .collapsedEditorTools.headless #maineditor { left: 0; } #editortools { z-index: @simulatorZIndex + 1; } .ui.button.hw-button > .icon.ellipsis { left: -1px; top: 4px; position: relative; } #simulator .topInstructions { left: @simulatorWidth; min-width: unset; max-width: unset; padding: 0; } } /* <= Small Monitor (Mobile + Tablet + Small Monitor) */ @media only screen and (max-width: @largestSmallMonitor) { /* Layout */ #simulator .editor-sidebar, #downloadArea { min-width:@simulatorWidthSmall; max-width:@simulatorWidthSmall; } #simulator .topInstructions { left: @simulatorWidthSmall; min-width: unset; max-width: unset; } #boardview.headless-sim { width: @simulatorWidthSmall; } #maineditor { left:@simulatorWidthSmall; } /* Help card */ #helpcard { top: auto; bottom: 2.2rem; margin: 0; } .ui.card .meta .date.small-screen.hide { display: none; } } @media only screen and (min-width: @tabletBreakpoint) { .ui.phone.hide { display: none; } } /* <= Tablet (Mobile + Tablet) */ @media only screen and (max-width: @largestTabletScreen) { /* Logo */ .ui.logo.brand, .ui.logo.organization { font-size: 0rem; padding-right: 0; } /* Help card */ #helpcard { top: auto; bottom: 2rem; margin: 0; } #blocksArea, #monacoEditor, #pxtJsonEditor, #serialEditor, #assetEditor { bottom: @editorToolsCollapsedMobileHeight; } #editortools { height: @editorToolsCollapsedMobileHeight; padding: 0.25rem; > div { padding: 0 !important; } #downloadArea { background-color: inherit; min-width: unset; max-width: unset; margin-right: 0.25rem; .ui.item { margin-top: 0; padding-top: 0; } } } #simulator .editor-sidebar { min-width: unset; max-width: unset; width: 0; padding: 0; } #root.collapsedEditorTools #editortools .left .buttons:first-child { bottom: auto!important; // undo bottom positioning for collapsed toolbar } #maineditor { left: 0; right:0; } #maineditor:not(.sandbox) { bottom: 0rem; } #tutorialcard.bottom { bottom: 11rem; } .hideEditorFloats #editortools { height: @editorToolsCollapsedMobileHeight; } .hideEditorFloats.transparentEditorTools #editortools > div > div > .ui.grid { margin: auto; } .hideEditorFloats.transparentEditorTools #editorToolbarArea { padding-top: 0; } .hideEditorFloats #blocksArea, .hideEditorFloats #monacoEditor, .hideEditorFloats #msg { bottom: @editorToolsCollapsedMobileHeight; } .hideEditorFloats #tutorialcard.bottom { bottom: @editorToolsCollapsedMobileHeight;