easy_menu 0.4.14 → 0.4.16

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
  SHA256:
3
- metadata.gz: 1c04c184002ae2f9bee123257c52e51827643a69a6dcd962d260c34638c98337
4
- data.tar.gz: 52b18e4f0253119e799c1fc212786c7f95f83f289c74bef5bdf64d2f2c5e9112
3
+ metadata.gz: 5865091b943899a2c6656442bc6287895a06b330e1e36c7535145662d92971e3
4
+ data.tar.gz: a109da0848084d2b4c064abfe5a5219f6351598d313534fbf9cda844d9e8154b
5
5
  SHA512:
6
- metadata.gz: 5abca6238d59700e18e77445d7288b8c55a70e2d183acc48d2a8e973487e8171a01f91ca9ccde99597c5bcdb227f9ed3d881fa9020f90cb7284d924cf793af11
7
- data.tar.gz: 2cbb961742b82a10c81db4d65e76d8547c92b73c93cde2c0f8f5d44fc22fac6f570152222af40140bafed164169331be53c32ab664f44f426c930989f9ba5e3a
6
+ metadata.gz: ac51bc463ae8bf829d71eca14efc0642f86df2be21b8653a0d70a1cb0f875be6703ef89d30ce2f61b6709e4a6b69c2208684e2de968ed6b46742d60a8bb9f416
7
+ data.tar.gz: 3cf5fce8beb564f08aa4008eadb8d62e1f3be3fdb00109f5ee6397a1bf730f4a84b17eed496d499613f5103f633fe3ac3a5d3b38c3af92ca8c0c6211145ad490
@@ -20,7 +20,7 @@ $menu-border-width: 1px;
20
20
  $menu-vertical-padding: 0.2em;
21
21
  $menu-item-vertical-padding: 0.4em;
22
22
  $menu-item-horizontal-padding: 2em;
23
- $menu-item-disabled-text-color: #AAA;
23
+ $menu-item-disabled-text-colour: #AAA;
24
24
  // Make the button border appear even when in a group by popping the button up above its siblings
25
25
  $menu-bar-item-zindex: 1;
26
26
  $menu-bar-item-hover-zindex: 2;
@@ -79,6 +79,12 @@ $menu-bar-item-pressed-zindex: 3;
79
79
 
80
80
  background-color: mix($light, $dark);
81
81
 
82
+ @if is-light($text-colour) {
83
+ --icon-filter: brightness(6);
84
+ } @else {
85
+ --icon-filter: brightness(1);
86
+ }
87
+
82
88
  // Don't override the background if the browser doesn't support gradients otherwise the buttons will be too dark
83
89
  &:not(oldbrowser){
84
90
  @include gradient($light, $dark);
@@ -253,7 +259,7 @@ $menu-bar-item-pressed-zindex: 3;
253
259
  @mixin menu_item_disabled{
254
260
  &.disabled, &.disabled > *{
255
261
  cursor: default;
256
- color: $menu-item-disabled-text-color;
262
+ color: $menu-item-disabled-text-colour;
257
263
  }
258
264
  }
259
265
 
@@ -261,4 +267,11 @@ $menu-bar-item-pressed-zindex: 3;
261
267
  background-image: asset_url('icons.png');
262
268
  background-position: $indent -24px * ($iconNumber - 1);
263
269
  background-repeat: no-repeat;
270
+ filter: var(--icon-filter);
271
+ }
272
+
273
+ @function is-light($color) {
274
+ $result: invert($color);
275
+ $lightness: lightness($result);
276
+ @return $lightness < 50;
264
277
  }
@@ -29,21 +29,37 @@
29
29
  .menu_bar_item{
30
30
  border-radius: 0;
31
31
  }
32
- }
33
32
 
34
- .menu_bar_content:first-child{
35
- .menu_bar_item{
36
- border-top-left-radius: $menu-bar-item-border-radius;
37
- border-bottom-left-radius: $menu-bar-item-border-radius;
33
+ &:not(.right) {
34
+ &:first-child{
35
+ .menu_bar_item{
36
+ border-top-left-radius: $menu-bar-item-border-radius;
37
+ border-bottom-left-radius: $menu-bar-item-border-radius;
38
+ }
39
+ }
40
+ &:last-child{
41
+ .menu_bar_item{
42
+ border-top-right-radius: $menu-bar-item-border-radius;
43
+ border-bottom-right-radius: $menu-bar-item-border-radius;
44
+ }
45
+ }
38
46
  }
39
- }
40
- .menu_bar_content:last-child{
41
- .menu_bar_item{
42
- border-top-right-radius: $menu-bar-item-border-radius;
43
- border-bottom-right-radius: $menu-bar-item-border-radius;
47
+
48
+ &.right{
49
+ &:first-child{
50
+ .menu_bar_item{
51
+ border-top-right-radius: $menu-bar-item-border-radius;
52
+ border-bottom-right-radius: $menu-bar-item-border-radius;
53
+ }
54
+ }
55
+ &:last-child{
56
+ .menu_bar_item{
57
+ border-top-left-radius: $menu-bar-item-border-radius;
58
+ border-bottom-left-radius: $menu-bar-item-border-radius;
59
+ }
60
+ }
44
61
  }
45
62
  }
46
-
47
63
  }
48
64
 
49
65
  // MENU BAR CONTENT
@@ -133,7 +149,7 @@
133
149
  }
134
150
  &.with_menu.no_js:hover, &.with_menu.open{
135
151
  .menu_bar_item {
136
- background: white;
152
+ @include button_colour(white, white, $text-colour: $menu-bar-item-text-color, $text-shadow: none);
137
153
  border-radius: 2px 2px 0 0;
138
154
  @include menu-bar-item-border-colour-with-fallback;
139
155
  border-bottom: none;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_menu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.14
4
+ version: 0.4.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Jakobsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-13 00:00:00.000000000 Z
12
+ date: 2024-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails