react-treebeard icon indicating copy to clipboard operation
react-treebeard copied to clipboard

Why use inline styles instead css classes?

Open witalobenicio opened this issue 8 years ago • 4 comments

It would be a lot easier to customize if it was using css classes instead of inline styles. This is a requirement or something? Or just it was not made with classes...because not?

witalobenicio avatar Dec 29 '16 12:12 witalobenicio

+1

cdtinney avatar Feb 24 '17 16:02 cdtinney

+💯

otherwise we're stuck doing this:

    style.tree.base.backgroundColor = '';
    style.tree.base.color =  '';
    style.tree.node.activeLink.background = '';
    style.tree.node.loading.color = '';
    style.tree.node.header.base.color = '';

benmathes avatar Apr 10 '17 21:04 benmathes

Guys, I've end up implementing my own component using jstree lib. Soon I will let it available on npm.

witalobenicio avatar Sep 23 '17 16:09 witalobenicio

otherwise we're stuck doing this:

    style.tree.base.backgroundColor = '';
    style.tree.base.color =  '';
    style.tree.node.activeLink.background = '';
    style.tree.node.loading.color = '';
    style.tree.node.header.base.color = '';

Considering that my entire system uses scss, I would take this over inline styles. I am struggling like crazy with the tree itself, which insists on remaining dark no matter what I do. And since it refuses to respond to scss, I have to go code diving now to figure out how to make the example display in white background and dark text.

I guess most people don't mind the opinionated nature of this component since it has gargantuan downloads for a component with fairly limited activity of late. But it's painful to have one "special" component with its own styles implementation.

kletkeman avatar Jan 30 '19 00:01 kletkeman