How to use tailwindcss with cytoscape.js?

Is there a way to use tailwindcss classes to style a graph node inside a cytoscapejs canvas?

My cytoscape graph is initialized with one node whose data object is set to id: a. The relevant part of the code:

cy.filter(function (element, i) {
    if (element.isNode() && element.data("id") === "a") {
        element.style("background-color", "red");
        // element.addClass("bg-red-900");
        return true;
    } else {
        return false;
    }
});

The commented line is what I tried to do to make tailwindcss work. Although the class bg-red-900 is added to element.classes(), it still doesn’t take effect.