-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core/typography): use text color value and add vrts (#1155)
- Loading branch information
1 parent
b9fb01d
commit 1672561
Showing
14 changed files
with
244 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
<body> | ||
<script> | ||
const textFormats = [ | ||
'label-lg', | ||
'label', | ||
'label-sm', | ||
'label-xs', | ||
|
||
'body-lg', | ||
'body', | ||
'body-sm', | ||
'body-xs', | ||
|
||
'display-xxl', | ||
'display-xl', | ||
'display-lg', | ||
'display', | ||
'display-sm', | ||
'display-xs', | ||
|
||
'h1', | ||
'h2', | ||
'h3', | ||
'h4', | ||
'h5', | ||
'h6', | ||
|
||
'code-lg', | ||
'code', | ||
'code-sm', | ||
]; | ||
|
||
textFormats.map(format => { | ||
const typography = document.createElement('ix-typography'); | ||
typography.format = format; | ||
typography.innerHTML = format; | ||
document.body.appendChild(typography); | ||
}); | ||
</script> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
58 changes: 58 additions & 0 deletions
58
packages/core/src/tests/typography/line-through/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
<body> | ||
<script> | ||
const textFormats = [ | ||
'label-lg', | ||
'label', | ||
'label-sm', | ||
'label-xs', | ||
|
||
'body-lg', | ||
'body', | ||
'body-sm', | ||
'body-xs', | ||
|
||
'display-xxl', | ||
'display-xl', | ||
'display-lg', | ||
'display', | ||
'display-sm', | ||
'display-xs', | ||
|
||
'h1', | ||
'h2', | ||
'h3', | ||
'h4', | ||
'h5', | ||
'h6', | ||
|
||
'code-lg', | ||
'code', | ||
'code-sm', | ||
]; | ||
|
||
textFormats.map(format => { | ||
const typography = document.createElement('ix-typography'); | ||
typography.format = format; | ||
typography.innerHTML = format; | ||
typography.textDecoration = 'line-through'; | ||
document.body.appendChild(typography); | ||
}); | ||
</script> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
<style> | ||
.inv-bg { | ||
background-color: var(--theme-color-alarm); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<ix-typography text-color="contrast">Contrast</ix-typography> | ||
<ix-typography text-color="std">Std</ix-typography> | ||
<ix-typography text-color="soft">Soft</ix-typography> | ||
<ix-typography text-color="weak">Weak</ix-typography> | ||
<ix-typography text-color="alarm">Alarm</ix-typography> | ||
|
||
<div class="inv-bg"> | ||
<ix-typography text-color="inv-contrast">Inv-contrast</ix-typography> | ||
<ix-typography text-color="inv-std">Inv-std</ix-typography> | ||
<ix-typography text-color="inv-soft">Inv-soft</ix-typography> | ||
<ix-typography text-color="inv-weak">Inv-weak</ix-typography> | ||
</div> | ||
|
||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import { expect } from '@playwright/test'; | ||
import { regressionTest } from '@utils/test'; | ||
|
||
regressionTest.describe('typography', () => { | ||
regressionTest('basic', async ({ page }) => { | ||
await page.goto('typography/basic'); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); | ||
}); | ||
|
||
regressionTest('line-through', async ({ page }) => { | ||
await page.goto('typography/line-through'); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); | ||
}); | ||
|
||
regressionTest('underline', async ({ page }) => { | ||
await page.goto('typography/underline'); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); | ||
}); | ||
|
||
regressionTest('text color', async ({ page }) => { | ||
await page.goto('typography/text-color'); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); | ||
}); | ||
}); |
Binary file added
BIN
+38.1 KB
...phy.e2e.ts-snapshots/typography-basic-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38 KB
...hy.e2e.ts-snapshots/typography-basic-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.6 KB
....ts-snapshots/typography-line-through-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.6 KB
...ts-snapshots/typography-line-through-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.6 KB
...2e.ts-snapshots/typography-text-color-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.6 KB
...e.ts-snapshots/typography-text-color-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38.6 KB
...e2e.ts-snapshots/typography-underline-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38.5 KB
...2e.ts-snapshots/typography-underline-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
<body> | ||
<script> | ||
const textFormats = [ | ||
'label-lg', | ||
'label', | ||
'label-sm', | ||
'label-xs', | ||
|
||
'body-lg', | ||
'body', | ||
'body-sm', | ||
'body-xs', | ||
|
||
'display-xxl', | ||
'display-xl', | ||
'display-lg', | ||
'display', | ||
'display-sm', | ||
'display-xs', | ||
|
||
'h1', | ||
'h2', | ||
'h3', | ||
'h4', | ||
'h5', | ||
'h6', | ||
|
||
'code-lg', | ||
'code', | ||
'code-sm', | ||
]; | ||
|
||
textFormats.map(format => { | ||
const typography = document.createElement('ix-typography'); | ||
typography.format = format; | ||
typography.innerHTML = format; | ||
typography.textDecoration = 'underline'; | ||
document.body.appendChild(typography); | ||
}); | ||
</script> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |