unocss.config.ts 1.0 KB

12345678910111213141516171819202122232425262728
  1. import {defineConfig, presetAttributify, presetUno} from 'unocss';
  2. export function createConfig({strict = true, dev = true} = {}) {
  3. return defineConfig({
  4. envMode: dev ? 'dev' : 'build', presets: [presetAttributify({strict}), presetUno()],
  5. theme: {
  6. colors: {
  7. 'primary': '#0e52e0',
  8. 'primary-light': '#e6f7ff',
  9. 'primary-dark': '#7e8186',
  10. 'primary-hover': '#40a9ff',
  11. 'primary-active': '#096dd9',
  12. 'primary-disabled': '#c6e2ff',
  13. 'primary-disabled-hover': '#c6e2ff',
  14. 'primary-disabled-active': '#c6e2ff',
  15. }
  16. },
  17. rules: [
  18. ['flex-important', {display: 'flex !important'}],
  19. ],
  20. shortcuts: {
  21. 'flow-node': 'w-full h-full relative text-14px bg-#fff border-2px border-#7e8186 border-solid rounded-8px',
  22. 'node-port': 'absolute w-10px h-10px rounded-full bg-#7e8186 top-1/2 border-2px border-solid border-#fff transition duration-300 hover:scale-150 origin-top hover:bg-#0e53e2'
  23. },
  24. });
  25. }
  26. export default createConfig();