Skip to content

🔧 chore(gui,paint): css var adjustments#238

Open
SimonShiki wants to merge 2 commits into
dev/3.2from
fix/css-var
Open

🔧 chore(gui,paint): css var adjustments#238
SimonShiki wants to merge 2 commits into
dev/3.2from
fix/css-var

Conversation

@SimonShiki

Copy link
Copy Markdown
Member

Description

Adjust how gui/paint treat css variable stylesheets.

Proposed Changes

  1. Don't bundle css variable styles under library mode, and export these styles separately.
  2. Unify the modal header units between paint and gui.

Test Coverage

None

Additional Context

None

Signed-off-by: SimonShiki <sinangentoo@gmail.com>
@SimonShiki SimonShiki requested review from alexcui03 and Copilot May 30, 2026 04:47
@SimonShiki SimonShiki self-assigned this May 30, 2026
@SimonShiki SimonShiki added gui Things related to clipcc-gui. paint Things related to clipcc-paint. labels May 30, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 30, 2026

Copy link
Copy Markdown

Deploying clipcc-preview with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0896cf1
Status: ✅  Deploy successful!
Preview URL: https://71969b3a.clipcc-preview.pages.dev
Branch Preview URL: https://fix-css-var.clipcc-preview.pages.dev

View logs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts how the GUI and Paint packages handle CSS-variable stylesheets, aiming to avoid bundling those variable definitions in library builds and to align a shared sizing token between the two packages.

Changes:

  • Export src/css/*.css into dist/styles/ during library builds (GUI + Paint) via copy-webpack-plugin.
  • Move CSS variable imports out of component CSS modules and into the playground entry CSS files.
  • Align --clipcc-library-header-height in Paint to match GUI.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds copy-webpack-plugin for paint; lockfile metadata now flags @ungap/structured-clone@1.3.0 as deprecated (CWE note).
packages/paint/webpack.config.js Copies Paint src/css/*.css to dist/styles/ for library consumers.
packages/paint/src/playground/playground.css Imports Paint colors.css/units.css at the playground entry level.
packages/paint/src/css/units.css Updates --clipcc-library-header-height to 3.125rem (matching GUI).
packages/paint/src/components/paint-editor/paint-editor.css Removes imports of CSS-variable files from component CSS.
packages/paint/package.json Adds copy-webpack-plugin dev dependency.
packages/gui/webpack.config.js Copies GUI src/css/*.css to dist/styles/ for library consumers.
packages/gui/src/playground/index.css Imports GUI colors.css/units.css/z-index.css at the playground entry level; trims trailing whitespace.
packages/gui/src/components/gui/gui.css Removes imports of CSS-variable files from the main GUI CSS module.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1 to 3
.page-wrapper {
height: 100%;
}
Comment on lines +1 to +4
@import "../css/colors.css";
@import "../css/units.css";
@import "../css/z-index.css";

Comment on lines +293 to 301
// Export necessary CSS files for external use.
new CopyWebpackPlugin({
patterns: [
{
from: 'src/css/*.css',
to: 'styles/[name][ext]'
}
]
})
Comment on lines +110 to +120
plugins: base.plugins.concat([
// Export necessary CSS files for external use.
new CopyWebpackPlugin({
patterns: [
{
from: 'src/css/*.css',
to: 'styles/[name][ext]'
}
]
})
])
Comment thread pnpm-lock.yaml
Comment on lines 3388 to +3390
'@ungap/structured-clone@1.3.0':
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
deprecated: Potential CWE-502 - Update to 1.3.1 or higher
Signed-off-by: SimonShiki <sinangentoo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gui Things related to clipcc-gui. paint Things related to clipcc-paint.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants