• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdesign

ui-theme-designer-design-tokens

プラグイン
ui-theme-designer
ソース
GitHub で見る ↗
説明

**TRIGGER(このスキルが対応する質問):** SAP Design System(SAP社の統一的なデザイン基準)とSAP Fioriデザイントークン(UIの見た目を定義する値)についての質問。具体的には: - どのようなテーマが存在するか - 特定のテーマパラメータ(例:sapButton_Background、sapHighlightColor)が各テーマでどのような値を持つか - パラメータがテーマチェーン(テーマの継承構造)でどのように継承・拡張されるか - 特定のUIコンポーネント(UI5コントロール、UI5ウェブコンポーネント、Fundamental Stylesコンポーネント)がどのパラメータを使用しているか **SKIP(対応しない質問):** UI Theme Designer製品についての使い方に関する質問(テーマの作成、公開、移行など)。 → これらはui-theme-designer-helpを使用してください。

原文を表示

TRIGGER: questions about the SAP Design System and SAP Fiori design tokens — which themes exist, what value a theme parameter (e.g. sapButton_Background, sapHighlightColor) has in a given theme, how parameters inherit/extend across the theme chain, which parameters a specific UI component (UI5 control, UI5 Web Component, Fundamental Styles component) consumes. SKIP: how-to questions about UI theme designer as a product (creating, publishing, transporting themes — use ui-theme-designer-help).

ユースケース
  • SAP Design Systemのテーマ体系を確認するとき
  • デザイントークンの値をテーマごとに調べるとき
  • テーマ継承構造を理解したいとき
  • UIコンポーネントの使用パラメータを確認するとき
本文(日本語訳)

デザイン トークン

$THIS はこのSKILL.mdファイルを含むフォルダです:

前提条件

$THIS/node_modules/ が存在し、作成から7日以内である必要があります。そうでない場合は cd $THIS && npm ci を実行してください。

背景説明

デザイン トークンはテーマ基盤コンテンツのLESSファイルで定義され、異なるフレームワーク(UI技術)のLESSおよびCSSファイルで使用されます。$THIS/node_modules/ には以下のものが含まれています:

  • UI5:($LIBRARY は例えば sap.ui.core、$THEME は例えば sap_horizon)

    • $THIS/node_modules/@openui5/$LIBRARY/src/${LIBRARY/./\//}/**/themes/base に各ライブラリの基本テーマが含まれます
    • $THIS/node_modules/@openui5/themelib_$THEME/src/${LIBRARY/./\//}/themes/ に各ライブラリの $THEME が含まれます
  • UI5 ウェブ コンポーネント:($THEME は例えば sap_horizon、$COMPONENT は例えば Button)

    • $THIS/node_modules/@ui5/*/src/themes/$COMPONENT.css はテーマに依存しないコンポーネント基本CSSを含みます。テーマ基盤コンテンツのパラメータをCSS変数として、および base/ で定義されたCSS変数を使用します(以下を参照)
    • $THIS/node_modules/@ui5/*/src/themes/base/$COMPONENT-parameters.css はコンポーネント用のCSS変数定義を含みます。UI5 ウェブ コンポーネント固有の内部CSS変数は報告しないでください
    • $THIS/node_modules/@ui5/*/src/themes/$THEME/$COMPONENT-parameters.css には base/ のCSS変数定義に対するテーマ依存値が含まれます(上記を参照)
  • ファンダメンタル スタイル:

    • $THIS/node_modules/fundamental-styles/dist/*.css はテーマに依存しないコンポーネント基本CSSを含みます。テーマ基盤コンテンツのパラメータをCSS変数として、および theming/ で定義されたCSS変数を使用します(以下を参照)
    • $THIS/node_modules/fundamental-styles/dist/theming/$THEME.css には dist/*.css で使用されるCSS変数定義に対するテーマ依存値が含まれます(上記を参照)。ファンダメンタル スタイル固有の内部CSS変数は報告しないでください
    • $THIS/node_modules/@fundamental-styles/common-css/dist/*.css テーマに依存しないヘルパーCSS。テーマ基盤コンテンツのパラメータをCSS変数として使用します
  • ベース:($LIBRARY は例えば baseLib、$THEME は例えば sap_horizon)

    • $THIS/node_modules/@sap-theming/theming-base-content/content は以下で説明されているテーマリポジトリです(https://raw.githubusercontent.com/SAP-docs/btp-ui-theme-designer/main/docs/cf/About-Themes/overview-of-sap-theming-content-91ebfe2.md)。`Base/` を含み、全フレームワークで使用されます
    • $THIS/node_modules/@sap-theming/theming-base-content/content/Base/.theming は Base フレームワークのメタデータを含みます
    • $THIS/node_modules/@sap-theming/theming-base-content/content/Base/$LIBRARY/.theming はライブラリのメタデータを含みます
    • $THIS/node_modules/@sap-theming/theming-base-content/content/Base/$LIBRARY/$THEME/.theming はテーマのメタデータを含みます
    • メタデータは以下を含みます
      • sEntity:「Framework」「Library」または「Theme」
      • sType(テーマ用):「STANDARD」(単一テーマ)または「SET」(CSS不要。sType=STANDARD の異なるテーマへの参照のみ)
      • aFiles:LESSソースファイル
      • aBuildFiles:aFiles からビルドされたCSSファイル
      • *sBase{Library,Theme,File}Id:最も重要なライブラリ・テーマ・ファイルのID
      • oExtends:親エンティティの $FRAMEWORK[.$LIBRARY[.$THEME[.$FILE]]] 「オブジェクト パス」
      • sSourcePathPattern:オブジェクト パスをファイル パスに解決するパターン
      • (オプション)bIgnore=true:エンティティはテーマから無視されます

手順

  1. ユーザーの質問が対象とするSAPテーマを特定します。不明な場合は、$THIS/node_modules/@sap-theming/theming-base-content/content/Base/baseLib から利用可能なテーマIDを選択肢として提示します。デフォルトは sap_horizon です

  2. ユーザーの質問が対象とするフレームワークを特定します。不明な場合は「背景説明」のフレームワークを選択肢として提示し、以下のデフォルトを適用します:

    1. フレームワークが明記されている場合: そのフレームワークを使用
    2. コンポーネントが明記されているがフレームワークが未明記の場合:
      1. UI5 ウェブ コンポーネント内でそのコンポーネント用のCSSファイルを検索します。見つかった場合は UI5 ウェブ コンポーネント を主要ソースとして使用
      2. さらにベース内で sap$COMPONENT_* に一致するパラメータを検索します。UI5 ウェブ コンポーネント CSS内で既に参照されていないそのようなパラメータは補足情報として報告し、「テーマ基盤コンテンツで定義されているが、UI5 ウェブ コンポーネント CSSではまだ参照されていない」というラベルを付けます
    3. コンポーネント未明記、フレームワークも未明記の場合: ベースを使用
  3. ユーザーの質問が対象とするフレームワークの .theming ファイルを読み取り、sBaseLibraryId と sSourcePathPattern を特定します

  4. ステップ3で特定したフレームワークの .theming ファイルの sSourcePathPattern に基づいて、当該フレームワークのベース ライブラリのテーマの .theming ファイルを読み取ります

  5. oExtends が存在する限り、以下を繰り返します:

    1. oExtends で参照されているテーマの .theming ファイルを読み取ります。以前にそのフレームワーク(オブジェクト パスの最初のセクション)に遭遇していない場合は、先にフレームワーク .theming を読み取り、その sSourcePathPattern を特定します
    2. .theming JSONをテーマ .theming ファイルから既に取得したものとマージします。キーが既に存在する場合は変更しません。キーがまだ存在しない場合はキーと値を追加します
  6. マージされた .theming ファイル内で ${sBaseFileId}.less ファイル(sBaseFileId はマージされた .theming ファイルから取得)を読み取ります

  7. 各LESS @import ステートメントについて、再帰的に以下を実行します:

    1. 参照されているLESSファイルを読み取ります
    2. @import ステートメントを読み取った内容に置き換えます
  8. マージされたLESSファイル内で、パラメータ定義の直前の行 // [<Annotation> <required: Value> <optional: More Values>] をそのパラメータにマップします:

    1. パラメータが複数回定義されている場合は、それらのアノテーション(注釈)をマージします
    2. アノテーションが既に存在する場合は、値を既存のアノテーション値に追加します
    3. アノテーションに「反対値」がある場合(同じ値だが「!」で始まる。例:「Protected」と「!Protected」)は、その両方の値を値リストから削除します
    4. アノテーション値リストが空の場合は、アノテーションを削除します
  9. ユーザーが「UI5 ウェブ コンポーネント」を対象としている場合、関連する各コンポーネントについて3つのCSSソースを調べます:

    1. webcomponents/packages/*/src/themes/<component>.css のテーマに依存しないスケルトンとマージし、
    2. 常に使用されるベース パラメータ webcomponents/packages/*/src/themes/base/<component>-parameters.css とマージした後、
    3. webcomponents/packages/*/src/themes/<theme>/<component>-parameters.css のテーマ固有の差分とマージします
  10. ユーザーが「ファンダメンタル スタイル」を対象としている場合、関連するコンポーネントについて fundamental-styles/packages/*/src/**/*.scss を検索します。テーマ固有の値は theming-base-content/content/Base/baseLib/<theme>/css_variables.css のCSS変数から取得します

  11. 収集した情報に基づいてユーザーの質問に答えます

原文(English)を表示

Design Tokens

With $THIS being the folder that contains this SKILL.md:

Prerequisite

$THIS/node_modules/ exists and is not older than 7 days; if not: cd $THIS && npm ci

Context

Design Tokens are defined in LESS files of the theming-base-content, and consumed in LESS and CSS files of different frameworks (= UI technologies). In $THIS/node_modules/ you find the following:

  • UI5: (with $LIBRARY being e.g. sap.ui.core, and $THEME being e.g. sap_horizon)
    • $THIS/node_modules/@openui5/$LIBRARY/src/${LIBRARY/./\//}/**/themes/base contains the baseTheme of the different libraries
    • $THIS/node_modules/@openui5/themelib_$THEME/src/${LIBRARY/./\//}/themes/ contains the $THEME of the different libraries
  • UI5 Web Components: (with $THEME being e.g. sap_horizon, and $COMPONENT being e.g. Button)
    • $THIS/node_modules/@ui5/*/src/themes/$COMPONENT.css contains theme-independent component skeleton CSS, using parameters from theming-base-content as CSS custom properties, as well as CSS custom properties defined in base/ (see below)
    • $THIS/node_modules/@ui5/*/src/themes/base/$COMPONENT-parameters.css contains CSS custom property definitions for components; never report those UI5 Web Components-specific internal CSS custom properties.
    • $THIS/node_modules/@ui5/*/src/themes/$THEME/$COMPONENT-parameters.css contains theme-dependent values for the custom property definitions from base/ (see above)
  • Fundamental Styles:
    • $THIS/node_modules/fundamental-styles/dist/*.css contains theme-independent component skeleton CSS, using parameters from theming-base-content as CSS custom properties, as well as CSS custom properties defined in theming/ (see below)
    • $THIS/node_modules/fundamental-styles/dist/theming/$THEME.css contains theme-dependent values for the custom property definitions used in dist/*.css (see above); never report those Fundamental Styles-specific internal CSS custom properties
    • $THIS/node_modules/@fundamental-styles/common-css/dist/*.css theme-independent helper CSS, using parameters from theming-base-content as CSS custom properties
  • Base: (with $LIBRARY being e.g. baseLib, and $THEME being e.g. sap_horizon)
    • $THIS/node_modules/@sap-theming/theming-base-content/content is a theme repository as described in https://raw.githubusercontent.com/SAP-docs/btp-ui-theme-designer/main/docs/cf/About-Themes/overview-of-sap-theming-content-91ebfe2.md, containing Base/; used by all frameworks
    • $THIS/node_modules/@sap-theming/theming-base-content/content/Base/.theming contains metadata about the Base framework
    • $THIS/node_modules/@sap-theming/theming-base-content/content/Base/$LIBRARY/.theming contains metadata about libraries
    • $THIS/node_modules/@sap-theming/theming-base-content/content/Base/$LIBRARY/$THEME/.theming contains metadata about themes
    • Metadata includes
      • sEntity: "Framework", "Library" or "Theme"
      • sType (for themes): "STANDARD" (= single theme) or "SET" (= no CSS, just references to different themes of sType=STANDARD)
      • aFiles: LESS source files
      • aBuildFiles: CSS files built from aFiles
      • *sBase{Library,Theme,File}Id: ID of the most important library/theme/file
      • oExtends: the $FRAMEWORK[.$LIBRARY[.$THEME[.$FILE]]] "object path" of the parent entity
      • sSourcePathPattern: pattern to resolve object paths to file paths
      • (optional) bIgnore=true: entity is ignored from theming

Procedure

  1. Determine the SAP theme the users question targets, present the available theme IDs from $THIS/node_modules/@sap-theming/theming-base-content/content/Base/baseLib as select options if unclear, default to sap_horizon
  2. Determine the framework the user's question targets. Present the frameworks from "Context" as select options if unclear, applying these defaults:
    1. framework stated: use that
    2. component stated, no framework:
      1. search UI5 Web Components for a CSS file for the component; if found use UI5 Web Components as primary source
      2. additionally search Base for parameters matching sap$COMPONENT_*: report any such parameters not already referenced in UI5 Web Components as supplementary, labelled "defined in theming-base-content, not yet referenced in UI5 Web Components CSS"
    3. no component, no framework: use Base
  3. Read the .theming file of the framework the users question targets, determine sBaseLibraryId and sSourcePathPattern
  4. Read the .theming file of the theme of the sBaseLibrary of the framework the users question targets, based on sSourcePathPattern of the frameworks .theming file
  5. While there is an oExtends:
    1. Read the .theming file of the theme referenced by oExtends; if you haven't encountered the framework (the first section of the Object Path) before, read the framework .theming first to determine its sSourcePathPattern
    2. Merge the .theming JSON with what you already have from the theme .theming files: if a key already exists, leave it untouched; add key+value if the key does not yet exist
  6. Read the ${sBaseFileId}.less file (sBaseFileId comes from the merged .theming files) of the theme of the sBaseLibrary of the framework the users question targets
  7. For each LESS @import statement, recursively:
    1. Read the referenced LESS file
    2. Replace the @import statement with the read content
  8. In the merged LESS file, map the lines // [<Annotation> <required: Value> <optional: More Values>] that precede parameter definitions to that parameter:
    1. If a parameter is defined multiple times, merge those annotations
    2. If an annotation already exists: append the value to the existing annotation values
    3. If an annotation has values for which it also has "anti-values" (the same value but starting with a !, e.g. "Protected" and "!Protected"), remove both values from the values list
    4. If an annotation values list is empty, remove the annotation
  9. If the user targets "UI5 Web Components", for each relevant component look up the three CSS sources:
    1. the theme-independent skeleton at webcomponents/packages/*/src/themes/<component>.css, merged with
    2. the always-used base parameters at webcomponents/packages/*/src/themes/base/<component>-parameters.css, then with
    3. the theme-specific delta at webcomponents/packages/*/src/themes/<theme>/<component>-parameters.css
  10. If the user targets "Fundamental Styles", scan fundamental-styles/packages/*/src/**/*.scss for the relevant component; theme-specific values come from the CSS custom properties in theming-base-content/content/Base/baseLib/<theme>/css_variables.css
  11. Answer the users question based on the information collected

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。