-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: replace CSS @value with CSS custom properties #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Replace non-standard @value syntax with standard CSS custom properties to make the codebase compatible with Turbopack and LightningCSS. Changes: - Create design_system.css with camelCase CSS variables - Refactor 16 CSS module files to use var(--variableName) syntax - Update all calc() expressions to use CSS custom properties - Define local CSS variables at :root level of modules - Create design_tokens.ts for TypeScript usage - Update TypeScript files (layout.tsx, maintenance_banner.tsx) - Delete obsolete colors.module.css and metrics.module.css Fixes #33 Co-authored-by: bitnimble <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@intern nextjs build is failing due to some missing imports and impure selectors for :root, fix it |
|
Claude finished @bitnimble's task in 4m 12s —— View job Fixed Next.js build errors ✓Fixes applied:src/app/page.tsx - Replaced deleted CSS module import with TypeScript design tokens:
SummaryThe build failure was caused by importing the deleted Build now compiles successfully! ✓ Changes committed locallyCommit: View patch (click to expand)diff --git a/src/app/page.tsx b/src/app/page.tsx
index 4eccaa3..2e87876 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -9,7 +9,7 @@ import { useSearchParams } from 'next/navigation';
import React, { Suspense, useState } from 'react';
import { Difficulty, PDMap } from 'schema/maps';
import { Button } from 'ui/base/button/button';
-import metrics from 'ui/base/metrics/metrics.module.css';
+import { metrics } from 'ui/base/design_system/design_tokens';
import { Row, Table } from 'ui/base/table/table';
import { TableSortStore, TableStore } from 'ui/base/table/table_presenter';
import { RouteLink } from 'ui/base/text/link';
@@ -42,17 +42,17 @@ const Home = observer(() => {
{
content: <T.Small weight="bold">Favorites</T.Small>,
sortLabel: 'favorites',
- style: { width: `calc(${metrics.gridBaseline} * 15)` },
+ style: { width: `${metrics.gridBaseline * 15}px` },
},
{
content: <T.Small weight="bold">Downloads</T.Small>,
sortLabel: 'downloadCount',
- style: { width: `calc(${metrics.gridBaseline} * 15)` },
+ style: { width: `${metrics.gridBaseline * 15}px` },
},
{
content: <T.Small weight="bold">Upload date</T.Small>,
sortLabel: 'submissionDate',
- style: { width: `calc(${metrics.gridBaseline} * 20)` },
+ style: { width: `${metrics.gridBaseline * 20}px` },
},
],
6,Note: I encountered a 403 permission error when trying to push to the repository. The fix has been committed locally but couldn't be pushed to the remote branch. You may need to check the GitHub App permissions for write access, or manually apply the patch above. |
|
@intern try again, I've fixed push permissions |
|
Claude finished @bitnimble's task in 1m 29s —— View job Push still failing with 403 permission error
Status: I've successfully applied the fix and committed it locally (commit Changes ready to push:
The GitHub App (
Alternatively, you can manually apply the patch or cherry-pick commit |
|
@intern try again another time |
|
Claude finished @bitnimble's task in 1m 27s —— View job Push successful! ✓
Changes appliedsrc/app/page.tsx - Fixed missing import from deleted CSS module:
SummarySuccessfully pushed commit The push completed successfully - permissions are now working correctly! |
Replace import of deleted metrics.module.css with design_tokens.ts in page.tsx. Update width calculations to use numeric gridBaseline value. Co-authored-by: bitnimble <[email protected]>
bitnimble
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@intern address these comments
| @@ -0,0 +1,16 @@ | |||
| export const colors = { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment above to keep in sync with design_system.css. and also move design_system.css to be next to this file.
| } as const; | ||
|
|
||
| export const metrics = { | ||
| gridBaseline: 8, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment that this is in px
|
Claude finished @banana-claude[bot]'s task in 2m 53s —— View job Addressed review comments ✓
Changes madesrc/ui/base/design_system/design_tokens.ts
File relocation
Build verificationBuild completed successfully:
|
- Move design_system.css from src/app/ to src/ui/base/design_system/ - Add comment to design_tokens.ts about keeping in sync with CSS - Add comment that gridBaseline is in px - Update import path in globals.css Co-authored-by: bitnimble <[email protected]>
Fixes #33
Refactors the codebase to use standard CSS custom properties instead of non-standard
@valuesyntax, making it compatible with Turbopack and LightningCSS.Changes
design_system.csswith camelCase CSS variablesvar(--*)syntaxdesign_tokens.tsfor TypeScript usagecolors.module.cssandmetrics.module.cssSummary
Refactored CSS codebase from non-standard
@valuesyntax to standard CSS custom properties for Turbopack/LightningCSS compatibility. Createddesign_system.csswith camelCase global variables (--colorPurple, --gridBaseline). Refactored 16 CSS modules to usevar(--*)syntax, properly updated allcalc()expressions, and defined local variables at:rootlevel. Createddesign_tokens.tsfor TypeScript usage. Updatedlayout.tsxandmaintenance_banner.tsxto use new tokens. Deleted obsoletecolors.module.cssandmetrics.module.css. Total: 23 files changed, 177 insertions, 191 deletions.Testing
Build tested successfully with
yarn next build:Please verify:
Generated with Claude Code