_loaders.less 9.69 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
// /**
//  * Copyright © Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//  #  Loaders
//  A page loader is an animation a visitor sees while the page or an element is loaded. During this time a page is blocked with overlay.
//
//  Default loader markup
//
//  <pre>
//  <code>
//  &lt;div id="example1" class="loader" data-text="Please wait..." style="display: none;"&gt;
//  &lt;/div&gt;
//  </code>
//  </pre>
//  ```html
//  <div>
//  <div id="example1" class="loader" data-text="Please wait..." style="display: none;"></div>
//  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
//  </div>
//  <button type="button" onclick="document.getElementById('example1').style='display: block;';document.getElementById('example1').parentNode.setAttribute('aria-busy','true');" style="z-index:99999; position: relative;"><span>Show</span></button>
//  <button type="button" onclick="document.getElementById('example1').style='display: none;';document.getElementById('example1').parentNode.setAttribute('aria-busy','false');" style="z-index:99999; position: relative;"><span>Hide</span></button>
//  ```
//

.loader {
    .lib-loader();
}

//  # Default loader variables
//
//  <pre>
//    <table>
//      <tr>
//        <th class="vars_head">Mixin variable</th>
//        <th class="vars_head">Global variable</th>
//        <th class="vars_head">Default value</th>
//        <th class="vars_head">Allowed values</th>
//        <th class="vars_head">Comment</th>
//      </tr>
//      <tr>
//        <th>@_loader-overlay-background-color</th>
//        <td>@loader-overlay__background-color</td>
//        <td class="vars_value">rgba(255, 255, 255, .5)</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader overlay background color</td>
//      </tr>
//      <tr>
//        <th>@_loader-overlay-z-index</th>
//        <td>@loader-overlay__z-index</td>
//        <td class="vars_value">9999</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader overlay background z-index</td>
//      </tr>
//      <tr>
//        <th>@_loader-icon-width</th>
//        <td>@loader-icon__width</td>
//        <td class="vars_value">160px</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader icon width</td>
//      </tr>
//      <tr>
//        <th>@_loader-icon-height</th>
//        <td>@loader-icon__height</td>
//        <td class="vars_value">160px</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader icon height</td>
//      </tr>
//      <tr>
//        <th>@_loader-icon-background-color</th>
//        <td>@loader-icon__background-color</td>
//        <td class="vars_value">transparent</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader icon background color</td>
//      </tr>
//      <tr>
//        <th>@_loader-icon-background-image</th>
//        <td>@loader-icon__background-image</td>
//        <td class="vars_value">url('@{baseDir}images/loader-2.gif')</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader icon ackground image</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-icon-background-position</th>
//        <td>@loader-icon__background-position</td>
//        <td class="vars_value">50% 50%</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader icon background position</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-icon-border-radius</th>
//        <td>@loader-icon__border-radius</td>
//        <td class="vars_value">5px</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader icon border radius</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-icon-padding</th>
//        <td>@loader-icon__padding</td>
//        <td class="vars_value">''</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader icon icon padding</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-text</th>
//        <td>@loader-text</td>
//        <td class="vars_value">false</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader text presence</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-text-color</th>
//        <td>@loader-text__color</td>
//        <td class="vars_value">@primary__color</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader text color</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-text-font-size</th>
//        <td>@loader-text__font-size</td>
//        <td class="vars_value">@font-size__base</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader text font size</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-text-font-family</th>
//        <td>@loader-text__font-family</td>
//        <td class="vars_value">@font-family__base</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader text font family</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-text-font-weight</th>
//        <td>@loader-text__font-weight</td>
//        <td class="vars_value">@font-weight__regular</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader text font weight</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-text-font-style</th>
//        <td>@loader-text__font-style</td>
//        <td class="vars_value">@font-style__base</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader text font style</td>
//      </tr>
//      <tr>
//        <th nowrap="nowrap">@_loader-text-padding</th>
//        <td>@loader-text__padding</td>
//        <td class="vars_value">130px 0 0</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loader text padding</td>
//      </tr>
//    </table>
//  </pre>
//

//  #  Loading
//  Loading is an animation a visitor sees while a certain block is loaded. In this case only this block is locked by an overlay, not the whole page.
//
//  ```html
//  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
//  <p id="example2">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
//  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
//  <button type="button" onclick="document.getElementById('example2').className='loading';document.getElementById('example2').setAttribute('aria-busy','true');" style="z-index:99999; position: relative;"><span>Show</span></button>
//  <button type="button" onclick="document.getElementById('example2').className='';document.getElementById('example2').setAttribute('aria-busy','false');" style="z-index:99999; position: relative;"><span>Hide</span></button>
//  ```

.loading {
    .lib-loading();
}

// # Loading default variables
//
//  <pre>
//    <table>
//      <tr>
//        <th class="vars_head">Mixin variable</th>
//        <th class="vars_head">Global variable</th>
//        <th class="vars_head">Default value</th>
//        <th class="vars_head">Allowed values</th>
//        <th class="vars_head">Comment</th>
//      </tr>
//      <tr>
//        <th>@_loading-background-color</th>
//        <td>@loading__background-color</td>
//        <td class="vars_value">@loader-overlay__background-color</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loading overlay background color</td>
//      </tr>
//      <tr>
//        <th>@_loading-background-image</th>
//        <td>@loading__background-image</td>
//        <td class="vars_value">@loader-icon__background-image</td>
//        <td class="vars_value">'' | false | value</td>
//        <td>Loading overlay background z-index</td>
//      </tr>
//    </table>
//  </pre>