Survey: How do you style Blockly?

1,243 views
Skip to first unread message

Rachel Fenichel

unread,
Nov 7, 2016, 4:06:38 PM11/7/16
to Blockly
Hey Blockly developers,

How do you usually go about styling Blockly?  Specifically, how do you change things like font and text size?

Cheers,
Rachel

Chris Johnson

unread,
Nov 7, 2016, 7:03:26 PM11/7/16
to Blockly
I use this CSS:

.blocklyText, .blocklyHtmlInput, .blocklyTreeLabel {
  font-family: 'Kanit', sans-serif !important;
}

.blocklyTreeLabel {
  font-size: 24px !important;
}

.blocklyTreeRow {
  height: 28px !important;
  margin-top: 5px !important;
}

The !importants are required because the Blockly specificity trumps mine. If there's a better way, I'd welcome knowing.

- Chris

Lyssa Neel

unread,
Nov 8, 2016, 4:42:08 PM11/8/16
to Blockly
I edit the css.js file
There's a lot more I would like to do, like adding images to the menu items, but I can't figure out how to do it. 

Neil Fraser

unread,
Nov 8, 2016, 4:56:40 PM11/8/16
to blo...@googlegroups.com
On 8 November 2016 at 13:42, Lyssa Neel <lys...@gmail.com> wrote:
There's a lot more I would like to do, like adding images to the menu items, but I can't figure out how to do it. 

This is unrelated to CSS, but is this what you are looking to do?  If so, it's coming really soon.

Inline images 1

--

Amin Marashi

unread,
Nov 8, 2016, 6:41:07 PM11/8/16
to Blockly
We also do it the same way.

Lyssa Neel

unread,
Nov 9, 2016, 3:21:42 PM11/9/16
to Blockly
That's cool, Neil, and we'll be using that when it's available!
But what I meant was that I would like to add images to the toolbox items. I'm going to try using custom icon font, do you think that would work?

Lyssa Neel

unread,
Nov 9, 2016, 3:21:43 PM11/9/16
to Blockly

Rachel Fenichel

unread,
Nov 9, 2016, 3:52:23 PM11/9/16
to Blockly
Ah, do you mean replacing the names of categories with icons in the toolbox?

On Wed, Nov 9, 2016 at 12:21 PM Lyssa Neel <lys...@gmail.com> wrote:
That's cool, Neil, and we'll be using that when it's available!
But what I meant was that I would like to add images to the toolbox items. I'm going to try using custom icon font, do you think that would work?

--
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.
For more options, visit https://groups.google.com/d/optout.

Lyssa Koton Neel

unread,
Nov 9, 2016, 3:54:33 PM11/9/16
to blo...@googlegroups.com
Ideally, an icon and the word, side by side. For kids who are/aren't readers. 


On Wednesday, November 9, 2016, 'Rachel Fenichel' via Blockly <blo...@googlegroups.com> wrote:
Ah, do you mean replacing the names of categories with icons in the toolbox?

On Wed, Nov 9, 2016 at 12:21 PM Lyssa Neel <lys...@gmail.com> wrote:
That's cool, Neil, and we'll be using that when it's available!
But what I meant was that I would like to add images to the toolbox items. I'm going to try using custom icon font, do you think that would work?

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Blockly" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blockly/hwKvS197laU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blockly+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

-- Phyllis Koton Neel, Ph.D.

Rachel Fenichel

unread,
Nov 9, 2016, 4:07:05 PM11/9/16
to Blockly
I see.  Custom icon font will probably work.  If you want to use actual images, here's a pull request from adding icons over on scratch-blocks--it might be helpful as a starting point.

Lyssa Koton Neel

unread,
Nov 9, 2016, 4:08:04 PM11/9/16
to blo...@googlegroups.com
Thanks, I'll check it out!


On Wednesday, November 9, 2016, 'Rachel Fenichel' via Blockly <blo...@googlegroups.com> wrote:
I see.  Custom icon font will probably work.  If you want to use actual images, here's a pull request from adding icons over on scratch-blocks--it might be helpful as a starting point.

--
You received this message because you are subscribed to a topic in the Google Groups "Blockly" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blockly/hwKvS197laU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rachel Fenichel

unread,
Nov 9, 2016, 4:15:44 PM11/9/16
to Blockly
This should fix needing !important.

Cheers,
Rachel
Reply all
Reply to author
Forward
0 new messages