compass-excess 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c58423a6eb382ac880eb1a2af01d94af6e497452
4
- data.tar.gz: 2ed68c5ad7580c22c64f9b67773a18752cad979c
3
+ metadata.gz: e39755a2b417ce3bfde0d3051b1b4a4b1533af2d
4
+ data.tar.gz: 1de48e0f9f13f950624f13342eb52cd78e793bdc
5
5
  SHA512:
6
- metadata.gz: 5932998d50962ecb598d638c0e3a60231b61257b2b611c1b6d3e2c3652387e196720e792ed503a1eb2db425104f4879260750aee36eaf16a31fc382a7f12b3ee
7
- data.tar.gz: 8c67f890fc81e4db2c2effb7b1f8504feeab48041b0bef46348335889002499d62fb720e3831acb5163026606d7b5fae2decb6c42675104c1e2f14ac9b767f08
6
+ metadata.gz: a214dd71647654661468bb3dcb1fd6eea528969665040ed3f1e4513ff4a5321408d29d966bfdee26108340ebb6bbb415a4069494034b48bdef783fff936c548f
7
+ data.tar.gz: 73eda854bd0453f208691f9adaa3cf5b9a085a12cbf204893d2e186bafa1d5f4fc983bec6f4e28b8d52b2c682a6cfa396879658b42c492d6939077a84d87802d
@@ -1,5 +1,5 @@
1
1
  module Compass
2
2
  module Excess
3
- VERSION = '0.4.0'
3
+ VERSION = '0.5.0'
4
4
  end
5
5
  end
@@ -16,12 +16,125 @@
16
16
  line-height: $size + rem;
17
17
  }
18
18
 
19
- @mixin text-underline-hover {
19
+ $line-height-modifiers: (
20
+ default: 1.1875,
21
+ mac: 1,
22
+ ie: 1.25
23
+ );
24
+
25
+ @mixin text-underline-line-height($line-height) {
20
26
  text-decoration: none;
27
+ @include line-height($line-height * map-get($line-height-modifiers, default));
28
+ background-repeat: repeat-x;
29
+
30
+ body.mac &,
31
+ body.ios & {
32
+ @include line-height($line-height);
33
+ }
34
+
35
+ body.ie & {
36
+ @include line-height($line-height * map-get($line-height-modifiers, ie));
37
+ }
38
+ } // @text-underline-line-height()
39
+
40
+ @mixin text-underline-gradient(
41
+ $color,
42
+ $background-color,
43
+ $line-height,
44
+ $line-width,
45
+ $line-offset: 0px,
46
+ $platform: default
47
+ ) {
48
+ $line-width: $line-width / 1px;
49
+ $line-offset: $line-offset / 1px;
50
+ $line-height: $line-height * map-get($line-height-modifiers, $platform);
51
+
52
+ @if $line-offset == 0 {
53
+ $color-stop: percentage(1 - ($line-width / ($line-height * 10)));
54
+ @include background-image(
55
+ linear-gradient(
56
+ $background-color,
57
+ $background-color $color-stop,
58
+ $color $color-stop,
59
+ $color 100%
60
+ )
61
+ );
62
+ } @else {
63
+ $color-stop-1: percentage(1 - (($line-width + $line-offset) / ($line-height * 10)));
64
+ $color-stop-2: percentage(1 - ($line-offset / ($line-height * 10)));
65
+
66
+ @include background-image(
67
+ linear-gradient(
68
+ $background-color,
69
+ $background-color $color-stop-1,
70
+ $color $color-stop-1,
71
+ $color $color-stop-2,
72
+ $background-color $color-stop-2,
73
+ $background-color 100%
74
+ )
75
+ );
76
+ }
77
+ } // @text-underline-gradient()
78
+
79
+ @mixin text-underline-stroke($stroke-color, $stroke-width) {
80
+ @include text-shadow(
81
+ 0 $stroke-width 0 $stroke-color,
82
+ $stroke-width 0 0 $stroke-color,
83
+ 0 -1 * $stroke-width 0 $stroke-color,
84
+ -1 * $stroke-width 0 0 $stroke-color
85
+ );
86
+ } // @text-underline-stroke()
87
+
88
+ @mixin text-underline(
89
+ $color: black,
90
+ $background-color: transparent,
91
+ $stroke-color: white,
92
+ $font-size: 1.4,
93
+ $line-height: 1.8,
94
+ $stroke-width: 2px,
95
+ $line-width: 1px,
96
+ $line-offset: 0px
97
+ ) {
98
+ @include text-underline-line-height($line-height);
99
+ @include text-underline-gradient($color, $background-color, $line-height, $line-width, $line-offset, default);
100
+ @include text-underline-stroke($stroke-color, $stroke-width);
101
+
102
+ body.mac &,
103
+ body.ios & {
104
+ @include text-underline-gradient($color, $background-color, $line-height, $line-width, $line-offset, mac);
105
+ }
106
+
107
+ body.ie & {
108
+ @include text-underline-gradient($color, $background-color, $line-height, $line-width, $line-offset, ie);
109
+ }
110
+ } // @text-underline()
111
+
112
+ @mixin text-underline-hover(
113
+ $color: black,
114
+ $background-color: transparent,
115
+ $stroke-color: white,
116
+ $font-size: 1.4,
117
+ $line-height: 1.8,
118
+ $stroke-width: 2px,
119
+ $line-width: 1px,
120
+ $line-offset: 0px
121
+ ) {
122
+ @include text-underline-line-height($line-height);
123
+
21
124
  &:hover {
22
- text-decoration: underline;
125
+ @include text-underline-gradient($color, $background-color, $line-width, $line-height, $line-offset);
126
+ @include text-underline-stroke($stroke-color, $stroke-width);
23
127
  }
24
- }
128
+
129
+ body.mac &:hover,
130
+ body.ios &:hover {
131
+ @include text-underline-gradient($color, $background-color, $line-width, $line-height, $line-offset, mac);
132
+ }
133
+
134
+ body.ie &:hover {
135
+ @include text-underline-gradient($color, $background-color, $line-width, $line-height, $line-offset, ie);
136
+ }
137
+ } // @text-underline-hover()
25
138
 
26
139
  @mixin text-underline-stroke($stroke-color, $stroke-width) {
27
140
  @include text-shadow(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-excess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Darlow