mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(item): add styles for focus state in ionic theme (#29595)
Issue number: internal --------- ## What is the new behavior? - Added scss for the focus state of `ion-item` for the Ionic theme - Added item with class `ion-focused` to test page - Added the ionic theme to the test page of item `states` ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other Information [Preview](https://ionic-framework-git-rou-10782-ionic1.vercel.app/src/components/item/test/theme-ionic?ionic:theme=ionic) --------- Co-authored-by: ionitron <hi@ionicframework.com> Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
This commit is contained in:
@@ -113,3 +113,17 @@
|
||||
:host(.ion-activated) .item-native {
|
||||
background: var(--background-activated);
|
||||
}
|
||||
|
||||
// Item: Focused
|
||||
// --------------------------------------------------
|
||||
:host(.ion-focused) .item-native::after {
|
||||
@include globals.position(0, 0, 0, 0);
|
||||
|
||||
position: absolute;
|
||||
|
||||
border-width: globals.$ionic-border-size-050;
|
||||
border-style: globals.$ionic-border-style-solid;
|
||||
border-color: globals.$ionic-state-focus-1;
|
||||
|
||||
content: "";
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { configs, test } from '@utils/test/playwright';
|
||||
/**
|
||||
* This behavior does not vary across directions
|
||||
*/
|
||||
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
configs({ modes: ['ionic-md', 'ios', 'md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('item: states'), () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto(`/src/components/item/test/states`, config);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
@@ -170,6 +170,16 @@
|
||||
<p>Normal paragraph</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item-divider>
|
||||
<ion-label>Item focused</ion-label>
|
||||
</ion-item-divider>
|
||||
<ion-item href="#" class="ion-focused">
|
||||
<ion-label slot="start">Start</ion-label>
|
||||
<ion-label>
|
||||
<h1>Heading</h1>
|
||||
<p>Normal paragraph</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
|
||||
Reference in New Issue
Block a user