-
Notifications
You must be signed in to change notification settings - Fork 0
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
typo in util.cljs fetch-merged-css #5
Comments
... also may I suggest in line 294 in util.cljs class (reduce into [] [(if (string? acl) [acl] acl) (if (string? bcl) [bcl] bcl)]) in addition to string? allow for symbol? - it will be consistent with raw hiccup that allows for symbols as css class designators. |
text.cljs:165 - instead of same style util.cljs:306 instead of I understand the intention is to remove :class :style and :attr keys from the map. also in util.cljs:317 I believe the return value should be changed from For example imagine I use And in
I would read from options, not xoptions which now have no :class and sometimes (e.g. in button component) is used. Is it correct please? I only started eyeballing the code this weekend, so I may be missing something. To sum it up for now, I would change the whole merge-css function to
|
Thanks! Just to forestall too much effort on this branch: the main re-com project has gone in a significantly different direction than merge-css. Re-com-tailwind will need a rewrite in order to remain compatible. I don't have time to do that right now. So probably just bugfixes on this code base. You might want to look over the current branch of re-com to see what has been done there. Try looking in https://github.com/day8/re-com/tree/master/src/re_com/theme. |
so if I want to use tailwind, am I to try to shoehorn (e.g. by set!-ing things) the tailwind classes in the main branch? Perhaps starting with base components like box h-box etc. then progress to basic ones like button as I need? are there any examples of applying themes or perhaps even replacing bootstrap? I don't know if tailwind and bootstrap play well together. |
sorry, one more question - can I somehow "start small" with the existing framework to get tailwind? e.g. in your branch I tried this, taken from a tailwind template like https://tailwindui.com/templates/keynote - I bought a source code for it, and I replaced colours with more green, then I injected them into
|
Have you tried just pushing your tailwind classes into each component using the :class parameter or perhaps the :parts interface? It's probably simpler than tampering with the *-css-spec structure. |
Yes, I started with adding my classes using the :class parameter, but it appended my classes to the ones from css-specs, rather than overwriting it. In my simple cases it did not cause any issues, but I thought modifying the css-spec was cleaner. Importantly, I started looking into re-com main branch as you warned me that merge-css is no longer there, so maybe indeed it is not worth investing in the re-com-tailwind branch. I see there is no equivalent of css-specs there, but classes like "rc-button" (undefined in .css, probably left for users' customisation) and "btn" from bootstrap are included in the component source code. Over this week (and after day job is done!) I will try to understand how themes work. Given that the tailwind branch is obsolete and it is not as polished as the main branch (e.g. tooltip over buttons in the tailwind branch don't work well), perhaps I should use the main branch, accept that it is bootstrap, and try to style the components with tailwind classes uses some tailwind configuration tricks like prefixed classes and forced high specificity by including app ID. At least it will get me started, and if I have time to port it to tw later fully, I can try - but starting from the main branch. I don't know how much the complex components like tables, date pickets etc. rely on bootstrap in re-com, maybe not rely at all? |
The re-com maintainers intend to remove the hard coded bootstrap dependency. I don't know how far they have gotten. I built the merge-css tool and the *-css-spec structures in order to do this. The re-com maintainers decided on a different toolset/format to do the same thing, discussed here: day8/re-com#327. As you say, it seems to mostly be in the themes folder. I imagine that someone will still need to go through all of the components and separate out the css bits into their chosen data structures. I don't have time for it now. Having done it once already, I assure you that it is plenty of work! My recollection is that there is plenty of bootstrap stuff scattered through all of the components. |
is
use-toplevel (get :use-toplevel defaults (if (= tag :main) true false))
should be
use-toplevel (get defaults :use-toplevel (if (= tag :main) true false))
line 308
The text was updated successfully, but these errors were encountered: