UNPKG

1.09 kBSCSSView Raw
1// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
2// Licensed under the Apache License, Version 2.0.
3
4@import "generated/icon-variables";
5@import "generated/icon-map";
6
7$ns: "bp3" !default;
8
9$icon-classes: (
10 ".#{$ns}-icon",
11 ".#{$ns}-icon-standard",
12 ".#{$ns}-icon-large"
13) !default;
14
15@mixin pt-icon-font-smoothing() {
16 -moz-osx-font-smoothing: grayscale;
17 -webkit-font-smoothing: antialiased;
18}
19
20@mixin pt-icon-sized(
21 $font-size: $pt-icon-size-standard,
22 $font-family-size: strip-unit($font-size)
23) {
24 font-family: "Icons#{$font-family-size}", sans-serif;
25 font-size: $font-size;
26 font-style: normal;
27 font-weight: 400;
28 line-height: 1;
29}
30
31@mixin pt-icon-colors() {
32 color: $pt-icon-color;
33
34 &:hover {
35 color: $pt-icon-color-hover;
36 }
37
38 .#{$ns}-dark & {
39 color: $pt-dark-icon-color;
40
41 &:hover {
42 color: $pt-dark-icon-color-hover;
43 }
44 }
45}
46
47@mixin pt-icon(
48 $font-size: $pt-icon-size-standard,
49 $font-family-size: strip-unit($font-size)
50) {
51 @include pt-icon-sized($font-size, $font-family-size);
52 @include pt-icon-font-smoothing();
53}