verbum icon indicating copy to clipboard operation
verbum copied to clipboard

global CSS names missing namespaces

Open solomon23 opened this issue 1 year ago • 4 comments

The css in this project isn't namespaced which means it's pretty much unusable to insert anywhere https://github.com/ozanyurtsever/verbum/blob/fccf4b1af0421e69f0bf05816f994e395cd990fc/src/EditorComposer.css#L308

One good example is dropdown which is a pretty generic style name to globally overwrite

solomon23 avatar Mar 23 '23 19:03 solomon23

Hello @solomon23, can you review this PR #50 ?

Did I understand you correctly? Every .css file should have his own namespace, and components that used it should be wrapped into <svg> tag which define namespace?

DiggesT avatar May 25 '23 10:05 DiggesT

@DiggesT I don't think that's what was meant. Many of the CSS classnames used in this library can end up conflicting with existing styles.

A common solution to this would be to prefix the classnames (for example with verbum-) - so instead of dropdown it would be verbum-dropdown.

This would allow us to easily override the styles of Verbum components without side effects.

squishyu avatar Nov 06 '23 10:11 squishyu

Ya what @squishyu said

solomon23 avatar Nov 25 '23 22:11 solomon23

In case anyone wants to push this forward, I have forked this repo with some personalized changes - the first one being adding className prefixes: https://github.com/squishyu/verbum/commit/c578c7467b974a2da805db7cacb3fe4e97ce7777

It would need some cleaning up and frankly, I don't have enough free time for that.

squishyu avatar Nov 25 '23 23:11 squishyu