fix(label): only inherit color if color property is set on ion-item (#23944)

resolves #20125
This commit is contained in:
Liam DeBeasi
2021-09-16 15:27:43 -04:00
committed by GitHub
parent 8108edd876
commit ae1325cee6
5 changed files with 43 additions and 4 deletions

View File

@ -0,0 +1,10 @@
import { newE2EPage } from '@stencil/core/testing';
test('label: color', async () => {
const page = await newE2EPage({
url: '/src/components/label/test/color?ionic:_testing=true'
});
const compare = await page.compareScreenshot();
expect(compare).toMatchScreenshot();
});

View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<title>Label - Color</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet">
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet">
<script src="../../../../../scripts/testing/scripts.js"></script>
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
</head>
<body>
<ion-app>
<ion-header>
<ion-toolbar>
<ion-title>Label - Color</ion-title>
</ion-toolbar>
</ion-header>
<ion-content color="light">
<ion-item>
<ion-label>Label Text<p>This paragraph should not inherit the color from content</p></ion-label>
</ion-item>
</ion-content>
</ion-app>
</body>
</html>