src/cm/media/js/lib/yui/yui_3.10.3/docs/cssreset/cssreset-context.html
changeset 525 89ef5ed3c48b
equal deleted inserted replaced
524:322d0feea350 525:89ef5ed3c48b
       
     1 <!DOCTYPE html>
       
     2 <html lang="en">
       
     3 <head>
       
     4     <meta charset="utf-8">
       
     5     <title>Example: Contextual Example</title>
       
     6     <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic">
       
     7     <link rel="stylesheet" href="../../build/cssgrids/cssgrids-min.css">
       
     8     <link rel="stylesheet" href="../assets/css/main.css">
       
     9     <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
       
    10     <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
       
    11     <script src="../../build/yui/yui-min.js"></script>
       
    12     
       
    13 </head>
       
    14 <body>
       
    15 <!--
       
    16 <a href="https://github.com/yui/yui3"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
       
    17 -->
       
    18 <div id="doc">
       
    19     <div id="hd">
       
    20         <h1><img src="http://yuilibrary.com/img/yui-logo.png"></h1>
       
    21     </div>
       
    22     
       
    23 
       
    24             <h1>Example: Contextual Example</h1>
       
    25     <div class="yui3-g">
       
    26         <div class="yui3-u-3-4">
       
    27             <div id="main">
       
    28                 <div class="content"><div class="intro">
       
    29     <p>CSS Reset can be used contextually by appyling CSS Reset to specific regions of the page.</p>
       
    30 </div>
       
    31 <div class="example newwindow">
       
    32     <a href="cssreset-context-example.html" target="_blank" class="button">
       
    33         View Example in New Window
       
    34     </a>
       
    35 </div>
       
    36 
       
    37     <h2>Contextual Usage</h2>
       
    38     <p>When CSS Reset is included in a page it applies rules to all HTML elements via type selectors like this: <code>h1 {margin:0;}</code>. The contextual version uses only descendent selectors like this: <code>.yui3-cssreset h1 {margin:0;}</code>. This means you can put that class value on a node in your document to choose which region(s) of your page CSS Reset will be applied to.</p>
       
    39 
       
    40 <pre class="code prettyprint">&lt;div class=&quot;yui3-cssreset&quot;&gt;
       
    41     &lt;p&gt;Everything within this container will have CSS Reset applied.&lt;&#x2F;p&gt;
       
    42 &lt;&#x2F;div&gt;</pre>
       
    43 
       
    44 
       
    45 <h3>Note:</h3>
       
    46 <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>
       
    47 </div>
       
    48             </div>
       
    49         </div>
       
    50 
       
    51         <div class="yui3-u-1-4">
       
    52             <div class="sidebar">
       
    53                 
       
    54 
       
    55                 
       
    56                     <div class="sidebox">
       
    57                         <div class="hd">
       
    58                             <h2 class="no-toc">Examples</h2>
       
    59                         </div>
       
    60 
       
    61                         <div class="bd">
       
    62                             <ul class="examples">
       
    63                                 
       
    64                                     
       
    65                                         <li data-description="When CSS Reset is included in a page, it removes the browser-provided styling for HTML elements.">
       
    66                                             <a href="cssreset-basic.html">Global (Page-Level) Example</a>
       
    67                                         </li>
       
    68                                     
       
    69                                 
       
    70                                     
       
    71                                         <li data-description="CSS Reset applied to a portion of a page based on the location of a class value.">
       
    72                                             <a href="cssreset-context.html">Contextual Example</a>
       
    73                                         </li>
       
    74                                     
       
    75                                 
       
    76                             </ul>
       
    77                         </div>
       
    78                     </div>
       
    79                 
       
    80 
       
    81                 
       
    82             </div>
       
    83         </div>
       
    84     </div>
       
    85 </div>
       
    86 
       
    87 <script src="../assets/vendor/prettify/prettify-min.js"></script>
       
    88 <script>prettyPrint();</script>
       
    89 
       
    90 <script>
       
    91 YUI.Env.Tests = {
       
    92     examples: [],
       
    93     project: '../assets',
       
    94     assets: '../assets/cssreset',
       
    95     name: 'cssreset-context',
       
    96     title: 'Contextual Example',
       
    97     newWindow: 'true',
       
    98     auto:  false 
       
    99 };
       
   100 YUI.Env.Tests.examples.push('cssreset-basic');
       
   101 YUI.Env.Tests.examples.push('cssreset-context');
       
   102 
       
   103 </script>
       
   104 <script src="../assets/yui/test-runner.js"></script>
       
   105 
       
   106 
       
   107 
       
   108 </body>
       
   109 </html>