reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
dgb23 2020-12-07T01:44:51.344900Z

Hey I skimmed over it and it looks good! One minor nitpick: on the modal dialog you have:

left: calc(50vw - 100px);
width: 200px;
Now 100px seems to be what we call a “magic number”. what you actually mean is: put the element into the middle and substract half of the width to center it. Now, again for this amount of code this is ofc fine. But it would be cleaner if you used CSS variables for this. So both the width and half of the width is based on the same value. You can also “fix” this by flexing it (justify & align center on the container) or by using transform: translate(-50%, 0) so you don’t need to change multiple values at once. The reason I say this is this: I’ve written a ton of CSS, very much including “badly” structured CSS. Lack of experience, time constraints are my excuse. But I’ve found that structuring it well, if you have the time, is very rewarding in the long run. Especially if you have a back and forth with a designer or client, or when you want to change things.

dgb23 2020-12-07T01:50:12.345100Z

Also I like how the clojure code looks much more structured now