版博士V2.0程序
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <h1 align='center'>vite-plugin-windicss</h1>
  2. <p align='center'><a href="https://github.com/voorjaar/windicss">Windi CSS</a> for Vite, it's fast! ⚡️<br>
  3. </p>
  4. <p align='center'>
  5. <a href='https://www.npmjs.com/package/vite-plugin-windicss'>
  6. <img src='https://img.shields.io/npm/v/vite-plugin-windicss?color=0EA5E9&label='>
  7. </a>
  8. </p>
  9. ## Features
  10. - ⚡️ **It's FAST** - 20~100x times faster than Tailwind on Vite
  11. - 🧩 On-demand CSS utilities (Fully compatible with Tailwind CSS v2)
  12. - 📦 On-demand native elements style reseting (preflight)
  13. - 🔥 Hot module replacement (HMR)
  14. - 🍃 Load configurations from `tailwind.config.js`
  15. - 🤝 Framework-agnostic - Vue, React, Svelte and vanilla!
  16. - 📄 CSS `@apply` / `@screen` directives transforms (also works for Vue SFC's `<style>`)
  17. - 🎳 Support Variant Groups - e.g. `bg-gray-200 hover:(bg-gray-100 text-red-300)`
  18. - 😎 ["Design in Devtools"](#design-in-devtools) - if you work this way in the traditional Tailwind, no reason we can't!
  19. ## Documentation
  20. Read the [documentation](https://windicss.org/integrations/vite.html) for more details.
  21. ## New Features in v3.0
  22. ### [Attributify Mode](https://windicss.org/posts/v30.html#attributify-mode)
  23. Enabled it by
  24. ```ts
  25. // windi.config.ts
  26. export default {
  27. attributify: true,
  28. }
  29. ```
  30. And use them as you would like:
  31. ```html
  32. <button
  33. bg="blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600"
  34. text="sm white"
  35. font="mono light"
  36. p="y-2 x-4"
  37. border="2 rounded blue-200"
  38. >
  39. Button
  40. </button>
  41. ```
  42. #### Prefix
  43. If you are concerned about naming confliction, you can add custom prefix to attributify mode by:
  44. ```ts
  45. // windi.config.ts
  46. export default {
  47. attributify: {
  48. prefix: 'w:',
  49. },
  50. }
  51. ```
  52. ```html
  53. <button
  54. w:bg="blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600"
  55. w:text="sm white"
  56. w:font="mono light"
  57. w:p="y-2 x-4"
  58. w:border="2 rounded blue-200"
  59. >
  60. Button
  61. </button>
  62. ```
  63. ### [Alias Config](https://windicss.org/posts/v30.html#alias-config)
  64. ```ts
  65. // windi.config.ts
  66. export default {
  67. alias: {
  68. 'hstack': 'flex items-center',
  69. 'vstack': 'flex flex-col',
  70. 'icon': 'w-6 h-6 fill-current',
  71. 'app': 'text-red',
  72. 'app-border': 'border-gray-200 dark:border-dark-300',
  73. },
  74. }
  75. ```
  76. ## Sponsors
  77. <p align="center">
  78. <a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
  79. <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
  80. </a>
  81. </p>
  82. ## License
  83. MIT License &copy; 2021 [Anthony Fu](https://github.com/antfu)