Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StyleSheets like React Native (for tooling interoperability) #352

Open
skotchpine opened this issue Jul 10, 2021 · 2 comments
Open

StyleSheets like React Native (for tooling interoperability) #352

skotchpine opened this issue Jul 10, 2021 · 2 comments

Comments

@skotchpine
Copy link

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?

@Solant
Copy link

Solant commented Jul 10, 2021

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

@skotchpine
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants