index.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <title>polished | A lightweight toolset for writing styles in JavaScript</title>
  6. <meta name='viewport' content='width=device-width,initial-scale=1'>
  7. <meta name="description" content="A lightweight toolset for writing styles in JavaScript." />
  8. <!-- Twitter Card data -->
  9. <meta name="twitter:card" content="summary_large_image">
  10. <meta name="twitter:site" content="@b_hough">
  11. <meta name="twitter:title" content="✨ polished | A lightweight toolset for writing styles in JavaScript">
  12. <meta name="twitter:description" content="A lightweight toolset for writing styles in JavaScript.">
  13. <meta name="twitter:creator" content="@b_hough">
  14. <meta name="twitter:image" content="/assets/meta.png">
  15. <!-- Open Graph data -->
  16. <meta property="og:title" content="✨ polished | A lightweight toolset for writing styles in JavaScript" />
  17. <meta property="og:type" content="article" />
  18. <meta property="og:url" content="https://styled-components.com/color-schemer/" />
  19. <meta property="og:image" content="/assets/meta.png" />
  20. <meta property="og:description" content="A lightweight toolset for writing styles in JavaScript." />
  21. <meta property="og:site_name" content="✨ polished" />
  22. <link href='/assets/bass.css' type='text/css' rel='stylesheet' />
  23. <link href='/assets/github.css' type='text/css' rel='stylesheet' />
  24. <link href='/assets/style.css' type='text/css' rel='stylesheet' />
  25. <link rel="shortcut icon" href="/favicon.png" />
  26. </head>
  27. <body class='home'>
  28. <header class="header">
  29. <img src="/assets/logo.svg" alt="polished" class="logo" />
  30. <h2 class="subtitle">A lightweight toolset for writing styles in JavaScript</h2>
  31. <a class="button" href="https://github.com/styled-components/polished"><img src="/assets/GitHub-Mark-Light-64px.png" />View on GitHub</a>
  32. <a class="button" href="/docs/">Docs</a>
  33. <h3>Installation</h3>
  34. <div class="installation">
  35. <code class="command">npm install --save polished</code>
  36. </div>
  37. <h3>Usage</h3>
  38. <div class="usage">
  39. <code class="javascript">import { lighten, modularScale } from 'polished'</code>
  40. </div>
  41. <h3>Open the console and play around with it!</h3>
  42. <div class="repl">
  43. <pre class="repl__input"><code>const styles = {
  44. color: <span class="repl__func">lighten(0.2, '#000')</span>,
  45. "font-size": <span class="repl__func">modularScale(1)</span>,
  46. [<span class="repl__func">hiDPI(1.5)</span>]: {
  47. "font-size": <span class="repl__func">modularScale(1.25)</span>
  48. }
  49. }</code></pre>
  50. <pre class="repl__output"><code>const styles = {
  51. color: <span class="repl__func">'#333'</span>,
  52. "font-size": <span class="repl__func">'1.33em'</span>,
  53. <span class="repl__func">'@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5/1), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx)'</span>: {
  54. "font-size": <span class="repl__func">'1.66625em'</span>,
  55. }
  56. }</code></pre>
  57. </div>
  58. </header>
  59. <footer class="footer">
  60. <p>Made by <a href="https://github.com/bhough">@bhough</a>, <a href="https://github.com/mxstbr">@mxstbr</a>, <a href="https://github.com/nikgraf">@nikgraf</a> and our <a href="https://github.com/styled-components/polished/graphs/contributors">awesome contributors</a>.</p>
  61. </footer>
  62. <script defer src="/assets/polished.js"></script>
  63. <script defer src="/assets/script.js"></script>
  64. <img src="https://static.scarf.sh/a.png?x-pxid=8ab52548-9fc9-4161-9e8f-d122cdb6c880" />
  65. </body>
  66. </html>