background preloader

Writing efficient CSS - CSS

Writing efficient CSS - CSS

Optimize browser rendering - Make the Web Faster Once resources have been downloaded to the client, the browser still needs to load, interpret, and render HTML, CSS, and JavaScript code. By simply formatting your code and pages in ways that exploit the characteristics of current browsers, you can enhance performance on the client side. Use efficient CSS selectors Overview Avoiding inefficient key selectors that match large numbers of elements can speed up page rendering. Details As the browser parses HTML, it constructs an internal document tree representing all the elements to be displayed. According to this system, the fewer rules the engine has to evaluate the better. The following categories of rules are considered to be inefficient: Rules with descendant selectors For example: Rules with the universal selector as the key body * {...}.hide-scrollbars * {...} Rules with a tag selector as the key ul li a {...} Rules with child or adjacent selectors body > * {...}.hide-scrollbars > * {...} ul > li > a {...} Rules with overly qualified selectors

20 Exceptional CSS Boilerplates and Frameworks CSS frameworks have been the foundations of web projects for many years. However, in the age of responsive design, a framework has even more benefits. A well-built CSS framework or boilerplate can streamline the design process, save huge chunks of development time and ensure your website scales properly on all devices. With so many choices available, though, it can be difficult to choose a framework to build on. It's important to consider the following when making a decision: whether you require a grid, and if so, will it be fluid or fixed? This post details 20 CSS boilerplates, frameworks and systems to help you make that decision. 1. Bootstrap is a "sleek, intuitive and powerful front-end framework for faster and easier web development." 2. Catering for four layouts (default, tablet, mobile and wide mobile), with three sets of typography presets, Less is a responsive CSS grid system for designing adaptive websites. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 19. 1.

Efficiently Rendering CSS I admittedly don't think about this idea very often... how efficient is the CSS that we write, in terms of how quickly the browser can render it? This is definitely something that browser vendors care about (the faster pages load the happier people are using their products). Mozilla has an article about best practices. Google is also always on a crusade to make the web faster. They also have an article about it. Let's cover some of the big ideas they present, and then discuss the practicalities of it all. Right to Left One of the important things to understand about how browsers read your CSS selectors, is that they read them from right to left. ID's are the most efficient, Universal are the least There are four kinds of key selectors: ID, class, tag, and universal. #main-navigation { } body.home #page-wrap { } .main-navigation { } ul li a.current { } ul li a { } * { } #content [title='home'] #main-nav > li { } Even though that feels weirdly counter-intuitive... Don't tag-qualify David Hyatt:

8 CSS Techniques for Charting Data There are many ways you can present numerical, chartable data by styling elements using CSS. Using CSS to style your data prevents you from relying on static images and increases your content’s accessibility. Below, you’ll read about 8 excellent techniques for styling elements into beautiful, accessible charts and graphs. 1. CSS for Bar Graphs View Demo This tutorial showcases three ways of graphing data. 2. View Demo #1 – View Demo #2 – View Demo #3 Author Wilson Miner discusses the concept of accessible, standards-compliant techniques for data visualization mentioning the benefits, limitations, and alternatives in brief. 3. Eric Meyer shows us another technique for graphing vertical bar graphs using unordered lists similar to the "CSS for Bar Graphs" technique from Apples To Oranges. 4. In this technique, you use pre-made background images to shade in the appropriate data. 5. View Demo This example uses a definition list for mark-up. 6. 7. 8. Related Posts

Why programmers should study the art of programming Chip Camden encourages programmers to cultivate a broad and deep understanding of the trade by accumulating a knowledge of its history and keeping an eye on recent developments. To the average programmer in the trenches, debating the theory of computation is like discussing the chemical properties of saltpeter while in a gunfight: it may all be correct, but it doesn't apply directly to the problem in front of them. Why waste time imagining the outcome of a deathmatch between Haskell Curry and Alan Kay when we've got a deadline to slap a new web UI over our legacy application? Why should we care whether we're using a monad or an exception to return an error state? What the heck does "orthogonal" mean? From many a project manager's point of view, programmers who dabble in computing theory pose an even greater danger than wasting time: they threaten to poison the project with new ways of doing things. The history of programming is dotted by false starts and pendulum swings.

70+ Awesome Fullscreen Wordpress Theme Collection Using a dedicated fullscreen WordPress theme will undoubtedly catch the attention of your visitors in a new, powerful and exciting way! Like WordPress themes for portfolio websites they are great for showcasing your work as a photographer, creative artist, designer or photojournalist. The use of the entire browser area adds a great dimension to your blog drawing all the attention on showcasing your images or videos in an intense and vivid full size manner. Widget, sidebar and banner areas have been minimized or entirely removed making it a very minimal, clean and attractive way of promoting your business and strengthen your online presence. Common to most of these themes is the use of a fullscreen slideshow that showcases either images, videos or both maximizing the user experience. Some of them even use an audio player to further enhance and intensify the experience which is a wonderful way to impress your visitors or clients when they visit your site. Advertisement

Flex After Dark | ActionScript XML ActionScript's powerful XML support is based on E4X . Let's see ActionScript's XML handling in action with some examples. Basic Examples The below examples use the following XML var xmlAlbum : XML = < album name = "Sky Blue Sky" artist = "Wilco" > < tracks > < track name = "Either Way" seconds = "187" /> < track name = "You Are My Face" seconds = "278" /> < track name = "Impossible Germany" seconds = "358" /> < track name = "Sky Blue Sky" seconds = "203" /> < track name = "Side With The Seeds" seconds = "256" /> < track name = "Shake It Off" seconds = "342" /> < track name = "Please Be Patient With Me" seconds = "199" /> < track name = "Hate It Here" seconds = "273" /> < track name = "Leave Me (Like You Found Me)" seconds = "250" /> < track name = "Walken" seconds = "267" /> < track name = "What Light" seconds = "216" /> < track name = "On And On And On" seconds = "241" /> </ tracks > </ album > Attribute Access First let's do some investigating of the XML object. Child Access Adding Elements

Stylie. A graphical CSS animation tool. Stylie is a fun tool for easily creating complex web animations. Quickly design your animation graphically, grab the generated code and go! Watch this screencast for a tutorial. The Stylie Workflow When you open the app, you will see a little ball moving from left to right. To change the beginning and ending positions of the animation, just click and drag the crosshairs. Keyframe editing You can add, remove and edit keyframes. "rX," "rY" and "rZ" refer to the three rotation axes, and "s" refers to the scale value. You can tweak individual keyframe properties by pressing the "up" and "down" arrow keys when focusing on a property's text input. Group selection You can select multiple keyframe crosshairs for simultaneous editing by holding the Shift key on your keyboard and clicking the crosshairs. Motion control In addition to the standard easing curves, you can define your own custom curves in the "Motion" tab. Playback control There is a scrubber in the bottom left of the screen. Key bindings

CSS Text Wrapper Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam pede. Donec iaculis, purus at porta tristique, pede nisi rhoncus pede, non nonummy augue nunc in tortor. Suspendisse rhoncus dolor ac magna.

Related: