-
Notifications
You must be signed in to change notification settings - Fork 20
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
Improve documentation and evaluate features for v0.12 #70
Comments
The context-aware way of mounting global styles is
However, although there are some users that were in favour of this API (in certain cases, myself included), the Unfortunately, IMHO, I think The main reason that stylist still promotes both I think these 2 APIs are both useful and have different use cases. The |
One reason I see for this is that material-ui mixes the styling and styling props on components. Since there's no clear way to doing prop inheritance and prop mixins in yew, yet, I think the focus should be on the smallest possible building block that allows to build prop-based styling solutions from it.
Another thing about the Anyway, back to the topic at hand: there should be one blessed guide on how to use the library for simple hacked-together apps (per framework focus, only yew for now?) and one guide on the internals for anybody wanting to write a styling solution on top. The current README gives 3 very similar approaches, where at most one of them is probably relevant to the average user. Reading the docs is quite the cognitive overload, since there's so many seemingly similar macros and functions doing almost the same thing. I'd like the typical user to only have to use 2 macros tops. |
I think the |
I guess the question becomes: where should this guide live? Currently, the only form of documentation is If you want to host the guide in some other form, then I guess we need to move forward with this alongside #21?
I agree with this move. |
Currently, we have quite a few macros that seem to do similar, but not quite the same thing. We should think about improving the documentation to make clear which ones to use with Yew, and which ones are meant to be used framework-independently.
As I see it,
::stylist::css!
and::stylist::style!
should not ever have to be used with Yew..::stylist::global_style!
is currently the only way to mount a global styleglobal_style!
is superseded by<stylist::yew::Global>
and other framework specific solutions, imo. Like the globalstyle!
macro it's not context aware, so the current usage might be questionable, but okay for most cases.The
css!
injected withstyled_component
seems to be more-or-less superseded with hooks anduse_style!
.In any case, there should be documentation for using
stylist
specifically with Yew, since as of now, that's the only framework we have special in-crate support for.The text was updated successfully, but these errors were encountered: