Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Polyfills for various HTML 5 "more flexible" layout models.
Flexie.js is a polyfill for the CSS3 Flexbox module from W3C.
CSS Template Layout is an implementation of CSS Template Layout Module from W3C. Currently 2 different implementions are packaged in this gem.
Regions.js is the first implementation for the CSS3-Regions in the real world.
These polyfills are all packaged for use with the Rails asset pipeline. This lets you use and experiment with the new HTML5 CSS layout model in order to simplify and improve your HTML grids and layout :)
In addition a stylesheet called flexlayout.css
is included, which wraps the Flex layout model in order to provide some nice utility CSS classes. See the examples in spec/flexlayout
for a usage demo.
html5_script folder = nil
<!--[if lte IE 8]><script src=\"html5-forms/html5.min.js\" type=\"text/javascript\"><![endif]-->
No args:
"<!--[if lte IE 8]><script src=\"http://html5shim.googlecode.com/svn/trunk/html5.js\" type=\"text/javascript\"><![endif]-->"
script_src_tag src
Renders fx:
<script src=\"html5-forms/html5.min.js\" type=\"text/javascript\">
gem 'flexlayout-rails'
//= require flexie
Flexie usage
var box = new Flexie.box({
target : document.getElementById("foo"),
orient : "horizontal",
align : "stretch",
direction : "normal",
pack : "start",
flexMatrix : [1, 1, 1, 1],
ordinalMatrix : [0, 0, 0, 0]
});
The function flexiebox
wraps this to support are more intuitive DSL, using jQuery to select the element to use as the target:
var box = flexiebox('#foo', options);
Defaults options:
DEFAULTS = {
orient : "horizontal",
align : "stretch",
direction : "inherit",
pack : "start"
}
Note:
Flexbox comes in different syntaxes as described here. The latest flex-
syntax is only supported by Chrome 21+ as shown here. Hence you need fallback in your CSS:
selector
{ display: flex }
.no-flexbox selector
{ display: box }
= flexie_script
Renders:
<!--[if lte IE 8]><script src="js/flexie.js"></script><![endif]-->
The following stylesheets with CSS helper classes are included.
flexlayout.css
flex-box-helpers.css
Also SCSS mixins at flex-layout.scss
Better yet to use Compass box mixins
@import "compass/css3"
.example {
@include display-box;
@include box-orient(horizontal);
@include box-align(stretch);
...
.content {
@include box-flex(1);
}
}
Or fx Preboot if using LESS.
.content {
.box-flex(1);
}
Flexbox Articles
Critiques:
Conclusion: As is almost always the case, they are good only if used in the right context to solve the right problem ;)
If you find this interesting, just try this script!
Regions.js requires jQuery and Lettering.js in order to work.
//= require jquery
//= require lettering.jquery
//= require regions.jquery.min
The feature-detects/cssregions
Modernizr detection included is part of Modernizr 2.6+ and supplied by Adobe.
if (!Modernizr.cssregions) {
// use regions polyfill
}
Regions.js API usage
$(function(){ // When DOM is Loaded
$("#article-flow").regions(".article-region");
});
You can also pass a jQuery Object or a list of jQuery Objects / jQuery Selectorstring to the function :
$("#content-source-element").regions($(".content-target-elements"));
// or
$("#content-source-element").regions(["#article-region-1", "#article-region-2", "#article-region-3"]);
// or
$("#content-source-element").regions([$("#article-region-1"), $("#article-region-2"), $("#article-region-3")]);
// even mixed
$("#content-source-element").regions([$("#article-region-1"), "#article-region-2", $("#article-region-3")]);
//= require template_layout/templateLayout
Not sure how/if to use the template generator and compiler!?
//= require template_layout/jquery/jquery.tpl_layout1.1.16.min
Alexis Deveria version, see repo css-template-layout and these demos :)
Pablo Escalada version, see repo at cssTemplateLayout and test folder for examples.
See Multi-column
Example:
<div class="multi-column">
<div class="column">hello</div>
...
</div>
Note: Use the multi-column.css
included as well ;)
//= require jquery.wookmark.min
See Wookmark-jQuery for examples and demos.
//= require FT-colum-flow.min
See FT-column-flow for examples, demos and usage guide etc.
See fx Basic usage example
Copyright (c) 2012 Kristian Mandrup. See LICENSE.txt for further details.
FAQs
Unknown package
We found that flexlayout-rails demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.