Commit 816aa869 authored by Neil Fraser's avatar Neil Fraser

Replace <hr> with <sep></sep> (issue 50). Alphabetize CSS.

parent 1c39a638
This diff is collapsed.
...@@ -136,41 +136,41 @@ Blockly.Css.CONTENT = [ ...@@ -136,41 +136,41 @@ Blockly.Css.CONTENT = [
'}', '}',
'.blocklyWidgetDiv {', '.blocklyWidgetDiv {',
' position: absolute;',
' display: none;', ' display: none;',
' position: absolute;',
' z-index: 999;', ' z-index: 999;',
'}', '}',
'.blocklyResizeSE {', '.blocklyResizeSE {',
' fill: #aaa;',
' cursor: se-resize;', ' cursor: se-resize;',
' fill: #aaa;',
'}', '}',
'.blocklyResizeSW {', '.blocklyResizeSW {',
' fill: #aaa;',
' cursor: sw-resize;', ' cursor: sw-resize;',
' fill: #aaa;',
'}', '}',
'.blocklyResizeLine {', '.blocklyResizeLine {',
' stroke-width: 1;',
' stroke: #888;', ' stroke: #888;',
' stroke-width: 1;',
'}', '}',
'.blocklyHighlightedConnectionPath {', '.blocklyHighlightedConnectionPath {',
' stroke-width: 4px;',
' stroke: #fc3;',
' fill: none;', ' fill: none;',
' stroke: #fc3;',
' stroke-width: 4px;',
'}', '}',
'.blocklyPathLight {', '.blocklyPathLight {',
' fill: none;', ' fill: none;',
' stroke-width: 2;',
' stroke-linecap: round;', ' stroke-linecap: round;',
' stroke-width: 2;',
'}', '}',
'.blocklySelected>.blocklyPath {', '.blocklySelected>.blocklyPath {',
' stroke-width: 3px;',
' stroke: #fc3;', ' stroke: #fc3;',
' stroke-width: 3px;',
'}', '}',
'.blocklySelected>.blocklyPathLight {', '.blocklySelected>.blocklyPathLight {',
...@@ -199,9 +199,9 @@ Blockly.Css.CONTENT = [ ...@@ -199,9 +199,9 @@ Blockly.Css.CONTENT = [
'.blocklyText {', '.blocklyText {',
' cursor: default;', ' cursor: default;',
' fill: #fff;',
' font-family: sans-serif;', ' font-family: sans-serif;',
' font-size: 11pt;', ' font-size: 11pt;',
' fill: #fff;',
'}', '}',
'.blocklyNonEditableText>text {', '.blocklyNonEditableText>text {',
...@@ -220,8 +220,8 @@ Blockly.Css.CONTENT = [ ...@@ -220,8 +220,8 @@ Blockly.Css.CONTENT = [
'}', '}',
'.blocklyEditableText:hover>rect {', '.blocklyEditableText:hover>rect {',
' stroke-width: 2;',
' stroke: #fff;', ' stroke: #fff;',
' stroke-width: 2;',
'}', '}',
'.blocklyBubbleText {', '.blocklyBubbleText {',
...@@ -233,9 +233,9 @@ Blockly.Css.CONTENT = [ ...@@ -233,9 +233,9 @@ Blockly.Css.CONTENT = [
drag a block and selected text moves instead. drag a block and selected text moves instead.
*/ */
'.blocklySvg text {', '.blocklySvg text {',
' user-select: none;',
' -moz-user-select: none;', ' -moz-user-select: none;',
' -webkit-user-select: none;', ' -webkit-user-select: none;',
' user-select: none;',
' cursor: inherit;', ' cursor: inherit;',
'}', '}',
...@@ -249,8 +249,8 @@ Blockly.Css.CONTENT = [ ...@@ -249,8 +249,8 @@ Blockly.Css.CONTENT = [
'.blocklyTooltipBackground {', '.blocklyTooltipBackground {',
' fill: #ffffc7;', ' fill: #ffffc7;',
' stroke-width: 1px;',
' stroke: #d8d8d8;', ' stroke: #d8d8d8;',
' stroke-width: 1px;',
'}', '}',
'.blocklyTooltipShadow,', '.blocklyTooltipShadow,',
...@@ -260,16 +260,16 @@ Blockly.Css.CONTENT = [ ...@@ -260,16 +260,16 @@ Blockly.Css.CONTENT = [
'}', '}',
'.blocklyTooltipText {', '.blocklyTooltipText {',
' fill: #000;',
' font-family: sans-serif;', ' font-family: sans-serif;',
' font-size: 9pt;', ' font-size: 9pt;',
' fill: #000;',
'}', '}',
'.blocklyIconShield {', '.blocklyIconShield {',
' cursor: default;', ' cursor: default;',
' fill: #00c;', ' fill: #00c;',
' stroke-width: 1px;',
' stroke: #ccc;', ' stroke: #ccc;',
' stroke-width: 1px;',
'}', '}',
'.blocklyIconGroup:hover>.blocklyIconShield {', '.blocklyIconGroup:hover>.blocklyIconShield {',
...@@ -283,10 +283,10 @@ Blockly.Css.CONTENT = [ ...@@ -283,10 +283,10 @@ Blockly.Css.CONTENT = [
'.blocklyIconMark {', '.blocklyIconMark {',
' cursor: default !important;', ' cursor: default !important;',
' fill: #ccc;',
' font-family: sans-serif;', ' font-family: sans-serif;',
' font-size: 9pt;', ' font-size: 9pt;',
' font-weight: bold;', ' font-weight: bold;',
' fill: #ccc;',
' text-anchor: middle;', ' text-anchor: middle;',
'}', '}',
...@@ -299,25 +299,25 @@ Blockly.Css.CONTENT = [ ...@@ -299,25 +299,25 @@ Blockly.Css.CONTENT = [
'}', '}',
'.blocklyCommentTextarea {', '.blocklyCommentTextarea {',
' background-color: #ffc;',
' border: 0;',
' margin: 0;', ' margin: 0;',
' padding: 2px;', ' padding: 2px;',
' border: 0;',
' resize: none;', ' resize: none;',
' background-color: #ffc;',
'}', '}',
'.blocklyHtmlInput {', '.blocklyHtmlInput {',
' border: none;',
' font-family: sans-serif;', ' font-family: sans-serif;',
' font-size: 11pt;', ' font-size: 11pt;',
' border: none;',
' outline: none;', ' outline: none;',
' width: 100%', ' width: 100%',
'}', '}',
'.blocklyMutatorBackground {', '.blocklyMutatorBackground {',
' fill: #fff;', ' fill: #fff;',
' stroke-width: 1;',
' stroke: #ddd;', ' stroke: #ddd;',
' stroke-width: 1;',
'}', '}',
'.blocklyFlyoutBackground {', '.blocklyFlyoutBackground {',
...@@ -331,8 +331,8 @@ Blockly.Css.CONTENT = [ ...@@ -331,8 +331,8 @@ Blockly.Css.CONTENT = [
'.blocklyScrollbarBackground {', '.blocklyScrollbarBackground {',
' fill: #fff;', ' fill: #fff;',
' stroke-width: 1;',
' stroke: #e4e4e4;', ' stroke: #e4e4e4;',
' stroke-width: 1;',
'}', '}',
'.blocklyScrollbarKnob {', '.blocklyScrollbarKnob {',
...@@ -419,16 +419,16 @@ Blockly.Css.CONTENT = [ ...@@ -419,16 +419,16 @@ Blockly.Css.CONTENT = [
'}', '}',
'.blocklyTreeSeparator {', '.blocklyTreeSeparator {',
' height: 0px;',
' border-bottom: solid #e5e5e5 1px;', ' border-bottom: solid #e5e5e5 1px;',
' height: 0px;',
' margin: 5px 0;', ' margin: 5px 0;',
'}', '}',
'.blocklyTreeIcon {', '.blocklyTreeIcon {',
' background-image: url(<<<PATH>>>/sprites.png);',
' height: 16px;', ' height: 16px;',
' width: 16px;',
' vertical-align: middle;', ' vertical-align: middle;',
' background-image: url(<<<PATH>>>/sprites.png);', ' width: 16px;',
'}', '}',
'.blocklyTreeIconClosedLtr {', '.blocklyTreeIconClosedLtr {',
......
...@@ -177,6 +177,11 @@ Blockly.Toolbox.prototype.populate_ = function() { ...@@ -177,6 +177,11 @@ Blockly.Toolbox.prototype.populate_ = function() {
syncTrees(childIn, childOut); syncTrees(childIn, childOut);
} }
} else if (name == 'HR') { } else if (name == 'HR') {
// <hr> tag is deprecated, use <sep></sep> instead.
// https://github.com/google/blockly/issues/50
console.warn('The <hr> separator tag in the toolbox XML needs to be ' +
'changed to <sep></sep> (due to a bug in IE).');
} else if (name == 'SEP') {
treeOut.add(new Blockly.Toolbox.TreeSeparator()); treeOut.add(new Blockly.Toolbox.TreeSeparator());
} else if (name == 'BLOCK') { } else if (name == 'BLOCK') {
treeOut.blocks.push(childIn); treeOut.blocks.push(childIn);
......
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
</value> </value>
</block> </block>
</category> </category>
<hr> <sep></sep>
<category id="catVariables" custom="VARIABLE"></category> <category id="catVariables" custom="VARIABLE"></category>
<category id="catFunctions" custom="PROCEDURE"></category> <category id="catFunctions" custom="PROCEDURE"></category>
</xml> </xml>
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
</category> </category>
<category name="Variables" custom="VARIABLE"></category> <category name="Variables" custom="VARIABLE"></category>
<category name="Functions" custom="PROCEDURE"></category> <category name="Functions" custom="PROCEDURE"></category>
<hr> <sep></sep>
<category name="Library"> <category name="Library">
<category name="Randomize"> <category name="Randomize">
<block type="procedures_defnoreturn"> <block type="procedures_defnoreturn">
......
...@@ -378,7 +378,7 @@ h1 { ...@@ -378,7 +378,7 @@ h1 {
</value> </value>
</block> </block>
</category> </category>
<hr> <sep></sep>
<category name="Variables" custom="VARIABLE"></category> <category name="Variables" custom="VARIABLE"></category>
<category name="Functions" custom="PROCEDURE"></category> <category name="Functions" custom="PROCEDURE"></category>
</xml> </xml>
......
...@@ -403,7 +403,7 @@ h1 { ...@@ -403,7 +403,7 @@ h1 {
</value> </value>
</block> </block>
</category> </category>
<hr> <sep></sep>
<category name="Variables" custom="VARIABLE"></category> <category name="Variables" custom="VARIABLE"></category>
<category name="Functions" custom="PROCEDURE"></category> <category name="Functions" custom="PROCEDURE"></category>
</xml> </xml>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment