Chapter 11. Using Cascading Style Sheets

IN THIS CHAPTER

  • Understanding style sheets

  • Using inline style declarations

  • Using style selectors

  • Using embedded and external style sheets

  • Controlling styles with ActionScript

  • Creating compiled style sheet files

  • Loading compiled style sheets at runtime

Flex applications have a default visual appearance that's determined by a combination of graphics that are embedded in the Flex SDK, known as skins, and various visual settings that are set through Cascading Style Sheet (CSS) declarations.

About Cascading Style Sheets

Web site developers may already be familiar with the concept of CSS, because this technology has been increasingly used to control the visual appearance of Web pages since its introduction in 1996.

The CSS recommendation is created and published by the World Wide Web Consortium (W3C), the same organization that publishes the recommendations for Hypertext Markup Language (HTML), EXtensible Markup Language (XML), and other critical Internet technologies.

Note

Information about the WC3's CSS recommendation and other CSS resources is available at www.w3.org/Style/CSS/.

It's up to the vendors who actually create the Web browsers and other products to implement CSS for their own platforms. Web browsers, for example, implement various subsets of the W3C recommendation; it's only in recent years that the major browsers such as Internet Explorer and Firefox have approached compatibility in their CSS implementations.

The use of CSS to control visual appearance ...

Get Flash® Builder™ 4 and Flex® 4 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.