Files
blockly/demos/blocklyfactory/factory.css
Tina Quach b0432306a1 Blockly Factory: New Selector UI (#579)
* generate block selector with checkboxes

working click handler

updated block exporter view and controller to work with new UI

select a block by clicking on the option--not just checkbox

renamed selectorWorkspace and fixed checkbox selecting bug

adding used blocks works

added and cleaned up css, removed extra exporter controller function, nit  comment

simplified code

* style

* does not clear selected blocks upon tab switch

* added tooltips to buttons, reworded some buttons

* remove console.log statement and clarify this.selected in blockoption

* removed console log & nit comment
2016-08-23 13:39:01 -07:00

519 lines
7.5 KiB
CSS

/**
* @license
* Visual Blocks Editor
*
* Copyright 2016 Google Inc.
* https://developers.google.com/blockly/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
html, body {
height: 100%;
min-height: 375px;
}
body {
background-color: #fff;
font-family: sans-serif;
margin: 0 5px;
overflow: hidden
}
h1 {
font-weight: normal;
font-size: 140%;
}
h3 {
margin-top: 5px;
margin-bottom: 0;
}
table {
border: none;
border-collapse: collapse;
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
td {
vertical-align: top;
padding: 0;
}
p {
display: block;
-webkit-margin-before: 0em;
-webkit-margin-after: 0em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
padding: 5px 0px;
}
#blockly {
position: fixed;
}
#blocklyMask {
background-color: #000;
cursor: not-allowed;
display: none;
position: fixed;
opacity: 0.2;
z-index: 9;
}
#preview {
position: absolute;
}
pre,
#languageTA {
border: #ddd 1px solid;
margin-top: 0;
position: absolute;
overflow: scroll;
}
#languageTA {
display: none;
font: 10pt monospace;
}
.downloadButton {
padding: 5px;
}
button:disabled, .buttonStyle:disabled {
opacity: 0.6;
}
button>*, .buttonStyle>* {
opacity: 1;
vertical-align: text-bottom;
}
button, .buttonStyle {
border-radius: 4px;
border: 1px solid #ddd;
background-color: #eee;
color: #000;
padding: 10px;
margin: 10px 5px;
font-size: small;
}
.buttonStyle:hover:not(:disabled), button:hover:not(:disabled) {
box-shadow: 2px 2px 5px #888;
}
.buttonStyle:hover:not(:disabled)>*, button:hover:not(:disabled)>* {
opacity: 1;
}
#linkButton {
display: none;
}
#helpButton {
float: right;
}
#blockFactoryContent {
height: 87%;
width: 100%;
}
#blockFactoryPreview {
height: 100%;
width: 100%;
}
#blockLibraryContainer {
vertical-align: bottom;
}
#blockLibraryControls {
text-align: right;
vertical-align: middle;
}
#previewContainer {
vertical-align: bottom;
}
#buttonContainer {
text-align: right;
vertical-align: middle;
}
#files {
position: absolute;
visibility: hidden;
}
.toolbox {
display: none;
}
#blocklyWorkspaceContainer {
height: 95%;
padding: 2px;
width: 50%;
}
#workspaceFactoryContent {
clear: both;
display: none;
height: 100%;
}
/* Exporter */
#blockLibraryExporter {
clear: both;
display: none;
height: 100%;
}
#exportSelector {
display: inline-block;
float: left;
height: 70%;
width: 30%;
}
#exportSettings {
float: left;
overflow: hidden;
padding-left: 16px;
width: 20%;
}
#selectedBlocksTextContainer {
max-height: 200px;
overflow-y: scroll;
padding-bottom: 2em;
}
::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: #ccc;
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}
.subsettings {
margin: 0px 25px;
}
#exporterHiddenWorkspace {
display: none;
}
#exportPreview {
float: right;
height: 90%;
overflow: hidden;
width: 45%;
}
.exportPreviewTextArea {
display: block;
float: right;
height: 40%;
width: 100%;
}
#genStubs_textArea, #blockDefs_textArea {
display: block;
height: 80%;
margin-right: 20px;
max-height: 300px;
overflow: scroll;
position: static;
}
#blockDefs_label, #genStubs_label {
display: block;
}
#blockSelector {
background-color: #eee;
border: 1px solid lightgrey;
width: 80%;
height: 90%;
overflow-y: scroll;
position: relative;
}
/* Exporter Block Option */
.blockOption {
background-color: #eee;
padding: 15px 20px;
width: 95%;
}
.blockOption_check_label {
position: relative;
}
.blockOption_check {
float: left;
padding: 4px;
}
.blockOption_label {
float: left;
max-width: inherit;
overflow-y: scroll;
word-wrap: break-word;
}
.blockOption_preview {
height: 100px;
padding-top: 10px;
width: 90%;
}
/* Tabs */
.tab {
float: left;
padding: 5px 19px;
}
.tab:hover:not(.tabon){
background-color: #e8e8e8;
}
.tab.tabon {
background-color: #ccc;
}
.tab.taboff {
cursor: pointer;
}
#tabContainer {
background-color: #f8f8f8;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
display: table;
width: 100%;
}
/* Workspace Factory */
section {
float: left;
}
aside {
float: right;
}
#categoryTable>table {
border: 1px solid #ccc;
border-bottom: none;
width: auto;
}
td.tabon {
background-color: #ccc;
border-bottom-color: #ccc;
padding: 5px 19px;
}
td.taboff {
cursor: pointer;
padding: 5px 19px;
}
td.taboff:hover {
background-color: #eee;
}
.large {
font-size: large;
}
td {
padding: 0;
vertical-align: top;
}
.inputfile {
height: 0;
opacity: 0;
overflow: hidden;
position: absolute;
width: 0;
z-index: -1;
}
#workspaceTabs {
background-color: #f8f8f8;
border: 1px solid #ccc;
display: table;
}
#toolbox_section {
height: 405px;
width: 60%;
position: relative;
}
#toolbox_blocks {
height: 100%;
width: 100%;
}
#preview_blocks {
height: 395px;
width: 100%;
}
#createDiv {
padding: 0.5%;
width: 60%;
}
#previewDiv {
border: 10px solid #eee;
margin-right: 0.5%;
width: 35%;
}
#previewBorder {
border: 5px solid #ddd;
padding: 2%;
}
#toolbox_div, #preload_div {
margin-right: 5%;
width: 35%;
}
#workspace_options {
max-height: 250px;
overflow-y: scroll;
}
#disable_div {
background-color: white;
height: 100%;
left: 0;
opacity: .5;
position: absolute;
top: 0;
width: 100%;
z-index: -1; /* Start behind workspace */
}
/* Rules for Closure popup color picker */
.goog-palette {
outline: none;
cursor: default;
}
.goog-palette-cell {
height: 13px;
width: 15px;
margin: 0;
border: 0;
text-align: center;
vertical-align: middle;
border-right: 1px solid #000000;
font-size: 1px;
}
.goog-palette-colorswatch {
border: 1px solid #000000;
height: 13px;
position: relative;
width: 15px;
}
.goog-palette-cell-hover .goog-palette-colorswatch {
border: 1px solid #FFF;
}
.goog-palette-cell-selected .goog-palette-colorswatch {
border: 1px solid #000;
color: #fff;
}
.goog-palette-table {
border: 1px solid #000;
border-collapse: collapse;
}
.goog-popupcolorpicker {
position: absolute;
}
/* The container <div> - needed to position the dropdown content */
.dropdown {
position: relative;
display: inline-block;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
background-color: #f9f9f9;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,.2);
display: none;
min-width: 170px;
opacity: 1;
position: absolute;
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a, .dropdown-content label {
color: black;
display: block;
font-size: small;
padding: 12px 16px;
text-decoration: none;
}
/* Change color of dropdown links on hover. */
.dropdown-content a:hover, .dropdown-content label:hover {
background-color: #f1f1f1
}
/* Show the dropdown menu */
.show {
display: block;
}
.shadowBlock>.blocklyPath {
fill-opacity: .5;
stroke-opacity: .5;
}
.shadowBlock>.blocklyPathLight,
.shadowBlock>.blocklyPathDark {
display: none;
}