Skip to content

Commit b6ef90b

Browse files
committed
Merge pull request #21 from sg00dwin/revisions
minor tweaks
2 parents 0e80b60 + e82d331 commit b6ef90b

File tree

3 files changed

+33
-9
lines changed

3 files changed

+33
-9
lines changed

labelFilter.css

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,10 @@
422422
.selectize-dropdown.single {
423423
border-color: #b7b7b7;
424424
}
425+
.selectize-dropdown [data-selectable],
426+
.selectize-dropdown .optgroup-header {
427+
padding: 5px 7px;
428+
}
425429
.filter .navbar-filter-widget:before,
426430
.filter .navbar-filter-widget:after {
427431
content: " ";
@@ -434,16 +438,17 @@
434438
background: #ffffff;
435439
float: left;
436440
min-width: 230px;
437-
min-height: 30px;
441+
min-height: 27px;
438442
border: 1px solid #b7b7b7;
439443
border-radius: 1px;
440444
}
441445
.filter .navbar-filter-widget .label-filter .selectize-control {
442446
display: inline-block;
443447
}
444448
.filter .navbar-filter-widget .label-filter .selectize-control .selectize-input {
449+
background: transparent;
445450
vertical-align: middle;
446-
padding: 3px 8px;
451+
padding: 2px 8px;
447452
border: 0;
448453
box-shadow: none;
449454
font-size: 13px;
@@ -464,7 +469,7 @@
464469
width: auto !important;
465470
white-space: nowrap;
466471
z-index: 9999;
467-
margin: 1px 0 0 -1px;
472+
margin: 0 0 0 -1px;
468473
border: 1px solid #b7b7b7;
469474
}
470475
.filter .navbar-filter-widget .label-filter .selectize-control.label-filter-key .selectize-input.not-full {
@@ -476,7 +481,7 @@
476481
font-size: 13px;
477482
margin-right: 10px;
478483
opacity: 1;
479-
height: 30px;
484+
height: 27px;
480485
}
481486
.filter .navbar-filter-widget .label-filter-add.btn.disabled {
482487
opacity: .75;
@@ -490,6 +495,7 @@
490495
display: inline-block;
491496
font-weight: normal;
492497
padding-top: .3em;
498+
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
493499
}
494500
.filter .active-filters .label-filter-active .label-filtering-remove-all i.fa.fa-times {
495501
margin-left: 5px;
@@ -507,13 +513,19 @@
507513
margin-left: 0;
508514
margin-right: 3px;
509515
max-width: 350px;
516+
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
510517
word-wrap: break-word;
511518
white-space: pre-wrap;
512519
/* Necessary even if line-height is set on active-filters
513520
when a label wraps. Otherwise, there is no margin or padding
514521
between filter and the input above. */
515522
margin-top: 2px;
516523
}
524+
.filter .active-filters .label-filter-active-filters .label i.fa-times {
525+
font-size: 10px;
526+
margin-top: -3px;
527+
vertical-align: middle;
528+
}
517529
@media (min-width: 768px) {
518530
.filter .active-filters {
519531
margin-top: 0;

labelFilter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ angular.module('kubernetesUI')
9797

9898
this._labelFilterKeyInput = $('<select>')
9999
.addClass("label-filter-key")
100-
.attr("placeholder", "Label key ")
100+
.attr("placeholder", "Filter by label ")
101101
.appendTo(labelFilterElem);
102102

103103
this._labelFilterOperatorInput = $('<select>')

styles/labelFilter.less

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@
3838
@selectize-padding-y: 7px;
3939
@selectize-padding-dropdown-item-y: @selectize-padding-y;
4040
@selectize-padding-dropdown-item-x: @selectize-padding-y;
41+
@selectize-text-shadow: 0 1px 0 rgba(0,0,0,0.2);
4142
@selectize-vertical-gradient-color-end: #1da7ee;
4243
@selectize-vertical-gradient-color-start: #178ee9;
4344
@selectize-width-item-border: 0;
4445
@navbar-label-filter-bg: #fff;
45-
@navbar-input-height: 30px;
46+
@navbar-input-height: 27px;
4647
@navbar-menu-border: 1px solid @btn-default-border;
4748

4849

@@ -90,7 +91,7 @@
9091
[data-value] {
9192
padding: 0 6px; // prevent text jump when
9293
margin: 0 3px 0 0;
93-
text-shadow: 0 1px 0 rgba(0,0,0,0.2);
94+
text-shadow: @selectize-text-shadow;
9495
.selectize-border-radius(2px);
9596
.selectize-vertical-gradient(@selectize-color-item, @selectize-color-item);
9697
}
@@ -100,6 +101,9 @@
100101
.selectize-control.single .selectize-input, .selectize-dropdown.single {
101102
border-color: @btn-default-border;
102103
}
104+
.selectize-dropdown [data-selectable], .selectize-dropdown .optgroup-header {
105+
padding: 5px 7px;
106+
}
103107

104108

105109
// Custom code for label filter
@@ -116,8 +120,9 @@
116120
.selectize-control {
117121
display: inline-block;
118122
.selectize-input {
123+
background: transparent;
119124
vertical-align: middle;
120-
padding: 3px 8px;
125+
padding: 2px 8px;
121126
border: 0;
122127
box-shadow: none;
123128
font-size: @font-size-base;
@@ -138,7 +143,7 @@
138143
width: auto !important; // overwrite inline width
139144
white-space: nowrap;
140145
z-index: 9999;
141-
margin: 1px 0 0 -1px;
146+
margin: 0 0 0 -1px;
142147
border: @navbar-menu-border;
143148
.selectize-dropdown-content {
144149
.option {
@@ -177,6 +182,7 @@
177182
display: inline-block;
178183
font-weight: normal;
179184
padding-top: .3em;
185+
text-shadow: @selectize-text-shadow;
180186
}
181187
.label-filtering-remove-all i.fa.fa-times {
182188
margin-left: 5px;
@@ -194,12 +200,18 @@
194200
margin-left: 0;
195201
margin-right: 3px;
196202
max-width: 350px;
203+
text-shadow: @selectize-text-shadow;
197204
word-wrap: break-word;
198205
white-space: pre-wrap;
199206
/* Necessary even if line-height is set on active-filters
200207
when a label wraps. Otherwise, there is no margin or padding
201208
between filter and the input above. */
202209
margin-top: 2px;
210+
i.fa-times {
211+
font-size: 10px;
212+
margin-top: -3px;
213+
vertical-align: middle;
214+
}
203215
}
204216
}
205217
}

0 commit comments

Comments
 (0)