Files
atom/static/octicon-mixins.less
Nathan Sobo 312f04f44d Add octicon-mixins.less
This file contains mixins that make it easy to turn any selector into
an icon. You use them in the following way:

```less
@import "octicon-mixins.less";

.entry .disclosure-arrow {
  .mini-icon(arr-collapsed);
}

.entry.expanded .disclosure-arrow {
  .mini-icon(arr-expanded);
}
```

There is also the `.mega-icon` mixin, and you are free to pass a size
as a second parameter, like this: `.mega-icon(octocat, 64px)`
2013-04-15 20:45:55 -06:00

34 lines
561 B
Plaintext

.icon() {
font-family: 'Octicons Regular';
font-weight: normal;
font-style: normal;
display: inline-block;
line-height: 1;
-webkit-font-smoothing: antialiased;
line-height: 1;
text-decoration: none;
}
.icon(@size) {
.icon;
font-size: @size;
width: @size;
height: @size;
}
.mini-icon(@name, @size: 16px) {
@import "mini-octicon-utf-codes.less";
&:before {
.icon(@size);
content: @@name
}
}
.mega-icon(@name, @size: 32px) {
@import "mega-octicon-utf-codes.less";
&:before {
.icon(@size);
content: @@name
}
}