дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
Component tags in Vue templates (<Icon>, <el-input>) had the same colour as HTML elements. PascalCase or hyphenated tag names now use a new --syn-custom-tag token, the Custom tag name colour: #2fbaa3 in Islands Dark and #b21dbf in Islands Light, with values for high contrast, the palette themes and Harbor Night; other themes fall back to the tag colour. Fixes #6894
15 рядки
692 B
TypeScript
15 рядки
692 B
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
for (const [theme, custom, tag] of [
|
|
["dark", "rgb(47, 186, 163)", "rgb(213, 183, 120)"],
|
|
["light", "rgb(178, 29, 191)", "rgb(0, 51, 179)"],
|
|
] as const) {
|
|
test(`Vue component tags have the custom tag colour (${theme})`, async ({ page }) => {
|
|
await page.goto(`/e2e/vueHighlight.html?theme=${theme}`);
|
|
const line = page.locator(".cm-line").nth(1);
|
|
await expect(line.getByText("Icon", { exact: true })).toHaveCSS("color", custom);
|
|
await expect(line.getByText("el-input", { exact: true }).first()).toHaveCSS("color", custom);
|
|
await expect(line.getByText("div", { exact: true }).first()).toHaveCSS("color", tag);
|
|
});
|
|
}
|