Skip to content

⚙️Setting : 컬러 자동완성 및 우선순위#26

Merged
KongMezu merged 1 commit intodevelopfrom
fix/#25/color-pri-auto
Oct 16, 2025
Merged

⚙️Setting : 컬러 자동완성 및 우선순위#26
KongMezu merged 1 commit intodevelopfrom
fix/#25/color-pri-auto

Conversation

@KongMezu
Copy link
Contributor

@KongMezu KongMezu commented Oct 16, 2025

🔥 작업 내용

  • Tailwind 기본 컬러 보다 커스텀 컬러 우선순위
  • Tailwind 유틸리티 자동완성

🔗 이슈

PR Point (To Reviewer)

컬러 & 텍스트 자동완성

단순히 커스텀 유틸리티로 구분하면 Tailwind v4에서 config 파일을 사용하지 않기 때문에, Vscode IntelliSense가 인식을 못하는 문제가 있다 합니다.
원활한 작업을 위해...토큰 자동완성 되도록 설정해놨습니다.

컬러 우선순위 - 커스텀 컬러로 변경

Tailwind 내 기본 pink, gray가 색상이 겹쳐 커스텀 색상이 우선순위에서 밀리는 문제가 있어
!important 를 유틸리티에 추가해 우선순위가 되도록 했습니다.

🤔문제는 아니지만 해결하지 못한 부분

  1. 조금 거슬리는 것은 캡쳐본 보면..알다시피 컬러칩가 뜨지는 않습니다. 왜이런지는..잘
    작업하는데 거슬리면 해결해보겠습니다.
image
  1. pink, gray, red, blue 는 컬러칩은 뜹니다. Tailwind 기본 색상이라 오해할까봐 적어두면
    보시면 !important 를 적어둔 것이 적용된 걸 확인할 수 있습니다. (밑에 기본 Tailwind는 덮어씌어짐)
image

📸 피그마 스크린샷 or 기능 GIF

자동완성 뜹니다
image

image

Summary by CodeRabbit

  • Chores
    • Added VSCode configuration with Tailwind CSS intellisense and editor autocompletion enhancements.
    • Restructured stylesheet utility system architecture and declarations.

@vercel
Copy link

vercel bot commented Oct 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
af-fe Ready Ready Preview Comment Oct 16, 2025 9:44am

@github-actions github-actions bot added the setting 패키지 설치, 개발 설정 label Oct 16, 2025
@github-actions
Copy link

🏷️ Labeler has automatically applied labels based on your PR title, branch name, or commit message.
Please verify that they are correct before merging.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Walkthrough

A new VSCode settings file configures Tailwind CSS editor enhancements with improved autocompletion and language mapping. The global CSS file is refactored to replace CSS selector-based utilities with a Tailwind @utility-based system while preserving existing color, typography, and layout utilities.

Changes

Cohort / File(s) Summary
VSCode Configuration
.vscode/settings.json
New file adding Tailwind CSS editor settings: enables experimental classRegex for utility autocompletion, configures includeLanguages for javascript/typescript files, enables quickSuggestions in strings, and activates Tailwind emmet completions with editor preview.
Global Styling Refactor
src/styles/globals.css
Restructures utility definitions from CSS selectors (.bg-*, .text-*, font utilities) to Tailwind @Utility syntax. Updates imports to use single quotes and adds tailwindcss/preflight. Preserves semantic utility categories (mint, pink, gray, blue, red, background/foreground, font scales, layout, grid) with !important flags applied selectively.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

The changes require understanding of Tailwind's @Utility system syntax and verifying that class name consumption remains consistent across the codebase, but modifications are localized and follow clear structural patterns.

Possibly related PRs

Suggested labels

style

Suggested reviewers

  • skyblue1232
  • jjangminii

Poem

🐰 A rabbit's ode to tidy styles

With @Utility spells so new,
Tailwind's hints shine bright and true,
Colors mint and pink come through—
Hopping faster, code runs smooth! 🎨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The global CSS file has been completely restructured to use @Utility declarations and a full utilities refactor, which goes beyond the linked issue’s requirement to only adjust custom color priority and IntelliSense settings. Please limit CSS changes to adding !important for custom color utilities and revert the broader utilities rewrite or move it to a separate refactoring PR.
Description Check ⚠️ Warning The PR description includes the required section headings but still contains placeholder text under 🔥 작업 내용 and 🤔 추후 작업 사항, and the PR Point section does not follow the list format defined in the template. Please replace the placeholder entries under "### 🔥 작업 내용" and "### 🤔 추후 작업 사항" with actual details of the implemented features and upcoming tasks, and reformat the "PR Point (To Reviewer)" section as bulleted list items according to the repository’s description template.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly summarizes the main purpose of the changes by referencing custom color autocompletion and priority settings, which aligns directly with the PR’s objectives and gives teammates a quick understanding of the change.
Linked Issues Check ✅ Passed The changes implement the two primary objectives from issue #25 by adding VSCode settings for Tailwind IntelliSense autocompletion and updating CSS utilities with !important to ensure custom color priority.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/#25/color-pri-auto

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the comment 필요한 주석 추가 및 변경 label Oct 16, 2025
@github-actions
Copy link

🏷️ Labeler has automatically applied labels based on your PR title, branch name, or commit message.
Please verify that they are correct before merging.

@KongMezu KongMezu changed the title setting : 컬러 자동완성 및 우선순위 ⚙️setting : 컬러 자동완성 및 우선순위 Oct 16, 2025
@KongMezu KongMezu changed the title ⚙️setting : 컬러 자동완성 및 우선순위 ⚙️Setting : 컬러 자동완성 및 우선순위 Oct 16, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (4)
.vscode/settings.json (1)

6-14: Minor: fix Korean typo in comment

“동장할” → “동작할”.

-  // Tailwind 자동완성 동장할 매핑
+  // Tailwind 자동완성이 동작할 매핑
src/styles/globals.css (3)

1-2: Remove duplicate preflight import

@import 'tailwindcss' already includes preflight in v4; importing 'tailwindcss/preflight' again may duplicate resets.

-@import 'tailwindcss';
-@import 'tailwindcss/preflight';
+@import 'tailwindcss';

114-169: Using !important widely achieves priority but reduces flexibility

This guarantees custom colors win over core, but it weakens variant/specificity control and makes overrides harder. Prefer ordering/cascade where possible; keep !important to only conflicting tokens (e.g., gray, pink).

Would you consider limiting !important to only classes that shadow Tailwind core tokens?


195-199: Letter-spacing values look unusually large; confirm intent

E.g., text-headline-sm-serif uses letter-spacing: 1.2rem at 2rem size (very wide tracking). If not intentional, consider 0.12rem or em-based values.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de2d329 and e1bd6b5.

📒 Files selected for processing (2)
  • .vscode/settings.json (1 hunks)
  • src/styles/globals.css (2 hunks)

Comment on lines +2 to +5
"tailwindCSS.experimental.classRegex": [
// @utility 뒤에 오는 클래스 이름을 자동완성에 포함
["@utility\\s+([a-zA-Z0-9-_]+)", "([a-zA-Z0-9-_]+)"]
],
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

classRegex tuple is mis-specified; use a single-regex capture for @Utility names

The second regex will over-match tokens like “utility”, “bg”, “pink”, “100”. Use a single pattern that captures the class name after @Utility.

Apply:

-  "tailwindCSS.experimental.classRegex": [
-    ["@utility\\s+([a-zA-Z0-9-_]+)", "([a-zA-Z0-9-_]+)"]
-  ],
+  "tailwindCSS.experimental.classRegex": [
+    "@utility\\s+([a-zA-Z0-9-_]+)"
+  ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"tailwindCSS.experimental.classRegex": [
// @utility 뒤에 오는 클래스 이름을 자동완성에 포함
["@utility\\s+([a-zA-Z0-9-_]+)", "([a-zA-Z0-9-_]+)"]
],
// @utility 뒤에 오는 클래스 이름을 자동완성에 포함
"tailwindCSS.experimental.classRegex": [
"@utility\\s+([a-zA-Z0-9-_]+)"
],
🤖 Prompt for AI Agents
In .vscode/settings.json around lines 2 to 5, the
tailwindCSS.experimental.classRegex entry currently uses a two-regex tuple which
over-matches; replace it with a single regex capture that only captures the
class name that follows "@utility" (remove the second regex element), and ensure
the capture group allows valid Tailwind class characters (letters, numbers,
hyphen, underscore and common separators like ":" and "/") so only the intended
class token is returned for autocompletion.

@utility text-headline-md { font-size:2.8rem; font-weight:200; line-height:3.2rem; font-family: var(--font-sans); }
@utility text-headline-sm { font-size:2.4rem; font-weight:200; line-height:3.2rem; font-family: var(--font-sans); }

@utility text-title-lg { font-size:2.2rem; font-weight:400; line-height:1.75rem; font-family: var(--font-sans); }
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

text-title-lg line-height is smaller than font-size (clipping risk)

2.2rem font-size with 1.75rem line-height can crop glyphs and harm readability.

-@utility text-title-lg { font-size:2.2rem; font-weight:400; line-height:1.75rem; font-family: var(--font-sans); }
+@utility text-title-lg { font-size:2.2rem; font-weight:400; line-height:2.8rem; font-family: var(--font-sans); }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@utility text-title-lg { font-size:2.2rem; font-weight:400; line-height:1.75rem; font-family: var(--font-sans); }
@utility text-title-lg { font-size:2.2rem; font-weight:400; line-height:2.8rem; font-family: var(--font-sans); }
🤖 Prompt for AI Agents
In src/styles/globals.css around line 186 the utility definition sets font-size:
2.2rem with line-height: 1.75rem which is smaller than the font size and risks
clipping; update the rule to use a line-height at or above the font-size (e.g.,
a unitless multiplier like 1.15–1.25 or an explicit rem value ≥ 2.2rem) so
glyphs aren’t clipped and readability is preserved, and ensure the font-family
and weight remain unchanged.

@KongMezu KongMezu merged commit 0bcacd4 into develop Oct 16, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comment 필요한 주석 추가 및 변경 setting 패키지 설치, 개발 설정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[setting] 커스텀 컬러 우선순위 & 인텔리센스 자동완성 적용

2 participants