react-nodegui
react-nodegui copied to clipboard
StyleSheets like React Native (for tooling interoperability)
Having the same (or similar) APIs to react native means we can share tooling. In my case, I'd like to use react-native-tailwindcss, but can't
I'd like to be able to use javascript objects to style components, like react native does (though the features shouldn't be 100% same, probably.
Is it reasonable? How would we implement this?
Hi
I did something similar to RN stylesheets here: https://github.com/Solant/nodegui-stylesheet You can create a main stylesheet with all reused utility classes
However, there are some differences between regular CSS, RN styles, and Qt CSS, so they won't be 100% compatible
edit:
Also there are some new pseudo-elements presented from Qt: https://doc.qt.io/archives/qt-4.8/stylesheet-syntax.html (like QComboBox::down-arrow
) so sometimes you just have to get back to plain/inline CSS stylesheets
That's pretty close to what I was looking for.
I'll see how I can get around the unit function and avoid actually calling create.