origami icon indicating copy to clipboard operation
origami copied to clipboard

o-message: Incorrect alignment of iconography with non-16px root font-size

Open notlee opened this issue 4 years ago • 1 comments

o-message alert icon alignment appears to be off when used on ft.com. The below screenshot shows the error alert, the icon is a little too high.

This is because ft.com set font-size: .8125em; on the html element and the positioning of the icon is a little... interesting. It's absolute and combines a number of "magic" px and rem values.

o-message should be updated to respond to custom font-sizes, which may be set by projects or by the user in their browser settings.

notlee avatar Aug 24 '21 11:08 notlee

o-message should be updated to respond to custom font-sizes, which may be set by projects or by the user in their browser settings.

Origami already supports relative units with the following variables.

$o-typography-relative-units: true;
$o-spacing-relative-units : true;

The issue here is the mix of px and relative units when:

  1. relative units haven't been enabled
  2. 16px is not the base font size

notlee avatar Feb 09 '22 09:02 notlee