reposition alert icon to baseline - #1422
Conversation
|
Hi @yjwangit, sorry for the delayed review, but thanks for getting this PR out! While your changes get the display of the component to be closer to the images, I think there's more that we can do to get the alignment closer. Baseline alignment can be tricky at times, but let me try to explain a few concepts so that I can make a few suggestions to make things even closer. At a high level, you can see that the blue boxes in the following screenshots are not aligned:
The blue boxes show the content bounding boxes of the elements, the Baseline alignment is trickier than other types of alignment since it is fundamentally based on text rendering. The baseline refers to the bottom of letters, where in Latin alphabets, it excludes the "descenders" like the tail of a "j" or a "q". Because of ascenders and descenders, there usually needs to be extra space between different rows of text. The full height of a row of text is the combination of the font size as well as the line-height property. For example, a text element with a font-size of 24px and a line-height of 1.2 would have a total content box of 24 * 1.2 = 28.8px. Generally, when you want to align images to the baseline of text, in addition to ensuring that alignment style is set to Let me know if you have any questions about this, and sorry again for the delayed review. |


The banner is not shown in the app so I put it on the homepage.