openculinary / frontend

The RecipeRadar Frontend is a recipe search and meal planning application
GNU Affero General Public License v3.0
13 stars 2 forks source link

Search results: adjust appearance of ingredients within search results #216

Closed jayaddison closed 1 year ago

jayaddison commented 1 year ago

Describe the reason for these changes and the problem that they solve

This changeset attempts to improve the appearance and legibility of ingredient description lines within the search results.

Previously, the default colour for text in ingredient lines was the HTML CSS colour gray, resulting in relatively low-contrast text. Product names within the text were displayed differently (in black, usually -- with the exception of search terms, coloured green) to distinguish them from the surrounding descriptive text.

Instead, it seems better to use a single colour for all text within ingredient lines. To achieve annotation/highlighting of product names, we instead use underlines. Search terms are displayed with an orange underline, and other product names are underlined with a gray underline.

Before image

After image

Briefly summarize the changes

  1. Rectify / cleanup a few CSS rules and element names (and their associated RecipeML processing)
  2. Use underlines instead of font styling to identify products within ingredient lines

How have the changes been tested?

  1. Local development testing
jayaddison commented 1 year ago

(this changeset somewhat inspired by reading about food packaging guidelines: https://www.fooddrinkeurope.eu/wp-content/uploads/2022/10/06672-Guidelines-on-Legibility-of-Labelling_45.pdf)