easy_menu 0.4.15 → 0.4.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/_easy_menu_mixins.scss +15 -2
- data/app/assets/stylesheets/easy_menu.css.scss +3 -4
- data/lib/menu_bar.rb +2 -2
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c74da57817315dcfcff6acaf5d4fff133d0bb836878027f2d509c2660e1e7f0
|
4
|
+
data.tar.gz: 95fbbfca37f5f27a38042d31a64d439b6e8e84308d3f35067d0d77cb1f409454
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a32e544bc8e0cb80fc1b993d38d99ff78865dcc3a2346f446bba16ad4704f3a850462ea5430ae4f0b65ba9a93ea30d5596f2a744b20d3de6387ee89429e69b15
|
7
|
+
data.tar.gz: a9b0fbd467c361a7266e556304b375b830a6d7fbe38f3ee0bac37bf3ae18292fa2faa8470f5c64a97c05d5aa9bca215d7a5284c10da38ad7f0886404f26b92f0
|
@@ -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-
|
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-
|
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
|
}
|
@@ -137,10 +137,9 @@
|
|
137
137
|
|
138
138
|
}
|
139
139
|
&.with_menu {
|
140
|
-
.menu_bar_item .arrow{
|
140
|
+
.menu_bar_item .arrow {
|
141
141
|
@include easy_menu_icon(5, center);
|
142
|
-
|
143
|
-
padding: 24px 14px 0 0;
|
142
|
+
padding: 24px 0 0 0;
|
144
143
|
vertical-align: middle;
|
145
144
|
width: 10px;
|
146
145
|
display: inline-block;
|
@@ -149,7 +148,7 @@
|
|
149
148
|
}
|
150
149
|
&.with_menu.no_js:hover, &.with_menu.open{
|
151
150
|
.menu_bar_item {
|
152
|
-
|
151
|
+
@include button_colour(white, white, $text-colour: $menu-bar-item-text-color, $text-shadow: none);
|
153
152
|
border-radius: 2px 2px 0 0;
|
154
153
|
@include menu-bar-item-border-colour-with-fallback;
|
155
154
|
border-bottom: none;
|
data/lib/menu_bar.rb
CHANGED
@@ -84,7 +84,7 @@ class MenuBar
|
|
84
84
|
arrow = @template.content_tag(:span, '', :class => config[:menu_bar_item_arrow_class])
|
85
85
|
|
86
86
|
m = Menu.new(config, options)
|
87
|
-
mbt = MenuBarTrigger.new(config, button_text.html_safe + arrow, m, options[:menu_bar_item])
|
87
|
+
mbt = MenuBarTrigger.new(config, button_text.html_safe + ' ' + arrow, m, options[:menu_bar_item])
|
88
88
|
|
89
89
|
yield m if block_given?
|
90
90
|
|
@@ -170,7 +170,7 @@ class MenuBar
|
|
170
170
|
end
|
171
171
|
|
172
172
|
def to_s
|
173
|
-
empty? ? '' : wrap_content(@content.join.html_safe) # Don't render anything if empty
|
173
|
+
empty? ? ''.html_safe : wrap_content(@content.join.html_safe) # Don't render anything if empty
|
174
174
|
end
|
175
175
|
|
176
176
|
def right_aligned?
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_menu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Jakobsen
|
8
8
|
- Ryan Wallace
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-08-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -25,8 +25,8 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '3.1'
|
28
|
-
description:
|
29
|
-
email:
|
28
|
+
description:
|
29
|
+
email:
|
30
30
|
executables: []
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
@@ -44,10 +44,10 @@ files:
|
|
44
44
|
- lib/easy_menu_configuration.rb
|
45
45
|
- lib/easy_menu_helpers.rb
|
46
46
|
- lib/menu_bar.rb
|
47
|
-
homepage:
|
47
|
+
homepage:
|
48
48
|
licenses: []
|
49
49
|
metadata: {}
|
50
|
-
post_install_message:
|
50
|
+
post_install_message:
|
51
51
|
rdoc_options: []
|
52
52
|
require_paths:
|
53
53
|
- lib
|
@@ -62,8 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
64
|
requirements: []
|
65
|
-
rubygems_version: 3.
|
66
|
-
signing_key:
|
65
|
+
rubygems_version: 3.5.13
|
66
|
+
signing_key:
|
67
67
|
specification_version: 4
|
68
68
|
summary: Simple menu bar DSL for Rails views
|
69
69
|
test_files: []
|