Skip to content

fix(less): remove bootstrap dependency #6825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
],
"author": "UI Grid Team",
"license": "MIT",
"dependencies": {
"bootstrap": "~3.3.5"
},
"devDependencies": {
"bower": "^1.8.2",
"canonical-path": "0.0.2",
Expand Down Expand Up @@ -73,6 +70,7 @@
"karma-requirejs": "~1.1.0",
"karma-sauce-launcher": "^1.2.0",
"karma-script-launcher": "~1.0.0",
"less": "^3.8.0",
"load-grunt-config": "^0.19.2",
"marked": "^0.3.19",
"phantomjs-prebuilt": "^2.1.16",
Expand Down
17 changes: 8 additions & 9 deletions src/features/cellnav/less/cellNav.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
@import '../../../less/variables';
@import (reference) '../../../less/bootstrap/bootstrap';

// .ui-grid-cell-contents:focus {
// outline: 0;
// background-color: @focusedCell;
// }

.ui-grid-cell-focus {
outline: 0;
Expand All @@ -13,12 +7,17 @@

.ui-grid-focuser {
position: absolute;
left: 0px;
top: 0px;
left: 0;
top: 0;
z-index: -1;
width:100%;
height:100%;
#ui-grid-twbs > .form-control-focus();
&:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
}

.ui-grid-offscreen{
Expand Down
157 changes: 150 additions & 7 deletions src/features/pagination/less/pagination.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
@import "../../../less/variables";
@import "../../../less/elements";
@import (reference) "../../../less/bootstrap/bootstrap";

@btnColor: #eee;
@btnBgColor: #dadada;
@btnBorderHoverColor: #adadad;
@btnActiveColor: #8c8c8c;

.ui-grid-pager-panel {
display: flex;
Expand Down Expand Up @@ -36,17 +40,118 @@
button {
height: 25px;
min-width: 26px;
#ui-grid-twbs > .btn;
#ui-grid-twbs > .button-variant(@paginationButtonColor, @paginationButtonBackgroundColor, @paginationButtonBorderColor);
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
background: #f3f3f3;
border: 1px solid #ccc;
white-space: nowrap;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
color: @btnColor;

&:hover {
border-color: @btnBorderHoverColor;
text-decoration: none;
}

&:focus {
border-color: @btnActiveColor;
text-decoration: none;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}

&:active {
border-color: @btnBorderHoverColor;
outline: 0;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
&:focus {
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
&:hover,
&:focus {
background-color: #c8c8c8;
border-color: @btnActiveColor;
}
}

&:hover, &:focus, &:active {
color: @btnColor;
background: @btnBgColor;
}

&[disabled] {
cursor: not-allowed;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
&:hover,
&:focus {
background-color: #f3f3f3;
border-color: #ccc;
}
}
}

input {
#ui-grid-twbs > .form-control();
#ui-grid-twbs > .input-sm ();
display: inline;
height: 26px;
width: 50px;
vertical-align: top;
color: #555555;
background: #fff;
border: 1px solid #ccc;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;

&:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
&[disabled],
&[readonly],
&::-moz-placeholder {
opacity: 1;
}
&::-moz-placeholder,
&:-ms-input-placeholder,
&::-webkit-input-placeholder {
color: #999;
}
&::-ms-expand {
border: 0;
background-color: transparent;
}
&[disabled],
&[readonly] {
background-color: #eeeeee;
}
&[disabled] {
cursor: not-allowed;
}
}

.ui-grid-pager-max-pages-number {
Expand Down Expand Up @@ -124,12 +229,50 @@
padding: 5px 10px;

select {
#ui-grid-twbs > .form-control;
#ui-grid-twbs > .input-sm ();
color: #555555;
background: #fff;
border: 1px solid #ccc;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
height: 25px;
width: 67px;
display: inline;
vertical-align: middle;

&:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
&[disabled],
&[readonly],
&::-moz-placeholder {
opacity: 1;
}
&::-moz-placeholder,
&:-ms-input-placeholder,
&::-webkit-input-placeholder {
color: #999;
}
&::-ms-expand {
border: 0;
background-color: transparent;
}
&[disabled],
&[readonly] {
background-color: #eeeeee;
}
&[disabled] {
cursor: not-allowed;
}
}

.ui-grid-pager-row-count-label {
Expand Down
6 changes: 0 additions & 6 deletions src/less/body.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

.ui-grid-render-container {
position: inherit;
// overflow: hidden;

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

Expand All @@ -12,7 +10,6 @@
}

.ui-grid-viewport {
// overflow: auto; // TODO(c0bra): turn back on when virtual repeater is hooked up
min-height: 20px;
position: relative;
overflow-y: scroll;
Expand Down Expand Up @@ -52,9 +49,6 @@
}
}
}
//.ui-grid-row.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell{
//
//}

.ui-grid-no-row-overlay {
position: absolute;
Expand Down
Loading