Skip to content

Commit a480900

Browse files
Portugal, Marcelomportuga
Portugal, Marcelo
authored andcommitted
fix(less): remove bootstrap dependency
UI-Grid no longer depends on bootstrap to compile so less files can be easily compiled. fix #4173, fix #5435
1 parent ed8ebba commit a480900

File tree

13 files changed

+175
-159
lines changed

13 files changed

+175
-159
lines changed

package-lock.json

+14-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
],
3131
"author": "UI Grid Team",
3232
"license": "MIT",
33-
"dependencies": {
34-
"bootstrap": "~3.3.5"
35-
},
3633
"devDependencies": {
3734
"bower": "^1.8.2",
3835
"canonical-path": "0.0.2",
@@ -73,6 +70,7 @@
7370
"karma-requirejs": "~1.1.0",
7471
"karma-sauce-launcher": "^1.2.0",
7572
"karma-script-launcher": "~1.0.0",
73+
"less": "^3.8.0",
7674
"load-grunt-config": "^0.19.2",
7775
"marked": "^0.3.19",
7876
"phantomjs-prebuilt": "^2.1.16",

src/features/cellnav/less/cellNav.less

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
@import '../../../less/variables';
2-
@import (reference) '../../../less/bootstrap/bootstrap';
3-
4-
// .ui-grid-cell-contents:focus {
5-
// outline: 0;
6-
// background-color: @focusedCell;
7-
// }
82

93
.ui-grid-cell-focus {
104
outline: 0;
@@ -13,12 +7,17 @@
137

148
.ui-grid-focuser {
159
position: absolute;
16-
left: 0px;
17-
top: 0px;
10+
left: 0;
11+
top: 0;
1812
z-index: -1;
1913
width:100%;
2014
height:100%;
21-
#ui-grid-twbs > .form-control-focus();
15+
&:focus {
16+
border-color: #66afe9;
17+
outline: 0;
18+
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
19+
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
20+
}
2221
}
2322

2423
.ui-grid-offscreen{

src/features/pagination/less/pagination.less

+150-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
@import "../../../less/variables";
22
@import "../../../less/elements";
3-
@import (reference) "../../../less/bootstrap/bootstrap";
3+
4+
@btnColor: #eee;
5+
@btnBgColor: #dadada;
6+
@btnBorderHoverColor: #adadad;
7+
@btnActiveColor: #8c8c8c;
48

59
.ui-grid-pager-panel {
610
display: flex;
@@ -36,17 +40,118 @@
3640
button {
3741
height: 25px;
3842
min-width: 26px;
39-
#ui-grid-twbs > .btn;
40-
#ui-grid-twbs > .button-variant(@paginationButtonColor, @paginationButtonBackgroundColor, @paginationButtonBorderColor);
43+
display: inline-block;
44+
margin-bottom: 0;
45+
font-weight: normal;
46+
text-align: center;
47+
vertical-align: middle;
48+
touch-action: manipulation;
49+
cursor: pointer;
50+
background: #f3f3f3;
51+
border: 1px solid #ccc;
52+
white-space: nowrap;
53+
padding: 6px 12px;
54+
font-size: 14px;
55+
line-height: 1.42857143;
56+
border-radius: 4px;
57+
-webkit-user-select: none;
58+
-moz-user-select: none;
59+
-ms-user-select: none;
60+
user-select: none;
61+
color: @btnColor;
62+
63+
&:hover {
64+
border-color: @btnBorderHoverColor;
65+
text-decoration: none;
66+
}
67+
68+
&:focus {
69+
border-color: @btnActiveColor;
70+
text-decoration: none;
71+
outline: 5px auto -webkit-focus-ring-color;
72+
outline-offset: -2px;
73+
}
74+
75+
&:active {
76+
border-color: @btnBorderHoverColor;
77+
outline: 0;
78+
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
79+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
80+
&:focus {
81+
outline: 5px auto -webkit-focus-ring-color;
82+
outline-offset: -2px;
83+
}
84+
&:hover,
85+
&:focus {
86+
background-color: #c8c8c8;
87+
border-color: @btnActiveColor;
88+
}
89+
}
90+
91+
&:hover, &:focus, &:active {
92+
color: @btnColor;
93+
background: @btnBgColor;
94+
}
95+
96+
&[disabled] {
97+
cursor: not-allowed;
98+
opacity: 0.65;
99+
filter: alpha(opacity=65);
100+
-webkit-box-shadow: none;
101+
box-shadow: none;
102+
&:hover,
103+
&:focus {
104+
background-color: #f3f3f3;
105+
border-color: #ccc;
106+
}
107+
}
41108
}
42109

43110
input {
44-
#ui-grid-twbs > .form-control();
45-
#ui-grid-twbs > .input-sm ();
46111
display: inline;
47112
height: 26px;
48113
width: 50px;
49114
vertical-align: top;
115+
color: #555555;
116+
background: #fff;
117+
border: 1px solid #ccc;
118+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
119+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
120+
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
121+
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
122+
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
123+
padding: 5px 10px;
124+
font-size: 12px;
125+
line-height: 1.5;
126+
border-radius: 3px;
127+
128+
&:focus {
129+
border-color: #66afe9;
130+
outline: 0;
131+
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
132+
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
133+
}
134+
&[disabled],
135+
&[readonly],
136+
&::-moz-placeholder {
137+
opacity: 1;
138+
}
139+
&::-moz-placeholder,
140+
&:-ms-input-placeholder,
141+
&::-webkit-input-placeholder {
142+
color: #999;
143+
}
144+
&::-ms-expand {
145+
border: 0;
146+
background-color: transparent;
147+
}
148+
&[disabled],
149+
&[readonly] {
150+
background-color: #eeeeee;
151+
}
152+
&[disabled] {
153+
cursor: not-allowed;
154+
}
50155
}
51156

52157
.ui-grid-pager-max-pages-number {
@@ -124,12 +229,50 @@
124229
padding: 5px 10px;
125230

126231
select {
127-
#ui-grid-twbs > .form-control;
128-
#ui-grid-twbs > .input-sm ();
232+
color: #555555;
233+
background: #fff;
234+
border: 1px solid #ccc;
235+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
236+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
237+
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
238+
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
239+
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
240+
padding: 5px 10px;
241+
font-size: 12px;
242+
line-height: 1.5;
243+
border-radius: 3px;
129244
height: 25px;
130245
width: 67px;
131246
display: inline;
132247
vertical-align: middle;
248+
249+
&:focus {
250+
border-color: #66afe9;
251+
outline: 0;
252+
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
253+
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
254+
}
255+
&[disabled],
256+
&[readonly],
257+
&::-moz-placeholder {
258+
opacity: 1;
259+
}
260+
&::-moz-placeholder,
261+
&:-ms-input-placeholder,
262+
&::-webkit-input-placeholder {
263+
color: #999;
264+
}
265+
&::-ms-expand {
266+
border: 0;
267+
background-color: transparent;
268+
}
269+
&[disabled],
270+
&[readonly] {
271+
background-color: #eeeeee;
272+
}
273+
&[disabled] {
274+
cursor: not-allowed;
275+
}
133276
}
134277

135278
.ui-grid-pager-row-count-label {

src/less/body.less

-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
21
.ui-grid-render-container {
32
position: inherit;
4-
// overflow: hidden;
53

64
.border-radius(0, @gridBorderRadius, @gridBorderRadius, 0);
75

@@ -12,7 +10,6 @@
1210
}
1311

1412
.ui-grid-viewport {
15-
// overflow: auto; // TODO(c0bra): turn back on when virtual repeater is hooked up
1613
min-height: 20px;
1714
position: relative;
1815
overflow-y: scroll;
@@ -52,9 +49,6 @@
5249
}
5350
}
5451
}
55-
//.ui-grid-row.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell{
56-
//
57-
//}
5852

5953
.ui-grid-no-row-overlay {
6054
position: absolute;

0 commit comments

Comments
 (0)