• Stars
    star
    713
  • Rank 63,511 (Top 2 %)
  • Language
    CSS
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

HTML layout helper based on CSS flexbox specification β€”

Flex Layout Attribute (FLA)

Layout helper based on CSS flexbox specification designed to serve you as quick flexbox shorthand by using two custom html attributes β€” layout and self.

Basic example

Items distributed in a row and centered within container:

<div layout="row center-center">
    <div>1</div>
    <div>2</div>
    <div>3</div>
</div>

Try live β€” interactive demo

View demo

Benefits

  • Dedicated HTML attribute β€” separated layout markup, semantic & concise syntax.
  • Beyond grids β€” ratio relationships, element sizes based on a scale.
  • Rapid prototyping β€” design in browser, quick iterations, no need to write CSS for layout.
  • Solid base β€” ease to extend and customize.

Quick start

Several quick start options are available:

  • Download the latest release
  • Clone the repo: git clone https://github.com/StefanKovac/flex-layout-attribute.git.
  • Install with npm: npm install flex-layout-attribute.

Usage

  1. Insert flex-layout-attribute.min.css in document HEAD:
<link href="path/to/css/flex-layout-attribute.min.css" rel="stylesheet">
  1. Add layout attribute to html elements:
<div layout="row center-justify">
    ...
</div>

Development

  1. Clone the repo: git clone https://github.com/StefanKovac/flex-layout-attribute.git.
  2. Install dependencies: npm run setup.
  3. Build FLA: gulp or set watcher: gulp watch

Learn more

Interactive demo, documentation and snippets β€” http://progressivered.com/fla/


License

FLA is released under the MIT license.