SOUR / MIRROR Codrops Flexible Box Layout Module Abstract The specification describes a CSS box model optimized for user interface design. In the flex layout model, the children of a flex container can be laid out in any direction, and can “flex” their sizes, either growing to fill unused space or shrinking to avoid overflowing the parent. Both horizontal and vertical alignment of the children can be easily manipulated. Nesting of these boxes (horizontal inside vertical, or vertical inside horizontal) can be used to build layouts in two dimensions. CSS is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, in speech, etc. Status of this document This section describes the status of this document at the time of its publication. Publication as a Last Call Working Draft does not imply endorsement by the W3C Membership. The (archived) public mailing list www-style@w3.org (see instructions) is preferred for discussion of this specification. Table of Contents 1 Introduction flex layout . The
HTML5 Introduction HTML Design Principles Abstract HTML 5 defines the fifth major revision of the core language of the World Wide Web, HTML. This document describes the set of guiding principles used by the HTML Working Group for the development of HTML5. The principles offer guidance for the design of HTML in the areas of compatibility, utility and interoperability. Status of this Document This section describes the status of this document at the time of its publication. This document is the First Public Working Draft of "HTML Design Principles" produced by the HTML Working Group, part of the HTML Activity. The decision to request publication of the document was based on a poll of the members of the HTML working group, with the results being 51 "Yes" votes, 2 "No" votes, and 1 "Formally Object", vote. Publication as a Working Draft does not imply endorsement by the W3C Membership. This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. Table of Contents 1. 1.1. 2. 2.1. 2.1.1. 2.2. 2.2.1. 2.3.
Guidelines on ALT texts in IMG elements In HTML authoring, there are very good reasons to include an alt attribute into every img element. The purpose is to specify a textual replacement for the image, to be displayed or otherwise used in place of the image. Thus, the prime rule is: Consider what the page looks like or sounds like when images are not shown. Then, write for each image an alt text that best works as a replacement. This document also gives more specific suggestions for simple, common situations, and some uncommon too. Content: Rules of thumb For an image that contains text in some specific font style, simply use that text as the value of the alt attribute. The fundamentals: replacement, not description Accessibility requires textual alternatives The alt attribute is an essential part of Web accessibility, which is discussed, for example, in Diffuse's Guide to Web Accessibility and Design for All and in the extensive Web Accessibility Initiative (WAI) material. The simple idea: alt The idea of alt is old.
A Beginner's Guide to Perceived Performance: 4 Ways to Make Your Mobile Site Feel Like a Native App Editor's note: This post is ≈3,000 words. It covers many different aspects of perceived performance of mobile websites as well as practical solutions to speeding up your site. TL;DR: it's not about how fast your site is; it's about how fast your users think it is. Building well-designed websites on mobile devices is slowly becoming easier and easier. Whatever the method (responsive, adaptive, etc.), if you know what you're doing, crafting a good-looking site is not a problem. But your clients, just like ours, may still be asking for that app-like experience. Most of the time, when people say something is ‘app-like’ or that it feels ‘native’, they’re not talking about the way a site looks. Native apps are fast. Getting your site to feel native means doing everything you can to get your site to perform as quickly as possible. Improving performance is a really hot topic right now, and for good reason. This was the reason Facebook said they had to move to a native app. 1. 2. You’re in luck!
Media types 7.1 Introduction to media types One of the most important features of style sheets is that they specify how a document is to be presented on different media: on the screen, on paper, with a speech synthesizer, with a braille device, etc. Certain CSS properties are only designed for certain media (e.g., the 'page-break-before' property only applies to paged media). On occasion, however, style sheets for different media types may share a property, but require different values for that property. For example, the 'font-size' property is useful both for screen and print media. 7.2 Specifying media-dependent style sheets There are currently two ways to specify media dependencies for style sheets: Specify the target medium from a style sheet with the @media or @import at-rules. The @import rule is defined in the chapter on the cascade. 7.2.1 The @media rule An @media rule specifies the target media types (separated by commas) of a set of statements (delimited by curly braces). all braille embossed tty
Elements - A Down to Earth CSS Framework The Bright (Near) Future of CSS - Smashing Magazine Advertisement This article is an excerpt from Eric Meyer’s recent book Smashing CSS1, published by Wiley in cooperation with Smashing Magazine. In this article, the focus is on what’s coming: styling techniques you’ll use in the immediate and near-term future. From styling HTML 5 elements to rearranging layout based on display parameters to crazy selection patterns to transforming element layout, these are all techniques that you may use tomorrow, next month, or next year. Accordingly, be careful not to get cut! Furthermore, a number of JavaScript libraries can extend support for advanced CSS back into older browsers, in some cases as far back as IE/Win 5.5. There are also a good many CSS enhancements available as plug-ins for popular JavaScript libraries such as jQuery. Styling HTML 5 Styling HTML 5 is really no different than styling HTML 4. You may have noticed that I left out two fairly important new elements: audio and video. But what about really old browsers, like IE6? How?
Tools for image optimization As we saw a few weeks ago, the weight of an average web page is now almost 1.5MB (median ~1MB), with > 50% of this being images. It’s a harsh reminder that many of our pages on the web are still quite fat, a big concern for slower mobile data connections. BigQuery calculated medians for a HTTP Archive run thanks to Ilya Grigorik There have been plenty of well documented cases of page weight being heavy, with the Oakley site Brad Frost mentioned in April clocking in at ~ 25MB worth of images alone. Insanity. Just think of this on mobile: slower data, CPU, GPU..and it’s just ONE page. Images are a non-trivial problem to solve because they occasionally need to be high-res, but at the same time small enough to not kill your users mobile data cap. The page cost of using images on the web is however not a new problem but we’re at least moving beyond blaming scripts as the main culprit. Tools As a general rule run lossy optimizers first, then lossless. Grunt tasks Individual tools PNG Quantizer