question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Support css classnames for <category> blocks

See original GitHub issue

Problem statement

Currently it is not possible to set individual css classnames for the different <category> blocks which limits the current styling options.

Expected Behavior

It should be possible to pass the css class names like:

<category name="..." colour="120" class="some_css_class some_other_css_class">
  ...
</category>

Which should be translated to:

<div class="blocklyTreeRowItem some_css_class some_other_css_class" id=":w" role="treeitem" aria-selected="false" aria-level="1" aria-labelledby=":w.label">
 ...
</div>

Additional Information

I currently solving this by using an loop and adding css classnames dynamically over javascript.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
alschmiedtcommented, Oct 5, 2020

You can now add a css class to a specific category.

1reaction
MarkusBordihncommented, May 5, 2020

At https://github.com/google/coding-with-chrome/blob/master/src/ui/blockly/blockly_toolbox.js#L79 you can see how this implementation is done on my side. Please keep in mind that I’m not using the latest version yet, so it could be you need to adjust this example to get it work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ability to set css class from gutenberg block editor - Feature ...
I realize that it is possible to add a classname to a form from the form's settings page, but adding the functionality to...
Read more >
Adding/Editing class names to Design Specs
Adding/Editing class names to Design Specs. Ability to add/edit the class name to elements for developers. Possible Solution
Read more >
Feature Request - Custom CSS Classes - dominKnow Community
I've been working on a project lately where to get the exact design I want, I needed to add a decent amount of...
Read more >
Class selectors - CSS: Cascading Style Sheets | MDN
The CSS class selector matches elements based on the contents of their class attribute.
Read more >
Feature request: custom css classes template variable for post in ...
Forum rules. Please do not post support questions regarding installing, updating, or upgrading phpBB or modifying styles of released phpBB versions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found