1 | @mixin str-truncated($max-width: 82%) {
|
2 | display: inline-block;
|
3 | overflow: hidden;
|
4 | text-overflow: ellipsis;
|
5 | vertical-align: top;
|
6 | white-space: nowrap;
|
7 | max-width: $max-width;
|
8 | }
|
9 |
|
10 | @mixin gl-fluid-font-size($min, $max) {
|
11 | @include gl-responsive-property('font-size', $min, $max);
|
12 | }
|
13 |
|
14 | @mixin gl-fluid-line-height($min, $max) {
|
15 | @include gl-responsive-property('line-height', $min, $max);
|
16 | }
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | @mixin gl-responsive-property($property, $min, $max) {
|
31 | #{$property}: clamp-between($min, $max);
|
32 | }
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | @mixin gl-focus(
|
40 | $size: null,
|
41 | $color: false,
|
42 | $important: false,
|
43 | $inset: false,
|
44 | $focus-ring: $focus-ring,
|
45 | $outline: false,
|
46 | $outline-offset: $outline-offset
|
47 | ) {
|
48 | @if $inset == true {
|
49 | @if $color {
|
50 | box-shadow: inset 0 0 0 $outline-width $blue-400,
|
51 | inset 0 0 0 #{$outline-width + $outline-offset} $white,
|
52 | inset 0 0 0 #{$outline-width + $outline-offset + 1px} $color,
|
53 | $focus-ring-inset if-important($important);
|
54 | outline: none if-important($important);
|
55 | } @else if $outline == true {
|
56 | outline: $focus-ring-outline if-important($important);
|
57 | outline-offset: $outline-offset;
|
58 | } @else {
|
59 | box-shadow: inset 0 0 0 $outline-width $blue-400, $focus-ring-inset if-important($important);
|
60 | outline: none if-important($important);
|
61 | }
|
62 | } @else if $color {
|
63 | box-shadow: inset 0 0 0 $gl-border-size-1 $color, $focus-ring if-important($important);
|
64 | outline: none if-important($important);
|
65 | } @else if $outline == true {
|
66 | outline: $focus-ring-outline if-important($important);
|
67 | outline-offset: $outline-offset;
|
68 | } @else {
|
69 | box-shadow: $focus-ring if-important($important);
|
70 | outline: none if-important($important);
|
71 | }
|
72 | }
|
73 |
|
74 | @mixin gl-bg-gradient-blur($direction, $color) {
|
75 | background-image: linear-gradient(to $direction, $transparent-rgba, $color 33%);
|
76 | }
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 | @mixin gl-media-breakpoint-up($name) {
|
85 | $min: map-get($breakpoints, $name);
|
86 | @if $min == null {
|
87 | @error "#{$name} is not a valid breakpoint for this @media query.";
|
88 | }
|
89 | @if $min != 0 {
|
90 | @media (min-width: $min) {
|
91 | @content;
|
92 | }
|
93 | } @else {
|
94 | @content;
|
95 | }
|
96 | }
|
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | @mixin gl-media-breakpoint-down($name) {
|
110 | $max: map-get($breakpoints, $name);
|
111 | @if ($max == null or $max == 0) {
|
112 | @error "#{$name} is not a valid breakpoint for this @media query.";
|
113 | }
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 | $breakpoint-max-range-precision: 0.02px;
|
120 |
|
121 | @media (max-width: $max - $breakpoint-max-range-precision) {
|
122 | @content;
|
123 | }
|
124 | }
|