Suggestion: Classes for pre-defined section controls

It would be very helpful if the pre-defined section controls had some classes or ids to make them easily customizablse from CSS.
Right now it’s not easy to style e.g. the parent select:
image

Anyway, I’m quite pleased with the product and support so far. :slight_smile:

Hello Subri,
Thank you for the positive feedback.

It is true that the built-in controls have the same class names, but it should be possible to add styles via CSS:

Yes, you are right, but it’s not easy to style a specific element this way.
One way is to depend on their “index” in the DOM. Which is not a good way, as if we change the order of the inputs, the CSS will break.
Another way I’m using right now is to use their label. I find their label by its value, then from there I traverse to the desired element. It works but not elegant.

Thanks for your reply, I hope we’ll see this feature soon! :slight_smile:

Hello Subri,
Thank you for the clarification.
In that case, after opening the lightbox, you can manually add a class name to the specific section:

gantt.attachEvent("onLightbox", function (task_id){
  var priority_section = gantt.getLightboxSection('priority');
  if (priority_section) {
    var node = priority_section.node;
    node.classList.add("colorized_select")
  }
});

http://snippet.dhtmlx.com/5/60b75e1fb

1 Like

Thank you for the help, I didn’t know about that feature!