UNPKG

719 BJavaScriptView Raw
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = hideText;
5/**
6 * CSS to hide text to show a background image in a SEO-friendly way.
7 *
8 * @example
9 * // Styles as object usage
10 * const styles = {
11 * 'backgroundImage': 'url(logo.png)',
12 * ...hideText(),
13 * }
14 *
15 * // styled-components usage
16 * const div = styled.div`
17 * backgroundImage: url(logo.png);
18 * ${hideText()};
19 * `
20 *
21 * // CSS as JS Output
22 *
23 * 'div': {
24 * 'backgroundImage': 'url(logo.png)',
25 * 'textIndent': '101%',
26 * 'overflow': 'hidden',
27 * 'whiteSpace': 'nowrap',
28 * }
29 */
30function hideText() {
31 return {
32 textIndent: '101%',
33 overflow: 'hidden',
34 whiteSpace: 'nowrap'
35 };
36}
37module.exports = exports.default;
\No newline at end of file