1 | // Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
2 | // Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy
|
3 | // of the license at https://github.com/palantir/blueprint/blob/master/LICENSE
|
4 | // and https://github.com/palantir/blueprint/blob/master/PATENTS
|
5 |
|
6 | @import "common/icons";
|
7 |
|
8 | /*
|
9 | Icons
|
10 |
|
11 | Weight: 3
|
12 |
|
13 | Styleguide icons
|
14 | */
|
15 |
|
16 | /*
|
17 | UI icons
|
18 |
|
19 | Blueprint UI icons are implemented via an icon font. They can be used anywhere text is
|
20 | used. It's easy to change their color or apply effects like text shadows via standard CSS properties.
|
21 |
|
22 | To use Blueprint UI icons, you need to apply two classes to a `<span>` element:
|
23 | - a __sizing class__, either `pt-icon-standard` (16px) or `pt-icon-large` (20px)
|
24 | - an icon __identifier class__, such as `pt-icon-projects`
|
25 |
|
26 | ```html
|
27 | <span class="pt-icon-standard pt-icon-projects"></span>
|
28 | ```
|
29 |
|
30 | <div class="pt-callout pt-intent-primary pt-icon-info-sign">
|
31 | <h5>Non-standard sizes</h5>
|
32 | Generally, icons should only be used at either 16px or 20px. However if a non-standard size is necessary,
|
33 | set a `font-size` that is whole multiple of 16 or 20 with the relevant size class.
|
34 | You can instead use the class `pt-icon` to make the icon inherit its size from surrounding text.
|
35 | </div>
|
36 |
|
37 | @react-docs Icons
|
38 |
|
39 | Weight: -1
|
40 |
|
41 | Styleguide icons.ui
|
42 | */
|
43 |
|
44 | #{$icon-classes} {
|
45 | display: inline-block;
|
46 | color: $pt-icon-color;
|
47 |
|
48 | .pt-dark & {
|
49 | color: $pt-dark-icon-color;
|
50 | }
|
51 | }
|
52 |
|
53 | span.pt-icon-standard {
|
54 | @include pt-icon($pt-icon-size-standard);
|
55 | }
|
56 |
|
57 | span.pt-icon-large {
|
58 | @include pt-icon($pt-icon-size-large);
|
59 | }
|
60 |
|
61 | span.pt-icon {
|
62 | line-height: 1;
|
63 | font-family: $icons20-family;
|
64 | font-size: inherit;
|
65 | font-weight: 400;
|
66 | font-style: normal;
|
67 |
|
68 | &::before {
|
69 | @include pt-icon-font-smoothing();
|
70 | }
|
71 | }
|
72 |
|
73 | @each $name, $content in $icons {
|
74 | .pt-icon-#{$name}::before {
|
75 | content: $content;
|
76 | }
|
77 | }
|