Skip to content

Commit 6866583

Browse files
Portugal, Marcelomportuga
Portugal, Marcelo
authored andcommitted
fix(less): create a core.less file for import
The core.less file should serve to facilitate overwriting the variables in ui-grid. fix #4659
1 parent a480900 commit 6866583

File tree

5 files changed

+34
-48
lines changed

5 files changed

+34
-48
lines changed

grunt/watch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = function( grunt, options ){
2727

2828
less: {
2929
files: 'src/**/*.less',
30-
tasks: ['less', 'uidocs', 'concat:customizer_less']
30+
tasks: ['less', 'uidocs-generator', 'concat:customizer_less']
3131
},
3232

3333
docs: {

src/less/core.less

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@import 'elements';
2+
@import 'grid';
3+
@import 'header';
4+
@import 'body';
5+
@import 'cell';
6+
@import 'footer';
7+
@import 'menu';
8+
@import 'sorting';
9+
@import 'icons';
10+
@import 'rtl';
11+
@import 'animation';

src/less/elements.less

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/*---------------------------------------------------
2-
LESS Elements 0.9
3-
---------------------------------------------------
4-
A set of useful LESS mixins
5-
More info at: http://lesselements.com
6-
---------------------------------------------------*/
1+
// ---------------------------------------------------
2+
// LESS Elements 0.9
3+
// ---------------------------------------------------
4+
// A set of useful LESS mixins
5+
// More info at: http://lesselements.com
6+
// ---------------------------------------------------
77

88
.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
99
background: @color;

src/less/main.less

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
@import 'grid';
2-
@import 'header';
3-
@import 'body';
4-
@import 'cell';
5-
@import 'footer';
6-
@import 'menu';
7-
@import 'sorting';
8-
@import 'icons';
9-
@import 'rtl';
10-
@import 'animation';
11-
@import 'elements';
12-
@import 'variables';
1+
@import 'variables';
2+
@import 'core';

src/less/variables.less

+14-29
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,38 @@
11

2-
/* This file contains variable declarations (do not remove this line) */
2+
// This file contains variable declarations (do not remove this line)
33

4-
/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
4+
// VARIABLES (DO NOT REMOVE THESE COMMENTS)
55

6-
/**
7-
* @section Grid styles
8-
*/
6+
// @section Grid styles
97
@gridBorderWidth: 1px;
108
@gridBorderRadius: 0px;
119
@borderColor: #d4d4d4;
1210
@focusColor: #b3c4c7;
1311
@activeColor: darken(@focusColor, 8%);
1412

15-
/**
16-
* @section Header styles
17-
*/
13+
// @section Header styles
1814

19-
/** @description Colors for header gradient */
15+
// @description Colors for header gradient
2016
@headerBackgroundColor: #f3f3f3;
2117
@headerGradientStart: #eee;
2218
@headerGradientStop: #fff;
2319
@headerVerticalBarColor: @borderColor;
2420

25-
/**
26-
* @section Grid body styles
27-
*/
21+
// @section Grid body styles
2822

29-
/** @description Colors used for row alternation */
23+
// @description Colors used for row alternation
3024
@verticalBarColor: @borderColor;
3125
@rowColorHovered: #d5eaee;
3226
@rowColorEven: #f3f3f3;
3327
@rowColorOdd: #fdfdfd;
3428

35-
/**
36-
* @section Grid Menu colors
37-
*/
29+
// @section Grid Menu colors
3830
@menuBackgroundColor: #fff;
3931
@menuHoverColor: @focusColor;
4032
@menuSelectedColor: @activeColor;
4133
@menuTextColor: #000;
4234

43-
/**
44-
* @section Sort arrow colors
45-
*/
46-
35+
// @section Sort arrow colors
4736
@sortArrowBackgroundColor: #aaaaaa;
4837
@sortArrowBorderColor: #777777;
4938

@@ -60,9 +49,7 @@
6049
// Color to use for enabled or selected settings/items/cells, etc. Should probably override the one above
6150
@selectedColor: @activeColor;
6251

63-
/**
64-
* @section Scrollbar styles
65-
*/
52+
// @section Scrollbar styles
6653
@scrollbarBackground: darken(@rowColorEven, 15%);
6754
@scrollbarBackgroundHover: darken(@scrollbarBackground, 15%);
6855
@scrollbarBackgroundScrolling: darken(@scrollbarBackgroundHover, 15%);
@@ -72,19 +59,17 @@
7259
@scrollbarBorder: 1px solid darken(@scrollbarBackground, 15%);
7360
@scrollbarBorderScrolling: 1px solid darken(@scrollbarBackgroundScrolling, 15%);
7461

75-
//Border to be applied to editors when the input value or invalid
62+
// Border to be applied to editors when the input value or invalid
7663
@invalidValueBorder: 1px solid #fc8f8f;
7764
@validValueBorder: 1px solid @borderColor;
7865

79-
//Pagination controls
66+
// Pagination controls
8067
@paginationButtonColor: @headerGradientStart;
8168
@paginationButtonBackgroundColor: @headerBackgroundColor;
8269
@paginationButtonBorderColor: #ccc;
8370

8471

85-
/**
86-
* @section font library path
87-
*/
72+
// @section font library path
8873
@font-path: 'fonts/';
8974

90-
/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
75+
// END VARIABLES (DO NOT REMOVE THESE COMMENTS)

0 commit comments

Comments
 (0)