From 1ff058460fa0c5b5a934309c1f90101c5ea1712d Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Thu, 10 Aug 2017 17:10:08 -0700 Subject: [PATCH] Split out blockly into blockly.less --- theme/blockly.less | 59 ++++++++++++++++++++++++++++++++++++++++++++++ theme/style.less | 50 --------------------------------------- 2 files changed, 59 insertions(+), 50 deletions(-) create mode 100644 theme/blockly.less diff --git a/theme/blockly.less b/theme/blockly.less new file mode 100644 index 00000000..1497061a --- /dev/null +++ b/theme/blockly.less @@ -0,0 +1,59 @@ +@import 'themes/default/globals/site.variables'; +@import 'themes/pxt/globals/site.variables'; +@import 'site/globals/site.variables'; + +@import 'blockly-core'; + +/* Toolbox padding */ +.blocklyToolboxDiv, .monacoToolboxDiv { + padding: 0.5rem; + -webkit-box-shadow: inset 0px 0px 0px 2px rgba(255,255,255,0.31); + -moz-box-shadow: inset 0px 0px 0px 2px rgba(255,255,255,0.31); + box-shadow: inset 0px 0px 0px 2px rgba(255,255,255,0.31); + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; +} + +div.blocklyTreeRow { + border-radius: 0px; + -webkit-box-shadow: inset 0px 0px 0px 3px rgba(0,0,0,0.1); + -moz-box-shadow: inset 0px 0px 0px 3px rgba(0,0,0,0.1); + box-shadow: inset 0px 0px 0px 3px rgba(0,0,0,0.1); +} + +/* Remove shadow around blockly blocks */ +.blocklyPathDark, .blocklyPathLight { + display: none; +} + +/* Blockly Text */ +span.blocklyTreeLabel { + font-family: @pageFont !important; + text-transform: uppercase !important; + font-size:1rem !important; + font-weight: bold; +} + +.blocklyFlyoutBackground { + fill: #282828 !important; +} +.monacoFlyout { + background: rgba(40, 40, 40, 0.9); +} + +/* Search box */ +#blocklySearchArea { + margin: 0.5rem; + margin-left: 1rem; + margin-right: 1rem; +} +.blocklySearchInputField { + border-radius: 1rem !important; +} + +/* Mobile */ +@media only screen and (max-width: @largestMobileScreen) { + #blocklyTrashIcon { + margin: 0.2rem; + } +} \ No newline at end of file diff --git a/theme/style.less b/theme/style.less index 6b40d1d5..2d2e4954 100644 --- a/theme/style.less +++ b/theme/style.less @@ -56,43 +56,6 @@ min-width: 2.0rem; } -/* Toolbox padding */ -.blocklyToolboxDiv, .monacoToolboxDiv { - padding: 0.5rem; - -webkit-box-shadow: inset 0px 0px 0px 2px rgba(255,255,255,0.31); - -moz-box-shadow: inset 0px 0px 0px 2px rgba(255,255,255,0.31); - box-shadow: inset 0px 0px 0px 2px rgba(255,255,255,0.31); - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; -} - -div.blocklyTreeRow { - border-radius: 0px; - -webkit-box-shadow: inset 0px 0px 0px 3px rgba(0,0,0,0.1); - -moz-box-shadow: inset 0px 0px 0px 3px rgba(0,0,0,0.1); - box-shadow: inset 0px 0px 0px 3px rgba(0,0,0,0.1); -} - -/* Remove shadow around blockly blocks */ -.blocklyPathDark, .blocklyPathLight { - display: none; -} - -/* Blockly Text */ -span.blocklyTreeLabel { - font-family: @pageFont !important; - text-transform: uppercase !important; - font-size:1rem !important; - font-weight: bold; -} - -.blocklyFlyoutBackground { - fill: #282828 !important; -} -.monacoFlyout { - background: rgba(40, 40, 40, 0.9); -} - /* Editor menu toggle */ #menubar .ui.menu.fixed .item.editor-menuitem .ui.grid { background: @blue !important; @@ -102,16 +65,6 @@ span.blocklyTreeLabel { color: white; } -/* Search box */ -#blocklySearchArea { - margin: 0.5rem; - margin-left: 1rem; - margin-right: 1rem; -} -.blocklySearchInputField { - border-radius: 1rem !important; -} - .sandboxfooter a:not(.thin) { color:white !important; } @@ -121,9 +74,6 @@ span.blocklyTreeLabel { #filelist { background: transparent; } - #blocklyTrashIcon { - margin: 0.2rem; - } } /* Tablet */