Skip to content

Add custom css variables to Brand Guide#4944

Open
burieberry wants to merge 1 commit into
mainfrom
cs-11244-add-customcss-brand-guide
Open

Add custom css variables to Brand Guide#4944
burieberry wants to merge 1 commit into
mainfrom
cs-11244-add-customcss-brand-guide

Conversation

@burieberry
Copy link
Copy Markdown
Contributor

@burieberry burieberry commented May 22, 2026

Add "custom css variables" section to Brand Guide card after the custom brand colors section. Custom variables section will display the combination of all custom vars specific to this brand guide.

Edit:
custom-css-edit

View:
custom-css-display

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

Preview deployments

Host Test Results

    1 files      1 suites   1h 48m 16s ⏱️
2 728 tests 2 713 ✅ 15 💤 0 ❌
2 747 runs  2 732 ✅ 15 💤 0 ❌

Results for commit 4afd581.

Realm Server Test Results

    1 files      1 suites   10m 25s ⏱️
1 482 tests 1 482 ✅ 0 💤 0 ❌
1 573 runs  1 573 ✅ 0 💤 0 ❌

Results for commit 4afd581.

@burieberry burieberry marked this pull request as ready for review May 22, 2026 21:02
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4afd58186d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/base/brand-guide.gts
@burieberry burieberry requested a review from a team May 22, 2026 21:50
@habdelra habdelra requested a review from Copilot May 22, 2026 21:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “Custom CSS Variables” section to the Brand Guide card to present (and copy) a consolidated set of brand-specific CSS variables, combining palette-derived variables and user-defined custom variables.

Changes:

  • Introduces CustomCssVariable field type and includes its entries in Brand Guide computed cssVariables.
  • Adds a new Brand Guide dashboard section (custom-css) that renders palette variable rows + custom variable rows and provides a copy-to-clipboard button.
  • Adds integration tests for section visibility, name normalization, filtering behavior, and computed CSS output.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/host/tests/integration/components/brand-guide-custom-css-test.gts Adds integration coverage for the new Brand Guide “custom-css” section behavior.
packages/base/structured-theme.gts Renames the “Import Custom CSS” section title to “Import CSS”.
packages/base/brand-guide.gts Implements the new Brand Guide section/UI, adds CustomCssVariable, and merges custom vars into computed CSS variables.

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

Comment on lines +398 to +411
{{#each @model.customCssVariables as |cssVar|}}
{{#if cssVar.name}}
<dt class='var-row' data-test-brand-guide-css-var>
<code
data-test-brand-guide-css-var-name
>{{buildCssVariableName cssVar.name}}</code>
</dt>
<dd class='var-row'>
<code
class='css-var-value'
data-test-brand-guide-css-var-value
>{{cssVar.value}}</code>
</dd>
{{/if}}
Comment on lines +913 to +917
.filter((color) => color.name)
.map((color) => ({
color,
varName: buildCssVariableName(color.name!),
colorValue: paletteRules.get(color.name!) ?? '',
Comment on lines +932 to +937
for (let cssVar of this.args.model?.customCssVariables ?? []) {
let name = cssVar.name?.trim();
let value = cssVar.value?.trim();
if (name && value) {
lines.push(`${buildCssVariableName(name)}: ${value};`);
}
Comment on lines 51 to 55
{
id: 'import-css',
navTitle: 'Import CSS',
title: 'Import Custom CSS',
title: 'Import CSS',
fieldName: null,
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.

2 participants