Align icon vertically to the center of the first line of text

I found the solution: http://jsfiddle.net/sqp1wdap/3/

  1. Align both Eye and Text to flex-start
  2. Make line-height for text same as Eye height

Here is the edited code:

.LegendItem_Eye {
  width: $slotWidth;
  display: flex;
  justify-content: center;
  align-items: flex-start; // ← edit (1)
  background: #eee;
}
.LegendItem_Text {
  padding: 0 3px;
  flex: 1;
  align-self: flex-start; // ← edit (1)
  background: #eaa;
  line-height: $fontSize; // ← edit (2)
}

And here is how it looks like:
enter image description here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)