├── .gitignore ├── LICENSE ├── README.md ├── grid.css ├── grid.min.css ├── index.html ├── infinity.svg ├── logo.png └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # General 2 | .DS_Store 3 | 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | 11 | # Runtime data 12 | pids 13 | *.pid 14 | *.seed 15 | *.pid.lock 16 | 17 | # Directory for instrumented libs generated by jscoverage/JSCover 18 | lib-cov 19 | 20 | # Coverage directory used by tools like istanbul 21 | coverage 22 | 23 | # nyc test coverage 24 | .nyc_output 25 | 26 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 27 | .grunt 28 | 29 | # Bower dependency directory (https://bower.io/) 30 | bower_components 31 | 32 | # node-waf configuration 33 | .lock-wscript 34 | 35 | # Compiled binary addons (https://nodejs.org/api/addons.html) 36 | build/Release 37 | 38 | # Dependency directories 39 | node_modules/ 40 | jspm_packages/ 41 | 42 | # TypeScript v1 declaration files 43 | typings/ 44 | 45 | # Optional npm cache directory 46 | .npm 47 | 48 | # Optional eslint cache 49 | .eslintcache 50 | 51 | # Optional REPL history 52 | .node_repl_history 53 | 54 | # Output of 'npm pack' 55 | *.tgz 56 | 57 | # Yarn Integrity file 58 | .yarn-integrity 59 | 60 | # dotenv environment variables file 61 | .env 62 | 63 | # next.js build output 64 | .next 65 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Vladimir Carrer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Gzip Size](https://img.badgesize.io/https://unpkg.com/infinity-css-grid@1.0.1/grid.min.css?compression=gzip)](https://unpkg.com/infinity-css-grid@1.0.1/grid.min.css) 2 | 3 |

4 | 5 |

Infinity CSS Grid

6 | 7 |

Ultra minimal fluid Flex Grid.

8 | 9 |
10 | 11 | 12 |

Infinity CSS Grid is around 0,1 Kb CSS for making any number of columns.

13 | 14 | 15 |

Just add any number of .column in the .row:

16 | 17 | ```html 18 | // For 3 columns: 19 | 20 |
21 |
1
22 |
1
23 |
1
24 |
25 | ``` 26 | 27 |

The CSS code is based on this:

28 | 29 | ```css 30 | .row{display: flex; flex-flow: row wrap} 31 | 32 | .column{flex:1} 33 | ``` 34 | 35 | You can make tests here: https://vladocar.github.io/infinity-css-grid/demo1.html 36 | 37 |

Installation

38 | 39 |

Just simply download the project or:

40 | 41 | 42 | ```shell 43 | $ npm i infinity-css-grid 44 | ``` 45 | 46 | ```html 47 | 48 | ``` 49 | 50 |

Demo:

51 | 52 | https://vladocar.github.io/infinity-css-grid/ 53 | 54 |

License

55 | 56 | This project is licensed under the MIT License 57 | -------------------------------------------------------------------------------- /grid.css: -------------------------------------------------------------------------------- 1 | .row{display: flex; flex-flow: row wrap} 2 | 3 | .column{flex:1} 4 | 5 | .merge2{flex:2} 6 | .merge3{flex:3} 7 | .merge4{flex:4} 8 | /* add more .merge classes if you need to */ 9 | 10 | .row,.merge2,.merge3,.merge4 {margin:0 8px} /* optional gutter */ 11 | 12 | 13 | .nested{padding:0 !important; margin:0 !important; border: 0 !important} 14 | -------------------------------------------------------------------------------- /grid.min.css: -------------------------------------------------------------------------------- 1 | .row{display:flex;flex-flow:row wrap}.column{flex:1}.merge2{flex:2}.merge3{flex:3}.merge4{flex:4}.row,.merge2,.merge3,.merge4{margin:0 8px}.nested{padding:0!important;margin:0!important;border:0!important} 2 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Infinity CSS Grid 8 | 47 | 48 | 49 | 50 |
51 |
52 |
53 | 54 |
55 |
56 | 57 |
58 |

Infinity CSS Grid

59 |
60 | 61 |
62 |

Fluid Flex Solution for making infinite grid columns.

63 |
64 | 65 |
66 |
50%
67 |
50%
68 |
69 | 70 |
71 |
33,3%
72 |
33,3%
73 |
33,3%
74 |
75 | 76 |
77 |
25%
78 |
25%
79 |
25%
80 |
25%
81 |
82 | 83 |
84 |
20%
85 |
20%
86 |
20%
87 |
20%
88 |
20%
89 |
90 | 91 |
92 |
16,66%
93 |
16,66%
94 |
16,66%
95 |
16,66%
96 |
16,66%
97 |
16,66%
98 |
99 | 100 |
101 |
12,5%
102 |
12,5%
103 |
12,5%
104 |
12,5%
105 |
12,5%
106 |
12,5%
107 |
12,5%
108 |
12,5%
109 |
110 | 111 |
112 |
1
113 |
1
114 |
1
115 |
Merge 3
116 |
1
117 |
1
118 |
Merge 2
119 |
1
120 |
121 | 122 |
123 |
Merge 3 (take 3 places)
124 |
1
125 |
1
126 |
1
127 |
128 | 129 |
130 |
131 |
Nested
132 |
Nested
133 |
Nested
134 |
135 |
1
136 |
137 | 138 |
139 |
Ultra minimal only 0.15 Kb
140 |
Fluid
141 |
Just add columns into the row container
142 |
143 | 144 |
145 |
146 |

147 | You can add as many columns as you like. You can merge the columns or insert columns 148 | inside columns. Everything is 0.1 Kb and even works in IE10. 149 |

150 |
151 |
152 | 153 |
154 | 157 |
158 |
159 | 160 | 161 | -------------------------------------------------------------------------------- /infinity.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 | 32 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vladocar/infinity-css-grid/d2046db37e97e5dc45b8906468b95abbb4252542/logo.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "infinity-css-grid", 3 | "version": "1.0.3", 4 | "description": "Ultra minimal fluid Flex Grid", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/vladocar/infinity-css-grid.git" 12 | }, 13 | "keywords": [ 14 | "css", 15 | "html", 16 | "flex", 17 | "css-layout", 18 | "css-grid", 19 | "css-framework" 20 | ], 21 | "author": "Vladimir Carrer (http://www.vcarrer.com)", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/vladocar/infinity-css-grid/issues" 25 | }, 26 | "homepage": "https://github.com/vladocar/infinity-css-grid#readme" 27 | } 28 | --------------------------------------------------------------------------------