Socket
Socket
Sign inDemoInstall

primer-avatars

Package Overview
Dependencies
Maintainers
2
Versions
843
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

primer-avatars - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

lib/circle-badge.scss

9

CHANGELOG.md

@@ -0,1 +1,10 @@

# v0.4.0
* Make it a new release - Patrick Marsceill [github/github@24c4c50](https://github.com/github/github/commit/24c4c50)
* Docs tweak - Patrick Marsceill [github/github@ae4f341](https://github.com/github/github/commit/ae4f341)
* Bump package number - Patrick Marsceill [github/github@070fca8](https://github.com/github/github/commit/070fca8)
* Add partial import to avatars index - Patrick Marsceill [github/github@210ba08](https://github.com/github/github/commit/210ba08)
* Move docs to avatars - Patrick Marsceill [github/github@2045ba4](https://github.com/github/github/commit/2045ba4)
* Move and rename - Patrick Marsceill [github/github@6bb6ab2](https://github.com/github/github/commit/6bb6ab2)
# v0.3.0

@@ -2,0 +11,0 @@

2

package.json
{
"version": "0.3.0",
"version": "0.4.0",
"name": "primer-avatars",

@@ -4,0 +4,0 @@ "description": "Basic styles for user profile avatars.",

@@ -38,16 +38,13 @@ # Primer CSS Avatars

You can read more about other primer modules in the [full primer docs][docs].
<!-- %docs
title: Avatars
status: Stable
homepage: https://github.com/primer/primer-avatars
status: New release
-->
### 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.
#### Basic example
{: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.

@@ -61,3 +58,3 @@

#### Small avatars
### Small avatars

@@ -70,3 +67,3 @@ 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.

#### Parent-child avatars
### Parent-child avatars

@@ -82,3 +79,3 @@ When you need a larger parent avatar, and a smaller child one, overlaid slightly, use the parent-child classes.

#### Avatar stack
### Avatar stack

@@ -95,2 +92,57 @@ Stacked avatars can be used to show who is participating in thread when there is limited space available. When you hover over the stack, the avatars will reveal themselves. Optimally, you should put no more than 3 avatars in the stack.

## Circle Badge
`.CircleBadge` allows for the display of badge-like icons or logos. They are used mostly with Octicons or partner integration icons.
`.CircleBadge` should have an `aria-label`, `title` (for a link), or an `alt` (for child `img` elements) attribute specified if there is no text-based alternative to describe it. If there is a text-based alternative or the icon has no semantic value, `aria-hidden="true"` or an empty `alt` attribute may be used.
### Small
```html
<a class="CircleBadge CircleBadge--small float-left mr-2" href="#small" title="Travis CI">
<img src="<%= image_path "modules/site/travis-logo.png" %>" class="CircleBadge-icon" alt="">
</a>
<a class="CircleBadge CircleBadge--small bg-yellow" title="Zap this!" href="#small">
<%= octicon "zap", :class => "CircleBadge-icon text-white" %>
</a>
```
### Medium
```html
<div class="CircleBadge CircleBadge--medium bg-gray-dark">
<img src="<%= image_path "modules/site/travis-logo.png" %>" alt="Travis CI" class="CircleBadge-icon">
</div>
```
### Large
```html
<div class="CircleBadge CircleBadge--large">
<img src="<%= image_path "modules/site/travis-logo.png" %>" alt="Travis CI" class="CircleBadge-icon">
</div>
```
### Dashed connection
For specific cases where two badges or more need to be shown as related or connected (such as integrations or specific product workflows), a `DashedConnection` class was created. Use utility classes to ensure badges are spaced correctly.
```html
<div class="DashedConnection">
<ul class="d-flex list-style-none flex-justify-between" aria-label="A sample GitHub workflow">
<li class="CircleBadge CircleBadge--small" aria-label="GitHub">
<%= octicon "mark-github", :class => "width-full height-full" %>
</li>
<li class="CircleBadge CircleBadge--small" aria-label="Slack">
<img src="<%= image_path "modules/site/slack-logo.png" %>" alt="" class="CircleBadge-icon">
</li>
<li class="CircleBadge CircleBadge--small" aria-label="Travis CI">
<img src="<%= image_path "modules/site/travis-logo.png" %>" alt="" class="CircleBadge-icon">
</li>
</ul>
</div>
```
<!-- %enddocs -->

@@ -97,0 +149,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc