background preloader

The Ultimate Flexbox Cheat Sheet

The Ultimate Flexbox Cheat Sheet

Skeleton: Beautiful Boilerplate for Responsive, Mobile-Friendly Development Quick Tip: Add Keyboard Shortcuts To Your Web App Nick Anastasov We power users love our keyboard shortcuts. We use them everywhere – in our code editor, in Photoshop, in gmail. And we hate it when we hit Ctrl+S in a web app, only to see our browser offering to download it. 1. Single keys are easy. After hitting the run button, focus the editor by clicking on it. <div class="content"><ul><li>Try pressing <a class="button c55"><span class="key">7</span></a></li><li>Or you can try hitting <a class="button c191"><span class="key">/</span></a></li><li>Even special keys work <a class="button c27 fn esc"><span class="key">esc</span></a></li></ul><div class="keyboard-answer"><h3>You pressed <span></span></h3></div></div> Run 2. Mousetrap shines when listening for more complex key combinations like capital letters and special symbols. 3. Combinations that involve the Control key are equally easy (see the next example for how to listen for both Control and the OS X Command key). 4. 5. Conclusion This was our quick tip on keyboard shortcuts.

Using Flexbox: Mixing Old and New for the Best Browser Support By Chris Coyier On Flexbox is pretty awesome and is certainly part of the future of layout. The syntax has changed quite a bit over the past few years, hence the "Old" and "New" syntax. But if we weave together the old, new, and in-between syntaxes, we can get decent browser support. Especially for a simple and probably the most common use case: order-controlled grids #The HTML A semantically meaningless wrapper goes around the three main areas and will set the flexbox context. <div class="page-wrap"><section class="main-content" role="main"> Main content: first in source order </section><nav class="main-nav" role="navigation"> Links </nav><aside class="main-sidebar" role="complementary"> Sidebar </aside></div> The end result looking like this: #Flexbox Context We need to make the container for our columns a flexbox display context. Right away we need to weave the old, new, and tweener syntaxes together. #Controlling Column Widths Our goal here is a 20% / 60% / 20% grid. #Column Re-Ordering

javascript phanan/htaccess Flexy Boxes — CSS flexbox playground and code generation tool Flexbox browser support Three versions of the flexbox spec – each with different syntax – have been implemented in browsers. The two 2012 specs are roughly equivilant in terms of features, differing mainly in syntax. The earlier 2009 spec is less comprehensive though covers a lot of the same ground. Flexbox 2012 — W3C Candidate Recommendation, September 2012 Opera 12.1+, Firefox 22+. More browser support info available on caniuse.com. Known issues Flexbox early 2012 Flexbox early 2012 (Internet Explorer 10) align-content (equiv. flex-line-pack) doesn't work if the cross axis dimension is set with min-width or min-height Flexbox 2009 Box wrapping is not supported. box-lines is the property in this spec to achieve wrapping, though unfortunately no browser implemented it. Flexbox 2009 (Firefox) Firefox has a number of non-trivial issues with its 2009 implementation: The setting display: box is treated as display: inline-box if there is no width set. Further reading Code and design by @pete_b.

Your Web, documented · WebPlatform.org Flexbox Defense Ruby QuickRef | zenspider.com by ryan davis Table of Contents Language General Tips These are tips I’ve given over and over and over and over… Use 2 space indent, no tabs. Use [] over Array.new. See for more. General Syntax Rules Comments start with a pound/sharp (#) character and go to EOL. Reserved Words alias and BEGIN begin break case class def defined? Types Basic types are numbers, strings, ranges, regexen, symbols, arrays, and hashes. Numbers 1231_234123.451.2e-30xffff 0b01011 0377 ? Strings In all of the %() cases below, you may use any matching characters or any single character for delimiters. %[], %!! 'no interpolation'"#{interpolation}, and backslashes\n"%q(no interpolation)%Q(interpolation and backslashes)%(interpolation and backslashes)`echo command interpretation with interpolation and backslashes`%x(echo command interpretation with interpolation and backslashes) Backslashes: Here Docs: Encodings: Waaaay too much to cover here. Symbols Internalized String. Ranges Files

Related: