Socket
Socket
Sign inDemoInstall

primer-avatars

Package Overview
Dependencies
Maintainers
1
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.2.1 to 0.2.2

build/build.css

8

CHANGELOG.md

@@ -0,1 +1,9 @@

# v0.2.2
* Mentioning the build file - Jon Rohan [github/github@64ca4a7](https://github.com/github/github/commit/64ca4a7)
* Including build/build.css in distributed npm module - Jon Rohan [github/github@e4effbf](https://github.com/github/github/commit/e4effbf)
* Updating modules to run on prepublish to include build.css in distribution - Jon Rohan [github/github@5b573a0](https://github.com/github/github/commit/5b573a0)
* Re-ordering the docs to the bottom of the readme - Jon Rohan [github/github@9c1f291](https://github.com/github/github/commit/9c1f291)
* Updating the link - Jon Rohan [github/github@f67684b](https://github.com/github/github/commit/f67684b)
# v0.2.1

@@ -2,0 +10,0 @@

14

package.json
{
"version": "0.2.1",
"version": "0.2.2",
"name": "primer-avatars",

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

"index.scss",
"lib"
"lib",
"build"
],

@@ -19,7 +20,6 @@ "repository": "https://github.com/primer/avatars.git",

"scripts": {
"build": "npm run setup && npm run preprocess",
"lint": "stylelint **/*.scss -c .stylelintrc.json -s scss",
"preprocess": "node-sass index.scss --include-path node_modules | postcss -c .postcss.json -o build/build.css",
"setup": "npm install",
"test": "npm run lint"
"setup": "if [ ! -d \"node_modules\" ]; then npm install; fi",
"build": "node-sass index.scss --include-path node_modules --output-style compressed | postcss -c .postcss.json -o build/build.css",
"prepublish": "npm run setup && npm run build",
"test": "stylelint **/*.scss -c .stylelintrc.json -s scss"
},

@@ -26,0 +26,0 @@ "dependencies": {

@@ -8,8 +8,4 @@ # Primer CSS Avatars

This repository is a module of the full [primer-css][primer] repository.
This repository is a module of the full [primer-css][primer-css] repository.
## Documentation
You can read more about avatars in the [docs][docs].
## Install

@@ -35,3 +31,3 @@

For a compiled **css** version of this module, a npm script is included that will output a css version to `build/build.css`
For a compiled **css** version of this module, a npm script is included that will output a css version to `build/build.css` The built css file is also included in the npm package.

@@ -42,14 +38,63 @@ ```

## Related
## Documentation
* [Primer Documentation][docs]
* [primer-css][primer]
* [primer-support][primer-support]
You can read more about other primer modules in the [full primer docs][docs].
<!-- %docs
title: Avatars
status: Stable
-->
### 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
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.
```html
<img class="avatar" src="/jonrohan.png?v=3&s=144" width="72" height="72">
```
#### 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.
```html
<img class="avatar avatar-small" src="/jonrohan.png?v=3&s=64" width="32" height="32">
```
#### Parent-child avatars
When you need a larger parent avatar, and a smaller child one, overlaid slightly, use the parent-child classes.
```html
<div class="avatar-parent-child left">
<img class="avatar" src="/jonrohan.png?v=3&s=96" width="48" height="48">
<img class="avatar avatar-child" src="/josh.png?v=3&s=40" width="20" height="20">
</div>
```
#### Avatar stack
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.
```html
<span class="avatar-stack tooltipped tooltipped-s" aria-label="jonrohan, aaronshekey, and josh">
<img alt="@jonrohan" class="avatar" height="39" src="/jonrohan.png" width="39">
<img alt="@aaronshekey" class="avatar" height="39" src="/aaronshekey.png" width="39">
<img alt="@josh" class="avatar" height="39" src="/josh.png" width="39">
</span>
```
<!-- %enddocs -->
## License
MIT &copy; [GitHub](https://github.com/)
[MIT](./LICENSE) &copy; [GitHub](https://github.com/)
[primer]: https://github.com/primer/primer
[primer-support]: https://github.com/primer/primer-support
[docs]: http://primercss.io/

@@ -56,0 +101,0 @@ [npm]: https://www.npmjs.com/

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