Skip to content

Conversation

yashuatla
Copy link
Owner

@yashuatla yashuatla commented Jun 24, 2025

PR Summary

UnoCSS Enhancements and Code Refactoring

Overview

This PR includes multiple enhancements to UnoCSS, including new CSS utility classes for alignment properties, additional icon libraries, a new CoolLabs font provider, improved URL handling in the Inspector, and various code refactoring changes.

Change Types

Type Description
Enhancement Added new CSS utility classes for alignment properties
Enhancement Added new icon libraries to preset-icons
Enhancement Added CoolLabs font provider to web-fonts preset
Enhancement Improved URL generation logic in UnoCSS Inspector
Refactor Moved calcMaxWidthBySize function to @unocss/rule-utils
Refactor Refactored pseudo-class variant handling
Bugfix Fixed CSS variable naming in preset-wind4
Feature Added Next.js integration navigation item
Style Code formatting and indentation improvements
Test Added new test cases for pseudo variants and layer exclusion

Affected Modules

Module / File Change Description
.vitepress/config.ts Added Next.js integration navigation item
inspector/src/index.ts Improved URL generation logic for handling trailing slashes
preset-icons/src/collections.ts Added new icon libraries including dinkie-icons and streamline collections
preset-mini/src/_rules/position.ts Added multiple new CSS utility classes for alignment properties
preset-mini/src/_variants/ Refactored variant handling and supports queries
preset-web-fonts/src/ Added CoolLabs font provider implementation
preset-wind4/src/preflights/reset.ts Fixed CSS variable naming from '--defaults-' to '--default-'
preset-wind4/src/rules/ Enhanced typography utilities and shadow handling
rule-utils/ Added pseudo variant functionality
core/, postcss/, vite/ Various code formatting and refactoring changes

Notes for Reviewers

  • The refactoring of pseudo-class variant handling maintains the same API while moving implementation to '@unocss/rule-utils'
  • CSS variable renaming in preset-wind4 fixes inconsistencies in naming patterns
  • Type definitions have been adjusted in multiple files to improve code consistency

Additional Context

  • Added test cases for the new pseudo variants functionality and layer exclusion feature
  • Added TypeScript ignore comments in vite/src/modes/chunk-build.ts to handle Rollup vs rolldown type differences

zyyv and others added 25 commits May 30, 2025 13:45
…#4698)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris <[email protected]>
import type { Root } from 'postcss'
import { calcMaxWidthBySize } from '@unocss/rule-utils'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐛 Correctness Issue

Addition of required function import.

The calcMaxWidthBySize function import has been added, which is necessary for the code to function properly.

Proposed Code:

import { calcMaxWidthBySize } from '@unocss/rule-utils'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.