Skip to content

Commit 5184622

Browse files
Merge pull request patternfly#440 from cardosogabriel/review-pr-393
Review of PTNFLY-938 Adding Find to the toolbar patternfly#383
2 parents 1fcccca + 4ccd532 commit 5184622

File tree

2 files changed

+21
-64
lines changed

2 files changed

+21
-64
lines changed

less/toolbar.less

Lines changed: 18 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@
2424
.btn,
2525
.btn-group {
2626
+ .btn,
27-
+ .btn-group {
28-
margin-left: 5px;
29-
}
27+
+ .btn-group { margin-left: 5px; }
3028
+ .btn-link,
31-
+ .dropdown {
32-
margin-left: 10px;
33-
}
29+
+ .dropdown { margin-left: 10px; }
3430
}
3531
.btn-link {
3632
color: @gray-darker;
@@ -39,15 +35,12 @@
3935
padding: 4px 0;
4036
&:active,
4137
&:focus,
42-
&:hover {
43-
color: @link-color;
44-
}
38+
&:hover { color: @link-color; }
4539
}
4640
}
4741
}
4842
.toolbar-pf-actions {
4943
display: table;
50-
margin-bottom: 10px;
5144
width: 100%;
5245
@media (min-width: @grid-float-breakpoint) {
5346
.toolbar-pf-filter {
@@ -58,42 +51,20 @@
5851
}
5952
.toolbar-pf-view-selector {
6053
font-size: (@font-size-base + 4);
61-
@media (min-width: @grid-float-breakpoint) {
62-
border-right: 0;
63-
float: right;
64-
padding-right: 0;
65-
}
66-
.active a {
54+
.btn-link.active {
6755
color: @link-color;
6856
cursor: default;
6957
}
70-
a {
71-
color: @gray-darker;
72-
&:hover {
73-
color: @link-color;
74-
}
75-
}
76-
.list-inline {
77-
margin-bottom: 0;
78-
}
7958
}
8059
.toolbar-pf-action-right {
8160
float: right;
8261
@media (max-width: @grid-float-breakpoint) {
8362
float: none;
8463
}
85-
.toolbar-pf-view-selector {
86-
@media (min-width: @grid-float-breakpoint) {
87-
float: left;
88-
}
89-
}
9064
}
9165
.toolbar-pf-find {
9266
font-size: (@font-size-base + 2);
9367
position: relative;
94-
.btn {
95-
outline: none;
96-
}
9768
}
9869
.find-pf-dropdown-container {
9970
background: @color-pf-white;
@@ -113,10 +84,7 @@
11384
&:before,
11485
&:after {
11586
content: "";
116-
display:block;
117-
height:0;
11887
position: absolute;
119-
width:0;
12088
}
12189
&:before {
12290
border-bottom:11px solid @color-pf-black-400;
@@ -147,37 +115,35 @@
147115
}
148116
}
149117
input {
150-
padding: 5px 95px 5px 5px;
151-
width: 100%;
152118
height: 30px;
153-
line-height: 30px;
119+
padding: 5px 117px 5px 5px; // 112px (components) + 5px (offset)
120+
width: 100%;
154121
}
155122
.find-pf-buttons {
156123
position: absolute;
157124
right: 10px;
158-
top: 0;
125+
top: 5px;
159126
.btn {
127+
border: none;
128+
cursor: pointer;
160129
margin-left: 0 !important;
130+
padding: 0;
131+
width: 18px;
132+
.fa-angle-up,
133+
.fa-angle-down {
134+
font-weight: bold;
135+
font-size: (@font-size-base + 6);
136+
}
137+
.pficon-close { font-size: (@font-size-base + 2); }
161138
}
162139
span {
163-
cursor: pointer;
164-
display: inline-block;
165140
height: 30px;
166141
line-height: 30px;
167-
margin-right: 5px;
168142
vertical-align: middle;
169143
}
170144
.find-pf-nums {
171145
color: @color-pf-black-500;
172-
font-size: (@font-size-base + 2);
173-
}
174-
.btn-link .fa-angle-up,
175-
.btn-link .fa-angle-down {
176-
font-weight: bold;
177-
font-size: (@font-size-base + 6);
178-
}
179-
.btn-find-close {
180-
font-size: (@font-size-base + 2);
146+
margin-right: 3px;
181147
}
182148
}
183149
}
@@ -208,11 +174,4 @@
208174
margin-left: 5px;
209175
}
210176
}
211-
.list-inline {
212-
margin: 0 10px 0 5px;
213-
li {
214-
padding-left: 0;
215-
padding-right: 0;
216-
}
217-
}
218177
}

tests/pages/_includes/widgets/layouts/toolbar.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,9 @@
6060
</div>
6161
</div>
6262
<div class="form-group toolbar-pf-view-selector">
63-
<ul class="list-inline">
64-
<li><a href="#"><i class="fa fa-th"></i></a></li>
65-
<li class="active"><a href="#"><i class="fa fa-th-large"></i></a></li>
66-
<li><a href="#"><i class="fa fa-th-list"></i></a></li>
67-
</ul>
63+
<button class="btn btn-link"><i class="fa fa-th"></i></button>
64+
<button class="btn btn-link active"><i class="fa fa-th-large"></i></button>
65+
<button class="btn btn-link"><i class="fa fa-th-list"></i></button>
6866
</div>
6967
</div>
7068
</form>

0 commit comments

Comments
 (0)