Skip to content

Commit

Permalink
fix(less): create a core.less file for import
Browse files Browse the repository at this point in the history
The core.less file should serve to facilitate overwriting the variables in ui-grid.

fix #4659
  • Loading branch information
Portugal, Marcelo authored and mportuga committed Aug 4, 2018
1 parent a480900 commit 6866583
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 48 deletions.
2 changes: 1 addition & 1 deletion grunt/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function( grunt, options ){

less: {
files: 'src/**/*.less',
tasks: ['less', 'uidocs', 'concat:customizer_less']
tasks: ['less', 'uidocs-generator', 'concat:customizer_less']
},

docs: {
Expand Down
11 changes: 11 additions & 0 deletions src/less/core.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import 'elements';
@import 'grid';
@import 'header';
@import 'body';
@import 'cell';
@import 'footer';
@import 'menu';
@import 'sorting';
@import 'icons';
@import 'rtl';
@import 'animation';
12 changes: 6 additions & 6 deletions src/less/elements.less
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*---------------------------------------------------
LESS Elements 0.9
---------------------------------------------------
A set of useful LESS mixins
More info at: http://lesselements.com
---------------------------------------------------*/
// ---------------------------------------------------
// LESS Elements 0.9
// ---------------------------------------------------
// A set of useful LESS mixins
// More info at: http://lesselements.com
// ---------------------------------------------------

.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
background: @color;
Expand Down
14 changes: 2 additions & 12 deletions src/less/main.less
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
@import 'grid';
@import 'header';
@import 'body';
@import 'cell';
@import 'footer';
@import 'menu';
@import 'sorting';
@import 'icons';
@import 'rtl';
@import 'animation';
@import 'elements';
@import 'variables';
@import 'variables';
@import 'core';
43 changes: 14 additions & 29 deletions src/less/variables.less
Original file line number Diff line number Diff line change
@@ -1,49 +1,38 @@

/* This file contains variable declarations (do not remove this line) */
// This file contains variable declarations (do not remove this line)

/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
// VARIABLES (DO NOT REMOVE THESE COMMENTS)

/**
* @section Grid styles
*/
// @section Grid styles
@gridBorderWidth: 1px;
@gridBorderRadius: 0px;
@borderColor: #d4d4d4;
@focusColor: #b3c4c7;
@activeColor: darken(@focusColor, 8%);

/**
* @section Header styles
*/
// @section Header styles

/** @description Colors for header gradient */
// @description Colors for header gradient
@headerBackgroundColor: #f3f3f3;
@headerGradientStart: #eee;
@headerGradientStop: #fff;
@headerVerticalBarColor: @borderColor;

/**
* @section Grid body styles
*/
// @section Grid body styles

/** @description Colors used for row alternation */
// @description Colors used for row alternation
@verticalBarColor: @borderColor;
@rowColorHovered: #d5eaee;
@rowColorEven: #f3f3f3;
@rowColorOdd: #fdfdfd;

/**
* @section Grid Menu colors
*/
// @section Grid Menu colors
@menuBackgroundColor: #fff;
@menuHoverColor: @focusColor;
@menuSelectedColor: @activeColor;
@menuTextColor: #000;

/**
* @section Sort arrow colors
*/

// @section Sort arrow colors
@sortArrowBackgroundColor: #aaaaaa;
@sortArrowBorderColor: #777777;

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

/**
* @section Scrollbar styles
*/
// @section Scrollbar styles
@scrollbarBackground: darken(@rowColorEven, 15%);
@scrollbarBackgroundHover: darken(@scrollbarBackground, 15%);
@scrollbarBackgroundScrolling: darken(@scrollbarBackgroundHover, 15%);
Expand All @@ -72,19 +59,17 @@
@scrollbarBorder: 1px solid darken(@scrollbarBackground, 15%);
@scrollbarBorderScrolling: 1px solid darken(@scrollbarBackgroundScrolling, 15%);

//Border to be applied to editors when the input value or invalid
// Border to be applied to editors when the input value or invalid
@invalidValueBorder: 1px solid #fc8f8f;
@validValueBorder: 1px solid @borderColor;

//Pagination controls
// Pagination controls
@paginationButtonColor: @headerGradientStart;
@paginationButtonBackgroundColor: @headerBackgroundColor;
@paginationButtonBorderColor: #ccc;


/**
* @section font library path
*/
// @section font library path
@font-path: 'fonts/';

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

0 comments on commit 6866583

Please sign in to comment.