Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is anyone who's good with CSS able to modify this to align the icon and text better? The current alignment where the baseline of the text is in line with the bottom of the favicon feels off.


If you set the width/height to 12px, set the image's left padding to 0, and center things vertically with flex, it looks significantly better.

  image.width = 12
  image.height = 12
  image.style.marginRight = '0.25em'
  //image.style.paddingRight = '0.25em'
  //image.style.paddingLeft = '0.25em'

  document.querySelectorAll('.athing > td:nth-child(3), .titlelink').forEach(e => { 
    e.style.display = 'flex',
    e.style.alignItems = 'center',
    e.style.marginRight = '0.25em'
  })
Screenshot: https://imgur.com/BN2wHgo


That does look much better. Thank you




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: