1
1
mirror of https://github.com/primer/css.git synced 2024-11-28 04:43:05 +03:00
css/docs/avatars.md
Pascal Borreli 7f0ecf12c7 Fixed typos
2015-03-23 22:46:58 +00:00

1.5 KiB

layout title
page Avatars

Avatars are images that users can set as their profile picture. On GitHub, they're always going to be rounded squares. They can be custom photos, uploaded by users, or generated as Identicons as a placeholder.

Contents

  • Will be replaced with the ToC, excluding the "Contents" header {:toc}

Basic example

Add .avatar to any <img> element to make it an avatar. This resets some key styles for alignment, address a Firefox image placeholder bug, and rounds the corners.

Be sure to set width and height attributes for maximum browser performance.

{% example html %} {% endexample %}

Small avatars

We occasionally use smaller avatars. Anything less than 48px wide should include the .avatar-small modifier class to reset the border-radius to a more appropriate level.

{% example html %} {% endexample %}

Parent-child avatars

When you need a larger parent avatar, and a smaller child one, overlaid slightly, use the parent-child classes.

{% example html %}

{% endexample %}