0.6.4 • Published 4 years ago

flexigridcss v0.6.4

Weekly downloads
3
License
MIT
Repository
-
Last release
4 years ago

FlexigridCSS

A css framework which incorporates Flexbox and CSS Grid.

Quick install

FlexigridCSS is constantly in development! Try it out now:

NPM

npm install flexigridcss

or

Yarn

yarn add flexigridcss

Import

After installation, you can import the CSS file into your project using either of these snippet:

import 'flexigridcss/dist/flexigridcss.css'

or

import 'flexigridcss/dist/flexigridcss.min.css'

Feel free to raise an issue or submit a pull request.

CSS only

FlexigridCSS is a CSS framework. As a result, the sole output is a single CSS file, with a min variation. flexigridcss.css

You can either use that file or download the Sass source files to customize the variables and change the default grid structure.

There is no JavaScript included. This is just a helpful style layer to add to your development and is not a full proof solution. It was made for developers needing a solid foundation and a foundation only.

There are planned elements to be styled and built however not enough to build a site from like bootstrap or foundation.

The Grid

What do we have as of now?

At present we have the basic .container > .row > .flex-x-x setup.

Container/Container-fluid

All .container / .container-fluid's are display: flex;. With .container having a fixed width and .container-fluid having the width of the entire viewport.

There is an optional modifier of .container--grid, .container-fluid--grid which applies a grid layout to the container following our column structure.

Rows

All .row's are

.row {
  ...
  display: flex;
  flex-direction: row;
  ...
}

we have also built in modifiers for the row element. They carry the core row styling so can be used without adding two classes.

.row--reverse {
  flex-direction:row-reverse;
}
.row--column {
  flex-direction:column;
}
.row--column-reverse {
  flex-direction:column-reverse;
}
Flex Items

We swap the .col- for .flex- and in turn we introduce .grid- for new grid helper classes.

Similar to Bootstrap our flex items are named:

.flex-1 ... 12 {} // No Breakpoint - Has 12 columns
.flex-xl-1 ... 12 {} // Big desktop
.flex-lg-1 ... 12 {} // Desktop
.flex-md-1 ... 12 {} // Tablet Landscape
.flex-sm-1 ... 12 {} // Tablet Portrait
Grid Items

Our grid item naming is TBD

Breakpoints

We change our layout oclumns based on the breakpoint. Please see below:

We cater for both desktop first builds and mobile first build.

Whats to come?

We are working on "out-of-the-box" layout bodies using CSS Grid alone. These will typically follow the following markup:

...

<body class="some-grid-class-name">
  <header class="header"></header>

  <main class="main" role="main"></main>

  <footer class="footer"></footer>
</body>

...

and at times...

...

<body class="some-grid-class-name">
  <header class="header"></header>

  <nav class="nav" role="navigation"></nav>

  <main class="main" role="main"></main>

  <footer class="footer"></footer>
</body>

...

Where applying a class name to the <body> we will then structure the <header>, <main> and <footer> accordingly. Using the correct properties so that these layouts are responsive and then having @supports fallbacks.

You can then use flex items inside these core layouts to achieve your desired designs.

We can then go a step further and create component layouts for the <header> & <footer>, using grid.

Browser Support

FlexigridCSS uses autoprefixer to make (most) Flexbox and Grid features compatible with earlier browser versions. According to Can I use flexbox & grid, FlexigridCSS is compatible with recent versions of:

  • Chrome
  • Edge
  • Firefox
  • Opera
  • Safari

Internet Explorer (10+) is only partially supported. And we have fallbacks in place where display:grid; is not available.

Copyright and license

Code copyright 2018 Joel Pierre-Powell. Code release under the MIT license.

0.6.4

4 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago