-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
less import mess? #4659
Comments
I second this. From what I understand there are several problems with the current state. The LESS Grunt task compiles the main stylesheet, stylesheets from the individual features as well es some generated font stylesheet into one stylesheet:
In summary, if I want to use my own Bootstrap distribution and want to change variables in the variables.less, I need to adapt a large part of the ui-grid build process into mine which is a bit of a overkill. As an improvement I would suggest three separate stylesheets:
That way, I could override ui-grid.less and include my own variables.less or remove ui-grid's bootstrap. The same applies for ui-grid-features.less. Here, I could also use my own variables.less instead of the standard one. Furthermore, it would be possible to exclude some of the feature stylesheets if I am not using them. And the ui-grid-codes could still be included without having to run ui-grid's build process. Of course, I make this suggestion under the assumption that I understood the build and compilation process correctly ;-) So if there's already a way to achieve all of this, every suggestion is appreciated. |
I've not been able to build the ui-grid.css with overriding the variables to use Bootstrap, can anyone point me in the right direction? I have a ui-grid.less file with: @bootstrapDirectory: "../js/vendor/bootstrap";
@import '../js/vendor/angular-ui-grid/less/variables.less';
@import (reference) '../js/vendor/angular-ui-grid/less/bootstrap/bootstrap.less';
@import (reference) '../js/vendor/angular-ui-grid/less/cellnav/less/cellNav.less';
@import (reference) '../js/vendor/angular-ui-grid/less/edit/less/edit.less';
@import (reference) '../js/vendor/angular-ui-grid/less/expandable/less/expandable.less';
@import (reference) '../js/vendor/angular-ui-grid/less/exporter/less/exporter.less';
@import (reference) '../js/vendor/angular-ui-grid/less/grouping/less/grouping.less';
@import (reference) '../js/vendor/angular-ui-grid/less/importer/less/importer.less';
@import (reference) '../js/vendor/angular-ui-grid/less/move-columns/less/colMovable.less';
@import (reference) '../js/vendor/angular-ui-grid/less/pagination/less/pagination.less';
@import (reference) '../js/vendor/angular-ui-grid/less/pinning/less/pinning.less';
@import (reference) '../js/vendor/angular-ui-grid/less/resize-columns/less/column-resizer.less';
@import (reference) '../js/vendor/angular-ui-grid/less/row-edit/less/rowEdit.less';
@import (reference) '../js/vendor/angular-ui-grid/less/selection/less/selection.less';
@import (reference) '../js/vendor/angular-ui-grid/less/tree-base/less/tree-base.less';
@import (reference) '../js/vendor/angular-ui-grid/less/tree-view/less/tree-view.less';
@import '../js/vendor/angular-ui-grid/less/elements.less';
@import '../js/vendor/angular-ui-grid/less/main.less';
@import (reference) '../js/vendor/bootstrap/less/variables.less';
@import "ui-grid.variables.less"; However this seems to miss out quite a few things (and doesn't build properly: overrides some of my images with a weird border-top-right-radius of 40px... |
Is anybody looking into this? |
I'm using less 2.6.1. I've been able to build the css file when no ui-grid features are included, this way:
I've tried to also include the ui-grid features less files (I need at least ui.grid.pagination), this way:
I need to set the bootstrapDirectory variable to point to my bootstrap folder. Unfortunately, feature less files (like pagination.less) import ui-grid variables.less, setting the bootstrapDirectory variable to its default value again ("../../../node_modules/bootstrap") and that's not right for me. Files like pagination.less also import bootstrap without using the boostrapDirectory variable with this line:
This bootstrap.less file imports the ui-grid variables.less file again. The error I get from less compiler is:
As you can see, the bootsrapDirectory file is set to the default value instead to my overrided value. Any ideas to solve this? Oddly, autoless (0.1.7) is able to build the css file, but the less compiler is not. The less and autoless commands I'm using to compile are:
Thanks in advance! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The core.less file should serve to facilitate overwriting the variables in ui-grid. fix #4659
The core.less file should serve to facilitate overwriting the variables in ui-grid. fix #4659
The core.less file should serve to facilitate overwriting the variables in ui-grid. fix #4659
The core.less file should serve to facilitate overwriting the variables in ui-grid. fix angular-ui#4659
Hi
I use the latest webpack and less loader and compiler and try to import
ui-grid
in my project.But it seems that the less files are structured very unfortunate. It is not possible to just do this:
or this
The only way I got that working was to do this:
But this is obviously an ugly workaround and it would be better if the
ui-grid
less files could be restructured to support simple imports and overrides.Thanks
Bernd
The text was updated successfully, but these errors were encountered: