How do I put an icon (SVG) to the left of Category text?

171 views
Skip to first unread message

Max Stephen Russell

unread,
Nov 6, 2025, 7:05:41 PMNov 6
to Blockly
Recently I tried, and failed, to position an icon to the left of the text on each toolbox category. In response to Maribeth's offer to help (https://groups.google.com/g/blockly/c/05ULos6gdCE/m/_RsI42FVBgAJ), I am posting the related CSS file and the toolbox script (with some categories removed for brevity).

Thanks very much!

Steve Russell

/* toolbox_style.css - This file derived from custom-toolbox-codelab */

/* Makes our label white. */
.blocklyTreeLabel {
  color: #ffffff;
}
/* Adds padding around the group of categories and separators. */
.blocklyToolboxContents {
  padding: 0.5em;
}
/* Adds space between the categories, rounds the corners and adds space around the label. */
.blocklyTreeRow {
  padding: 3px;
  margin-bottom: 0.5em;
  border-radius: 4px;
}
/* Changes color of the icon to white. */
.customIcon {
  color: #fff;
}
/* Stacks the icon on top of the label.
.blocklyTreeRowContentContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
}*/
.blocklyTreeRow {
  height: initial;
}
.customLabel {
  font-family:Tahoma, Verdana, Geneva, sans-serif;
  margin-bottom: 0.5em;
  text-align: center;
}
.customLabel2 {
  font-family:Tahoma, Verdana, Geneva, sans-serif;
  margin-bottom: 0.5em;
  text-align: center;
}
.myLabelStyle {
  font-style: normal;
  font-weight: bold;
  fill: green;
}

.myLabelStyle.myLabelStyle >.blocklyFlyoutLabelText {
  font-style: regular;
  font-weight: bold;
  fill: rgb(35, 68, 35);
}

/*
.myLabelStyle>.blocklyFlyoutLabelText {
  font-style: italic;
  fill: green;
}*/

.css-regulation-label { /* for testing */
  background-color: #e0f7fa; /* Light cyan—pick any color you like */
  padding: 2px 4px; /* Optional: adds some space */
  font-size:xx-small; /* for testing */
  color: aqua; /* for testing */
}

.myVariableButtonStyle {
  color: rgb(165, 160, 160);
}

.myVariableButtonStyle.myVariableButtonStyle > .blocklyText {
  font-style: italic;
  font-size: 30px;
  color: rgb(165, 160, 160);
}

.myVariableButtonStyle:hover{
  fill: rgb(165, 160, 160);
}

.myBlueButtonStyle {
  fill: rgb(18, 156, 147);
}

.myBlueButtonStyle.myBlueButtonStyle > .blocklyText {
  font-style: italic;
  font-size: 30px;
  color: red;
}

.myBlueButtonStyle:hover{
  fill:rgb(27, 200, 200);
}

.myRedButtonStyle {
  fill: rgb(156, 18, 34);
}

.myRedButtonStyle.myRedButtonStyle > .blocklyText {
  font-style: italic;
  font-size: 30px;
  color: rgb(127, 31, 31);
}

.myRedButtonStyle:hover{
  fill:rgb(200, 27, 36);
}

.myGreenButtonStyle {
  fill: #4baa6d;
}

.myGreenButtonStyle.myGreenButtonStyle > .blocklyText {
  font-style: italic;
  font-size: 30px;
  color: #4baa6d;
}

.myGreenButtonStyle:hover {
  fill:#6ecc8f;
}

/*
Everything below was part of failed attempts to put SVGs to left of category text.

.toolbox-start {
  background-image: url('icons/start.svg');
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  filter: brightness(0) invert(1);
  width: 20px;
  height: 20px;
  display: block !important;
}
.toolbox-proposal {
  background-image: url('icons/proposal.svg');
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  filter: brightness(0) invert(1);
  width: 20px;
  height: 20px;
  display: block !important;
}
.toolbox-action {
  background-image: url('icons/action.svg');
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  filter: brightness(0) invert(1);
  width: 20px;
  height: 20px;
  display: block !important;
} */

    .blocklyTreeRowContentContainer {
      display: flex;
      flex-direction: row; /* Stacks icon on top of label */
      align-items: center; /* Centers icon and label horizontally */
    }

/*
.blocklyTreeRow {
  display: flex !important;
  align-items: center;
}

.blocklyTreeIcon {
  display: inline-block !important;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 8px;
}

.blocklyTreeLabel {
  display: inline !important;
  margin: 0 !important;
}*/

/*
.blocklyTreeLabel {
  display: inline !important;
  margin: 0 !important;
  line-height: 1;
}

.blocklyTreeIcon {
  display: inline-block !important;
  vertical-align: middle;
  margin-right: 8px;
  background-size: 16px 16px;
  width: 20px;
  height: 20px;
}*/

--------------
// toolbox.js

export const toolbox = {
  "kind": "categoryToolbox",
  "contents": [
    {
      "kind": "toolboxlabel",
      "name": "%{BKY_RTL_CATEGORY_BUILDING_BLOCKS}",
      "colour": "darkslategrey",
      "cssconfig": {
        "label": "customLabel"
      }
    },
    {
      "kind": "category",
      "name": "%{BKY_RTL_CATEGORY_START}",
      "colour": 25,
      "cssConfig": {
       "icon": "toolbox-start"
        },
      "contents": [
        {"kind": "block", "type": "start_placard"},
        {"kind": "block", "type": "country_rtl"},
        {"kind": "block", "type": "state_rtl"},
        {"kind": "block", "type": "other_org_rtl"},
      ]
    },
    {
      "kind": "category",
      "name": "%{BKY_RTL_CATEGORY_PROPOSAL}",
      "colour": 275,
      "cssConfig": {
       "icon": "toolbox-proposal"
        },
      "contents": [
        {"kind": "block", "type": "proposal_placard"},
        {"kind": "block", "type": "proposal_hdr"},
        {
          "kind": "block",
          "type": "proposal_line",
          "fields": {
            "PROPOSAL_TEXT": "Enter more proposal details here."
          }
        },
        {
          "kind": "label",
          "text": "%{BKY_RTL_TOOLBOX_LABEL_0}",
          "web-class": "myLabelStyle"
        },
        {
          "kind": "block",
          "type": "proposal_line",
          "fields": {
            "PROPOSAL_TEXT": ""
          }
        },
        {
          "kind": "label",
          "text": "%{BKY_RTL_TOOLBOX_LABEL_1}",
          "web-class": "myLabelStyle"
        },
        {"kind": "block", "type": "marker_separator"}
      ]
    },
    {
      "kind": "category",
      "name": "%{BKY_RTL_CATEGORY_ACTION}",
      "colour": 240,
      "cssConfig": {
       "icon": "toolbox-action"
        },
      "contents": [
        {
          "kind": "button",
          "text": "Return to Top",
          "web-class": "myVariableButtonStyle",
          "callbackKey": "returnToTopBtn"
        },
        {
          "kind": "button",
          "text": "%{BKY_RTL_BUTTON_CONNECT_VARIABLE}",
          "web-class": "myVariableButtonStyle",
          "callbackKey": "connectVariablesBtn"
        }
      ]
    }
  ]
};

Ronald Bourret (xWF)

unread,
Nov 10, 2025, 12:43:22 PMNov 10
to blo...@googlegroups.com
The icon is displayed to the left of the category name by default. The HTML structure is:

<div class="blocklyTreeRowContentContainer" >
  <span class="my-icon" style="display: inline-block;"></span>
  <span id="blockly-1.label" class="blocklyToolboxCategoryLabel">My category</span>
</div>

Here is a simple application that shows this:

const toolbox = {
"kind": "categoryToolbox",
"contents": [
{
"kind": "category",
"name": "My category",
"colour": 25,
"cssConfig": {
"icon": "my-icon"
},
"contents": [
{"kind": "block", "type": "math_number"},
]
},
]
};

const workspace = Blockly.inject("blocklyDiv", { toolbox: toolbox, })

background-size: 16px 16px;
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
}

You can play with this at:


Ronald Bourret
Technical Writer (Provided by Synergis)


--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/blockly/681992c1-a1c8-41ac-a953-ab2e2a9121abn%40googlegroups.com.

Max Stephen Russell

unread,
Nov 10, 2025, 4:47:47 PMNov 10
to Blockly
Ron,

Thank you for making all my icon troubles go away, in 30 seconds!

May I ask (after failing), if I wished to move an icon on a category one pixel to the right, how I would do that?

-Steve Russell

Ronald Bourret (xWF)

unread,
Nov 10, 2025, 5:57:27 PMNov 10
to blo...@googlegroups.com
Add the following CSS rule to the icon's style:

  translate: 1px 0px

Note that x increases to the right and y increases downward.

Ronald Bourret
Technical Writer (Provided by Synergis)

Max Stephen Russell

unread,
Nov 10, 2025, 6:13:05 PMNov 10
to Blockly
Wonderful! Thank you so much, Ron. I was hoping you too were still going to be around when Blockly moved.

-Steve

Max Stephen Russell

unread,
Nov 11, 2025, 9:50:03 PMNov 11
to Blockly
And how do I apply the category color to the icon (as is done for the text) when the category is selected?
We have tried a few things with .blocklyTreeSelected .
Thank you.

-Steve Russell




fu6...@gmail.com

unread,
Nov 12, 2025, 9:01:36 AMNov 12
to Blockly
Hi   Steve,

ToolboxIcon.png

Blockly.ToolboxCategory.prototype.createIconDom_ = function() {
    const iconImg = document.createElement('img');
      iconImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAABYktHRAMRDEzyAAABh2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSfvu78nIGlkPSdXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQnPz4NCjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iPjxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+PHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9InV1aWQ6ZmFmNWJkZDUtYmEzZC0xMWRhLWFkMzEtZDMzZDc1MTgyZjFiIiB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+PHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj48L3JkZjpEZXNjcmlwdGlvbj48L3JkZjpSREY+PC94OnhtcG1ldGE+DQo8P3hwYWNrZXQgZW5kPSd3Jz8+LJSYCwAACI9JREFUeF7t3WuMVGcdx/Hfc2aZWUBAboUZLrKwbKlLh9pwTwFptVQa24qWm61EgmmamLYk0nDRGtS0K5rQxmqTWn1hsODWWHvBaEpIIEgLqODhtggUC+0uBaFcll12Yc/jC+yFp0isnZ1zdp7v5x3//8OLvXzn7Fx2RwIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAElh3EGiPLq6SoG5S1aTJJuTMVlJ5e6xUjVvWL/ye4b0e+/jDYyJOpcFjYFMdPnJxDkho6OyqpMxL5dd6PLK6NEDmtxDSZDMAB5dM0aBavL1LTe7K5+M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EojAElaOutVGfMzd1xMYTazW83BD9w5kqt0ApCknqcXhtn0BndcDGEu846suUvLZza6OyRXaQVw330XlErNDrPpQ+6qPYXZdIuiaK6Wzjrg7pBspRWAJD0886hSqYlhNr3DXbWHMJdulDF3aulcXsPUASXqyaOCqqntIUW/y9e33OyuCiXMZRpkgy9qycy/ujt0DKUbgC79zp1q1nxD0o/zDa3d3PXHEeYyzylK36+lM064O3QcpR3Auy69XKJGRl/J17eWueuPIsymt0pmmZbMXufu0PH4EcC7vr96kMr0TRkzL1/f0s9d/zdhLt0kmbWSfVyL5yTiCTcUhl8BfFDNs9WSmSppnKT+suono16SOSur45KOS3anZNarS/ctenA6v7gPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQjv4Ni0vt5h2fv+sAAAAASUVORK5CYII=';
    iconImg.alt = '';
    iconImg.width = '25';
    iconImg.height = '25';
    return iconImg;
}

Blockly.Css.register([
 `
  .blocklyTreeRowContentContainer {
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  .blocklyTreeRow {
    height: initial;
  }
`
]);

const toolbox = {
  "kind": "categoryToolbox",
  "contents": [
    {
      "kind": "category",
      "name": "My category",
      "contents": [
        {"kind": "block", "type": "math_number"},
      ]
    },
  ]
};

const workspace = Blockly.inject("blocklyDiv", { toolbox: toolbox, })
Hope this helps.


Best wishes

fu6...

maxsr...@gmail.com 在 2025年11月12日 星期三上午10:50:03 [UTC+8] 的信中寫道:

Ronald Bourret (xWF)

unread,
Nov 12, 2025, 2:17:29 PMNov 12
to blo...@googlegroups.com
It looks like you're using a background image for your icon. As far as I can tell, you can't use CSS to change the color of a background image, even if it's an SVG image. (The toolbox codelab doesn't run into this problem because it uses a character for the icon, so the normal CSS properties apply.)

One workaround is to change the image itself to an image that uses the new color. For example:

.my-icon {
  background-image: url('icons/icon-red.svg');
}

.blocklyToolboxSelected .my-icon {
  background-image: url('icons/icon-green.svg');
}

Note that blocklyTreeSelected was changed to blocklyToolboxSelected in v12.

Ronald Bourret
Technical Writer (Provided by Synergis)

Max Stephen Russell

unread,
Nov 13, 2025, 2:50:46 PMNov 13
to Blockly
I wish I could say blocklyToolboxSelected works for me. Right now I have:

.blocklyToolboxSelected .toolbox-start {
  background-image: url('icons/start-selected.svg');
}

But no matter what approach I use inside blocklyToolboxSelected, I get no visible result. 

Thanks very much!

-Steve Russell

Message has been deleted

Mark Friedman

unread,
Nov 13, 2025, 7:22:47 PMNov 13
to blo...@googlegroups.com
Steve,

  Do other non-image-related style properties work when the category is selected?  What I mean is if you specified, say, "text-decoration: line-through;" instead of "background-image: url('icons/start-selected.svg');" in your code below, does that work?  The idea here is just to test that you've got the CSS stuff correctly wired up independent of the icon stuff.

  Related to that, are you sure about adding .toolbox-start to your CSS selector?  I'm not sure that that exists, at least not in V12.

-Mark


Max Stephen Russell

unread,
Nov 13, 2025, 8:38:57 PMNov 13
to Blockly
Hi Mark. No,  "text-decoration: line-through;" has no effect inside:

.blocklyToolboxSelected .toolbox-start {
  background-image: url('icons/start-selected.svg');
}

And no, I am not sure I am using the CSS selector properly. Now I do not think I am. I did try the following, though to no effect:

.blocklyTreeRow.blocklyToolboxSelected .toolbox-start {
  background-image: url('icons/start-selected.svg'); 
  text-decoration: line-through;
}

Thanks very much.

-Steve

Ronald Bourret (xWF)

unread,
Nov 14, 2025, 12:41:21 PMNov 14
to blo...@googlegroups.com
Several things:

1) Are you using v12 or an earlier version? Many of the toolbox classes were renamed in v12. If you're using v12, use blocklyToolboxCategory and blocklyToolboxSelected. If you're using an earlier version, use blocklyTreeRow and blocklyTreeSelected.

2) When you construct your toolbox, are you adding the toolbox-start class to the span that contains the icon? To understand how this is done, open your browser's inspector and look at the div containing the toolbox. When you expand everything, you'll see an HTML structure that looks roughly like this:

<div class="blocklyToolbox">
  <div class="blocklyToolboxCategoryGroup">
    <!-- First top-level category -->
    <div class="blocklyToolboxCategoryContainer">
      <div class="blocklyToolboxCategory">
        <div class="blocklyTreeRowContentContainer">
          <span class="blocklyToolboxCategoryIcon"></span>
          <span class="blocklyToolboxCategoryLabel">Logic</span>
        </div>
      </div>
    </div>
    <!-- Second top-level category -->
    <div class="blocklyToolboxCategoryContainer">...</div>
    <!-- etc. -->
  </div>
</div>


You can add CSS classes to each of the elements in this tree using the cssConfig property in the JSON definition of your toolbox. For example, to add the toolbox-start class to the blocklyToolboxCategoryIcon span, use the following:

{
  "kind": "category",
  "name": "My category",
  "cssConfig": {
     "icon": "toolbox-start"
  },
  "contents": [...]
},

The relationship between the cssConfig properties and the various parts of the toolbox is explained in the table in Category CSS. Note that because cssConfig is specified in the JSON for each category, you can add different classes to each part of each category -- the docs give an example of this.

So to specify a different icon when the category is opened, the v12 CSS would be:

.blocklyToolboxSelected .toolbox-start {
  background-image: url('icons/start-selected.svg');
}

and the <v12 CSS would be:

.blocklyTreeSelected .toolbox-start {
  background-image: url('icons/start-selected.svg');
}

Note that we use the space CSS combinator because blocklyToolboxSelected is added to the blocklyToolboxCategory div, which is an ancestor of the blocklyToolboxCategoryIcon span. (If you use your browser's inspector, you can watch blocklyToolboxSelected being added/removed as you open/close the category.)

For an example that changes the icon from copyright to copyleft when the category is selected, see https://jsfiddle.net/rpbourret/xs43hzc6/42/

Ronald Bourret
Technical Writer (Provided by Synergis)

Max Stephen Russell

unread,
Nov 17, 2025, 11:51:35 PMNov 17
to Blockly
Ron, Thank you for the perfectly clear response, including the fiddle. Somehow I missed moving to v12, which I will do after I solve this trouble. In the toolbox and CSS code I posted at the start of this thread, I demonstrated my use of cssConfig exactly as you demonstrate:

{
      "kind": "category",
      "name": "%{BKY_RTL_CATEGORY_START}",
      "colour": 25,
      "cssConfig": {
       "icon": "toolbox-start"
        },

      "contents": [
        {"kind": "block", "type": "start_placard"},
        {"kind": "block", "type": "country_rtl"},
        {"kind": "block", "type": "state_rtl"},
        {"kind": "block", "type": "other_org_rtl"},
      ]
    },

And I now have the following, but without any result:
.blocklyTreeSelected .toolbox-start {
  background-image: url('icons/start-selected.svg');
}

However -- Since beginning this post, I am thinking the problem may boil down to my webpack.config.js and CSS files. The only CSS file listed under Network is index.css, and it has a 404. So I'm trying to get to the bottom of it, and it's not my strong suit.

Thanks very much.

-Steve Russell

Message has been deleted

Max Stephen Russell

unread,
Nov 20, 2025, 3:47:05 PM (12 days ago) Nov 20
to Blockly
Before upgrading in the last few days from v11 to v12, we got the category icons working according to selected and not-selected CSS rules This included a listener that overrode, yet required, a blocklyTreeSelected rule.

Then with v12 there came a rigorous and valuable target-shooting adjustment, studying HTML elements in the browser Developer Tools. This HTML dimension was the critical emphasis in Ron's earlier post. Now, although some things can at first be confounding, Blockly's clean modernization is plain to see and a pleasure to take advantage of. It receives an A+ from me.

Finally, in the midst of the difficult transition to v12, I decided that icons do not serve a worthwhile purpose in categories that are already color-coded and labeled.

Thanks to all for your help.

Steve

Reply all
Reply to author
Forward
0 new messages