Flexi-default-styles
Default styles to match the attributes converted by flexi-dsl, as well as styles for the flexi-layouts components.
Installation
It is recommended that you manage your flexi addons through the main flexi addon:
ember install flexi
This will provide a prompt to install only the addons you want. Flexi will also maintain
compatibility between addons.
Config
The flexi-config dependency's default blueprint will install config/flexi.js
with the default settings.
Settings
{
columns: 12,
columnPrefix: 'col',
includeMediaCSS: true,
includeElementCSS: true,
transformAllElementLayoutAttributes: false,
gutterPadding: '.5rem',
includeCSS: true,
breakpoints: []
}
config.breakpoints
Your config must have a breakpoints
array. A breakpoint has the structure:
{ name: 'mobile', prefix: 'xs', begin: 0 }
name
will be used for blueprint generation of layout names, and is made available as an is<Name>
boolean on the device/layout
service.
prefix
is a shorthand for the breakpoint name used for column attributes, classes, and responsive utilities.
With a prefix
of xs
.
begin
is the pixel value at which the breakpoint becomes valid if equal to or larger than.
Using a breakpoint's prefix
.col-xs-1
... .col-xs-n
will be valid class names (if columnPrefix
is set to col
).
<box xs="n visible vertical">
Is valid shorthand for
<box class="col-xs-n visible-xs vertical-xs">
The following responsive utilities are made available for each prefix:
.hidden-xs,
.visible-xs,
.container-xs,
.vertical-xs,
.horizontal-xs,
.wrap-xs,
.nowrap-xs {}
Read More
Support, Questions, Collaboration
Join the flexi channel on Slack.
Contributing
- Open an Issue for discussion first if you're unsure a feature/fix is wanted.
- Use descriptive branch names (e.g.
<type>/<short-description>
) - Use Angular Style Commits
Commmits
Angular Style commit messages have the full form:
<type>(<scope>): <title>
<body>
<footer>
But the abbreviated form (below) is acceptable and often preferred.
<type>(<scope>): <title>
Examples:
- chore(deps): bump deps in package.json and bower.json
- docs(component): document the
fast-action
component
Thanks
A special thanks goes out to @ebryn for the
inspiration to pursue a solution for explicit layouts, and IsleofCode
for providing the time to built it.