Book Image

RESS Essentials

Book Image

RESS Essentials

Overview of this book

RESS is a new methodology in the world of web design and development. It attempts to solve the problems that accompany the RWD (responsive web design) approach to web design. RESS is still in its infancy, but it is growing at an exponential rate. RESS Essentials shows you how to make server-side applications smarter and more aware of a visitor's environment limitations (device, screen size, and browser). This allows you to create faster and more reliable websites. Through this book, you will build a solid base of knowledge on RESS-related technologies, while the step-by-step tutorials will help you to create your own RESS system. This book is an introduction to RESS alchemy and gives you an incentive to build your own RESS lab. It will give you a broad overview of the multiple techniques used to code responsive websites in responsible ways. Beginning with an overview of RWD, you will learn the steps involved in setting up RWD for client-side development. You will then learn how to scale images using client- and server-side technology. By the end of this book, you will have learned about the implementation of RESS application patterns, browser feature detection, and various RESS architectures. RESS Essentials will also teach you how to use jQuery with some RWD design patterns and how to employ REST API for RWD pages.
Table of Contents (15 chapters)
RESS Essentials
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Plain CSS and Media queries – a solution with limited browser support


One of simplest solutions could be the Cascading Style Sheets, level 2 (CSS2) content property. With a code like the following:

 @media only screen and (min-width: 501px) {img[src="img_front4_small.jpg"] {content: url("img_front4_big.jpg");}

It might be possible to replace img_front4_small.jpg with img_front4_big.jpg. The relevant images (defined by content: statement) are being downloaded by the browser only when the media query condition is met. The brilliant simplicity of this concept is dimmed by the following two facts:

  • This is now only possible in Chrome, Safari, and Opera. In theory, content is a part of the CSS2 specification that is relatively old and widely implemented. This use case is a special one though and it is not well supported. The same applies to CSS :before and :after pseudo elements. Its wide support doesn't apply to the img tag.

  • CSS is really handy when it comes to managing content versions. To make...