You need to sign in or sign up before continuing.
_tooltips.less 7.88 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
// /**
//  * Copyright © Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//  # Tooltips
//
//  Magento UI library provides 4 tooltip types:
//  ```css
//  top
//  bottom
//  left
//  right
//  ```
//
//  ```html
//Lorem Ipsum is simply <span class="example-tooltip-bottom"><a href="#" aria-describedby="tooltip-1">dummy</a><span class="tooltip-content" id="tooltip-1" role="tooltip">Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</span></span> 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 <span class="example-tooltip-left"><a href="#" aria-describedby="tooltip-2">galley</a><span class="tooltip-content" id="tooltip-2" role="tooltip">Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</span></span> of type and scrambled it to make a type specimen book. It has survived <span class="example-tooltip-right"><a href="#" aria-describedby="tooltip-3">not</a><span class="tooltip-content" id="tooltip-3" role="tooltip">Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</span></span> 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 <span class="example-tooltip-top"><a href="#" aria-describedby="tooltip-4">software</a><span class="tooltip-content" id="tooltip-4" role="tooltip">Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</span></span> like Aldus PageMaker including versions of Lorem Ipsum.
//  ```

.example-tooltip-bottom {
    .lib-tooltip(bottom);
}

.example-tooltip-left {
    .lib-tooltip(left);
}

.example-tooltip-right {
    .lib-tooltip(right);
}

.example-tooltip-top {
    .lib-tooltip(top);
}

//  # Tooltips 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>@_tooltip-position</th>
//            <td>-</td>
//            <td class="vars_value">top</td>
//            <td class="vars_value">top | right | bottom | left</td>
//            <td>Side of the element tooltip is displayed on</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-selector-toggle</th>
//            <td>-</td>
//            <td class="vars_value">~".tooltip-toggle"</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>The class name of the element that toggles tooltip</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-selector-content</th>
//            <td>-</td>
//            <td class="vars_value">~".tooltip-content"</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>The tooltip content class name</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-background</th>
//            <td>@tooltip__background</td>
//            <td class="vars_value">@color-white</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip background color</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-border-color</th>
//            <td>@tooltip__border-color</td>
//            <td class="vars_value">#bbb</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip border color</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-border-width</th>
//            <td>@tooltip__border-width</td>
//            <td class="vars_value">1px</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip border width</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-border-radius</th>
//            <td>@tooltip__border-radius</td>
//            <td class="vars_value">false</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip border radius</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-color</th>
//            <td>@tooltip__color</td>
//            <td class="vars_value">@primary__color</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip text color</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-cursor</th>
//            <td>@tooltip__cursor</td>
//            <td class="vars_value">help</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip cursor</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-font-size</th>
//            <td>@tooltip__font-size</td>
//            <td class="vars_value">false</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip font size</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-font-family</th>
//            <td>@tooltip__font-family</td>
//            <td class="vars_value">false</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip font family</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-font-weight</th>
//            <td>@tooltip__font-weight</td>
//            <td class="vars_value">false</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip font weight</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-font-style</th>
//            <td>@tooltip__font-style</td>
//            <td class="vars_value">false</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip font style</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-line-height</th>
//            <td>@tooltip__line-height</td>
//            <td class="vars_value">1.4</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip line height</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-margin</th>
//            <td>@tooltip__margin</td>
//            <td class="vars_value">false</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip margin</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-padding</th>
//            <td>@tooltip__padding</td>
//            <td class="vars_value">12px 16px</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip padding</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-min-width</th>
//            <td>@tooltip__min-width</td>
//            <td class="vars_value">210px</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip minimal width</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-max-width</th>
//            <td>@tooltip__max-width</td>
//            <td class="vars_value">360px</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip maximal width</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-arrow-size</th>
//            <td>@tooltip-arrow__size</td>
//            <td class="vars_value">5px</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip arrow size</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-arrow-offset</th>
//            <td>@tooltip-arrow__offset</td>
//            <td class="vars_value">10px</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip arrow offset</td>
//        </tr>
//        <tr>
//            <th>@_tooltip-z-index</th>
//            <td>@tooltip__z-index</td>
//            <td class="vars_value">100</td>
//            <td class="vars_value">'' | false | value</td>
//            <td>Tooltip z-index</td>
//        </tr>
//    </table>
//  </pre>