53c29b5c2e45418277bf03d6fc5dd81882abcff8Matt Sweeney<div class="intro">
53c29b5c2e45418277bf03d6fc5dd81882abcff8Matt Sweeney <p>CSS Base can be used contextually by appyling CSS Base to specific regions of the page.</p>
70713f265d1fe28afa8033e336d69163f93dde32Matt Sweeney<div class="example newwindow">
70713f265d1fe28afa8033e336d69163f93dde32Matt Sweeney <a href="cssbase-context-example.html" target="_blank" class="button">
70713f265d1fe28afa8033e336d69163f93dde32Matt Sweeney View Example in New Window
53c29b5c2e45418277bf03d6fc5dd81882abcff8Matt Sweeney <h2>Contextual Usage</h2>
53c29b5c2e45418277bf03d6fc5dd81882abcff8Matt Sweeney <p>When CSS Base is included in a page it applies rules to all HTML elements via type selectors like this: <code>h1 {margin-bottom:1em;}</code>. An alternate version, <code>cssbase-context.css</code>, uses only descendent selectors like this: <code>.yui3-cssbase-context h1 {margin-bottom:1em;}</code>. This means you can put that class value on a node in your document to choose which region(s) of your page CSS Base will be applied to.</p>
53c29b5c2e45418277bf03d6fc5dd81882abcff8Matt Sweeney<div class="yui3-cssbase">
53c29b5c2e45418277bf03d6fc5dd81882abcff8Matt Sweeney <p>Everything within this container will have CSS Base applied.</p>
53c29b5c2e45418277bf03d6fc5dd81882abcff8Matt Sweeney<h3>Note:</h3>
53c29b5c2e45418277bf03d6fc5dd81882abcff8Matt Sweeney<p>Because CSS examples are susceptible to other CSS on the page, this example is only available in a new window at the above link.</p>