-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
Add human-friendly css classes and scaling indicators #2941
Add human-friendly css classes and scaling indicators #2941
Conversation
apply "scalable" to all apply "scaled-up" when ingredient factor is >1 apply "unscaled" when ingredient factor is 1 apply "scaled-down" when factor is <1
hi, thanks for the PR. Two thoughts
|
Hey, thanks for your response.
|
regarding general CSS: as you probably know as a long time user of tandoor I suck at CSS/frontend design. I would absolutely love some to help me sort out that mess so If you want to take that or part of it onto yourself that would be much appreciate. |
add class names for foods, units, keywords (not following BEM closely)
I educated myself and came to the conclusion that BEM is a popular way to structure CSS classes (here is a quick intro to it). I updated the PR to use BEM classes (mostly following the recommendations from the first link). I also introduced class names reflecting each food, unit, step and keyword in a recipe. I couldn't make that fit with BEM, so I invented my own naming scheme for those: ._foodname-yellow-onion
._unitname-gram
._keywordname-vegetarian
._stepname-bake Such dynamically generated CSS class names are escaped (spaces replaced by dashes and special characters taken care of: How can this be useful?
|
looks really good! |
Couldn't find your review anywhere but I hope I caught everything. |
ah stupid me, i forgot to save the review again 😂 I will look trough it again, do you think you could rebase on the latest develop because otherwise I probabyl wont be able to merge the ShoppingListView. |
Honestly, I don't know how to deal with the rebase. I tried it but I'm getting a lot of merge conflicts on files I haven't even touched. The only change I made to the shopping list was adding |
I was able to merge it in the browser today which for some reason did not work yesterday so everything done. Thanks for the PR |
With the new custom themes feature I thought some more descriptive CSS classes would help making better use of it.
I also wanted to have an indication for when a number in a recipe has been scaled or is able to be scaled. I added respective CSS classes. Here's an implementation example:
Step text:
CSS: