easy_menu 0.4.11 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67066f55569707ecc2b7bedec38a59e9e1ea638b0d91418ee321c12ddfa6809d
4
- data.tar.gz: 852d321575f54dc6ce8fa566685fcd4f5beff1a925d15c2b25ba203ef8bdb0c3
3
+ metadata.gz: 3fe3886de8f0fb45b088479aa1b6bf867e24e714a0360afad384863998976b00
4
+ data.tar.gz: 985da2d2593dafc4b62f1b48506a0ef78de5988701a2948a45215b752922972a
5
5
  SHA512:
6
- metadata.gz: 9b1f37db3f5419795b2389b1de05d8ca93cfb582a61c5cb646bf5845f61b321c1502babb42b36c6b41e477ddedaeeff27078b90bbc493e3569b6ecbc6aead7aa
7
- data.tar.gz: 4e4651a676c1a447359ce411f58ebe47f6218f0329ee9abe2121509fef8b369737b8bb62eddd33f6b0ff311ae74ae729fa5f423906b1a78296fff0b4839b65ff
6
+ metadata.gz: 1b6809f1f149df70b300e617362bac169dcd032e1df5f8dccde0463f9a1431cbc410c75f8524faa583aac59338ab48bdfbefb781c5ef932643bdd0936b34a3e3
7
+ data.tar.gz: 7c6d3f722a95f8bc0d1c57700b42c5725e2bb7a475f051b837f9e55c12e1e0fa9e4e5d9236c5c661c5de996215f93fcc3bda6cc94512feb057ca78b2db7dbb42
@@ -72,24 +72,18 @@ $menu-bar-item-pressed-zindex: 3;
72
72
  background-image: linear-gradient(top, $start 0%, $end 100%);
73
73
  background-repeat: no-repeat;
74
74
  }
75
- @mixin button_colour($light, $dark, $text-colour: white, $text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25), $shift: 15px){
76
- color: $text-colour !important; // Make this important because host app may override hover colours, but we don't want to be affected
77
- text-shadow: $text-shadow;
78
- @include menu-bar-item-border($dark);
75
+ @mixin button_colour($light, $dark, $text-colour: white, $text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25)){
76
+ color: $text-colour !important; // Make this important because host app may override hover colours, but we don't want to be affected
77
+ text-shadow: $text-shadow;
78
+ @include menu-bar-item-border($dark);
79
79
 
80
- background-color: mix($light, $dark);
80
+ background-color: mix($light, $dark);
81
81
 
82
- // Don't override the background if the browser doesn't support gradients otherwise the buttons will be too dark
83
- &:not(oldbrowser){
84
- @include gradient($light, $dark);
85
- background-color: $dark;
86
- }
87
-
88
- &:hover:not(:active):not(.disabled):not(.selected){
89
- -moz-transition: background-position 0.1s linear;
90
- -webkit-transition: background-position 0.1s linear;
91
- background-position: 0 (-$shift);
92
- }
82
+ // Don't override the background if the browser doesn't support gradients otherwise the buttons will be too dark
83
+ &:not(oldbrowser){
84
+ @include gradient($light, $dark);
85
+ background-color: $dark;
86
+ }
93
87
  }
94
88
 
95
89
  // STYLES
@@ -149,13 +143,16 @@ $menu-bar-item-pressed-zindex: 3;
149
143
  left: -9999px;
150
144
  }
151
145
  }
152
- @mixin menu_bar_item_hover{
153
- &:hover{
146
+ @mixin menu_bar_item_hover($gradient-shift: 15px) {
147
+ &:hover:not(.disabled):not(.selected) {
154
148
  border-color: #888; // Fallback
155
149
  border-color: rgba(0,0,0, $menu-bar-item-border-darken * 2);
156
150
  border-bottom-color: rgba(0,0,0, $menu-bar-item-border-shadow-darken * 2);
157
151
  z-index: $menu-bar-item-hover-zindex;
158
- position: relative;
152
+
153
+ -moz-transition: background-position 0.1s linear;
154
+ -webkit-transition: background-position 0.1s linear;
155
+ background-position: 0 (-$gradient-shift);
159
156
  }
160
157
  }
161
158
  @mixin menu_bar_item_pressed{
@@ -171,14 +168,14 @@ $menu-bar-item-pressed-zindex: 3;
171
168
  @mixin menu_bar_item_disabled{
172
169
  @include button_colour(#fefefe, #dddede, $menu-bar-item-disabled-text-color, 0 1px 1px rgba(255, 255, 255, 0.75));
173
170
  cursor: default;
174
-
171
+
175
172
  &:active{
176
173
  box-shadow: none;
177
174
  }
178
175
  }
179
176
 
180
177
  @mixin menu_bar_item_default_colour{
181
- @include button_colour($menu-bar-item-light-colour, $menu-bar-item-dark-colour, $menu-bar-item-text-color, 0 1px 1px rgba(255, 255, 255, 0.75), 5px);
178
+ @include button_colour($menu-bar-item-light-colour, $menu-bar-item-dark-colour, $menu-bar-item-text-color, 0 1px 1px rgba(255, 255, 255, 0.75));
182
179
  }
183
180
  @mixin menu_bar_item_danger_colour{
184
181
  @include button_colour(#EE5F5B, #BD362F);
@@ -232,7 +229,7 @@ $menu-bar-item-pressed-zindex: 3;
232
229
  }
233
230
  }
234
231
  @mixin menu_item_hover {
235
- &.selected > * {
232
+ &.selected {
236
233
  @include easy_menu_icon(9, 5px);
237
234
 
238
235
  &:hover {
@@ -261,5 +258,7 @@ $menu-bar-item-pressed-zindex: 3;
261
258
  }
262
259
 
263
260
  @mixin easy_menu_icon($iconNumber, $indent:center){
264
- background: asset_url('icons.png') $indent -24px * ($iconNumber - 1) no-repeat;
261
+ background-image: asset_url('icons.png');
262
+ background-position: $indent -24px * ($iconNumber - 1);
263
+ background-repeat: no-repeat;
265
264
  }
@@ -10,7 +10,7 @@
10
10
  // STYLES
11
11
  .menu_bar.default_theme{
12
12
  display: block;
13
- margin: 0;
13
+ margin: 0 (-$menu-bar-item-spacing / 2);
14
14
  padding: 0;
15
15
  list-style: none;
16
16
  height: $menu-bar-height;
@@ -20,9 +20,11 @@
20
20
  // MENU BAR_GROUP
21
21
  .menu_bar_group{
22
22
  padding: 0;
23
+ margin: 0 $menu-bar-item-spacing/2; // The group takes on the menu bar item margin since internally they will be touching.
23
24
 
24
25
  .menu_bar_content{
25
- margin-left: -$menu-bar-item-spacing - $menu-bar-item-border-width;
26
+ margin-right: 0;
27
+ margin-left: -1px;
26
28
 
27
29
  .menu_bar_item{
28
30
  border-radius: 0;
@@ -30,16 +32,12 @@
30
32
  }
31
33
 
32
34
  .menu_bar_content:first-child{
33
- margin-left: 0;
34
-
35
35
  .menu_bar_item{
36
36
  border-top-left-radius: $menu-bar-item-border-radius;
37
37
  border-bottom-left-radius: $menu-bar-item-border-radius;
38
38
  }
39
39
  }
40
40
  .menu_bar_content:last-child{
41
- margin-right: 0;
42
-
43
41
  .menu_bar_item{
44
42
  border-top-right-radius: $menu-bar-item-border-radius;
45
43
  border-bottom-right-radius: $menu-bar-item-border-radius;
@@ -52,7 +50,7 @@
52
50
  .menu_bar_content{
53
51
  display: inline-block;
54
52
  vertical-align: middle;
55
- margin: 0 $menu-bar-item-spacing 0 0;
53
+ margin: 0 ($menu-bar-item-spacing / 2);
56
54
 
57
55
  // MENU BAR ITEMS
58
56
  .menu_bar_item{
@@ -152,7 +150,6 @@
152
150
  // Allow right alignment of buttons
153
151
  &.right{
154
152
  float: right;
155
- margin: 0 0 0 $menu-bar-item-spacing;
156
153
 
157
154
  .menu {
158
155
  right: 0;
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.11
4
+ version: 0.4.13
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: 2020-06-19 00:00:00.000000000 Z
12
+ date: 2022-10-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -62,9 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubyforge_project:
66
- rubygems_version: 2.7.9
65
+ rubygems_version: 3.3.23
67
66
  signing_key:
68
67
  specification_version: 4
69
- summary: Simple menu bar dsl for Rails views
68
+ summary: Simple menu bar DSL for Rails views
70
69
  test_files: []