devlint / gridlex

Just a CSS Flexbox Grid System
http://gridlex.devlint.fr
MIT License
1.38k stars 145 forks source link

Suggestion - alternate version that doesn't use the word 'grid' #68

Closed tinamayswinkels closed 6 years ago

tinamayswinkels commented 6 years ago

I love gridlex, but I often run into difficulties where another plugin, pre-existing code library etc is already using classes with the word grid in them. As a workaround I edit the initial code to replace 'grid' with 'gridlex' everywhere to prevent conflicts, but I wonder if this is a common use case?

trafnar commented 6 years ago

There seems to be a way to do this. If you scroll down to the "Documentation: Sass variables" section of the Gridlex website, it says:


So that Gridlex fits into your workflow, you can import it and override the next variables:

Variable names Default value
$gl-gridName: grid
$gl-colName: col
$gl-attributeName: class
$gl-gutter: 1rem
$gl-gutter-vertical: 1rem

I haven't tried that, but it might be worth investigating.

devlint commented 6 years ago

Yes @tinamayswinkels @trafnar that is the best solution: you can surcharge sass variables before including gridlex.scss

$gl-gridName: theGrid;
@import "gridlex";