HTML and CSS Reference
In-Depth Information
The CSS attribute selector can also leverage these role definitions, along
with state-based attributes such as aria-checked , as hooks for styling,
rather than relying on class attributes.
You can find more about WAI-ARIA roles and their usage in the spec on
the W3C site ( http://www.w3.org/ TR/wai-aria/usage ).
The calc() Function
The calc() function lets you replace any <length> value assignment
with a mathematical expression rather than a fixed-length unit. These
arithmetic expressions can be built with the operators + , - , * , / , min , max ,
and mod .
The problem of leftover pixels that arose in Chapter 7 when mixing
percentage values and fixed lengths (Figure 7.9) can be solved by using
calc() instead. Figure 14.8 shows the updated multicolumn, flexible
layout.
/* modifications to 7.9 using calc() */
.main_left,
.main_center {
/* for unsupported browsers */
width: 48%;
/* for Firefox 4 */
width: -moz-calc(50% - 7px);
/* W3C specs */
width: calc(50% - 7px);
}
 
 
Search WWH ::




Custom Search