mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
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)`
34 lines
561 B
Plaintext
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
|
|
}
|
|
}
|