CSS (Cascading Style Sheets) | CSS: Presentation Layer
Standards Based Development
css (Cascading Style Sheets) is a language for describing the appearance of web pages. css is used in conjunction with
css is a declarative language for assigning styles to elements.
Resources
css Rule Declaration and Declaration Block
Declaration
A declaration is made up of a property and a value (ex. color:#ff0).
Declaration Block
A declaration block is the entirety of declarations contained within curly brackets, each separated by semicolons.
When a selector is placed in front of a declaration block, a css rule has been created.
css Tools
- cssRefresh Bookmarklet
- Needle: Automated Test for Your css with Selenium and nose (Python).
- css Stress Testing and Performance Profiling
- csste.st: The why and how of css testing
css Subproperties
css Subproperties provide a list of properties that make up a larger property. Three basic types of properties: simple properties, convenience property, and composite properties:
- css Simple Properties:
take a single value of a single type (or a single named constant, such as
thin)- css Composite Properties:
are properties that take multiple values of different types, like
border.Composite properties also have related subproperties, for example: the second parameter in the
borderproperty is equivalent toborder-width. Thus, any value that is appropriate forborder-widthis also appropriate for the width portion of thebordercomposite property.The types allowed for a subproperty are also allowed for convenience properties and the appropiate portions of composite properties that contain them.
- css Convenience Properties:
border-widthis an example; properties that combine multiple properties of the same type into a single value. Many also allow you to optionally set distinct values for each of the included properties.Convenience properties have related subproperties with finer granularity. Example, instead of setting
border-width, you could setborder-bottom-width,border-top-width,border-left-width, andborder-right-widthproperties to the same value and achieve the same result.Convenience properties can be broken down into subproperties of the same basic type, so any value that is legal for all of the subproperties is also legal for the convenience property as a whole if the property has a single-value form, and for the individual parts of the property has a multiple-value form. For example, you can set
border-widthproperty to accept the valuethineven though it is listed only in related subproperties such asborder-bottom-width. Similarily, you could use a multiple-value form, such asborder-width: thin thin thin thin.





