easy_menu 0.4.15 → 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: f6a638bcdfe297bb6e2f41352565b316fad190ee0fc6b533b259e7a72789ed09
4
- data.tar.gz: cf459de8ccd8c0fa2091fbb0b2a5b2d2ea13b5542a33345724194d2b4fccb41e
3
+ metadata.gz: 5865091b943899a2c6656442bc6287895a06b330e1e36c7535145662d92971e3
4
+ data.tar.gz: a109da0848084d2b4c064abfe5a5219f6351598d313534fbf9cda844d9e8154b
5
5
  SHA512:
6
- metadata.gz: 2a6d582f91d3e1af6a17b2cbf6859034b125274606ee8789c3c3b4333bdef06adace04cfa7b5a60ca552ab64a8b3d060a1510c1be085e68802911b0904627342
7
- data.tar.gz: 12f98d925d7c7b6ae7717d4c43c6928f487958c1be35d655dfc8fb1e7adfef058ef36955f50a191675956f5e8fd4346c487de0953b7e9c027b5a5591792d4595
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
  }
@@ -149,7 +149,7 @@
149
149
  }
150
150
  &.with_menu.no_js:hover, &.with_menu.open{
151
151
  .menu_bar_item {
152
- background: white;
152
+ @include button_colour(white, white, $text-colour: $menu-bar-item-text-color, $text-shadow: none);
153
153
  border-radius: 2px 2px 0 0;
154
154
  @include menu-bar-item-border-colour-with-fallback;
155
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.15
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: 2023-09-17 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