What is your workflow when you have to do a tech review and there are a bunch of CSS-like files?
Do you follow some guidelines? Do you build the feature branch somewhere? Or you just close your eyes 🙈, click on the 'Viewed' checkbox and let the QA guys do the rest? 😬
👇👇👇
Top comments (10)
For us, first round of reivew is done by stylelint. What I usually check for in the next round are: are they
Typically the question for me is... "Does this accurately follow patterns we have established in a healthy way?". Guidelines are great, but it is hard to be absolute about certain things, you sort of need to evaluate whether the current change follows patterns that lead to better overall CSS.
@pp is that okay?
I think that makes sense.
I'd also add that sometimes devs tend to sneak-in some hacks in CSS more often than in other files :D I usually try to catch these and simplify when reviewing someone's CSS code. It all eventually affects readability but also maintainability of code.
Off the top of my head, these are the sorts of things that would cross my mind when reviewing a PR for a UI framework:
Those are the only ones I can think of that are actionable. "Does it feel right?" doesn't really count, but it would be on my list.
Thank you all for your time/responses, much appreciate ❤️.
I'd say that our workflow is very similar to the one described by @robie577 and @antonfrattaroli.
We use BEM, Stylelint, SCSS variables, mixins, and so on. Could be complex when the project is big and you have to deal with many devs with different skills/seniority.
Anyway, I think that one of the important aspects is how solid is your UI / Design System, which is maybe close to what @ben said, if I understood correctly 😬.
If you have a poor UI/DS, you are open to a variety of ‘style combinations’ (even small stuff) that are ‘perfectly fine’ from a UI perspective, but they could lead you to a difficult review process with a bloated CSS code to maintain.
Why setting z-index are bad practices and should avoided? Overlay, modal, etc works with z-index isn't it?
z-index
is bad for accessibility (like screen readers) because it sort of places stuff in the wrong order and confuses people.But at the same time, remember that
z-index
is useful in some situations like popups or banners or nitty gritty stuff.Oh, thank you. I think I need do research about a11y and
z-index
Branch of frameworks and libraries working with tabindex and z-index.