Skip to content

Commit

Permalink
fixing selection-mode="none" to match visual matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
eriklharper committed Oct 24, 2024
1 parent 1e9e6c7 commit 172eb2c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
44 changes: 44 additions & 0 deletions packages/calcite-components/src/components/tile/tile.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,50 @@ describe("calcite-tile", () => {
},
);
});
describe(`selection-mode="none"`, () => {
describe("applies --calcite-tile-border-color when idle and selected attribute is present", () => {
themed(
html`
<calcite-tile
heading="Tile heading lorem ipsum"
description="Leverage agile frameworks to provide a robust synopsis for high level overviews."
icon="layers"
interactive
selection-mode="none"
selected
>
</calcite-tile>
`,
{
"--calcite-tile-border-color": {
shadowSelector: `.${CSS.container}`,
targetProp: "outlineColor",
},
},
);
});
describe("applies --calcite-tile-border-color when hovered", () => {
themed(
html`
<calcite-tile
heading="Tile heading lorem ipsum"
description="Leverage agile frameworks to provide a robust synopsis for high level overviews."
icon="layers"
interactive
selection-mode="none"
>
</calcite-tile>
`,
{
"--calcite-tile-border-color": {
shadowSelector: `.${CSS.container}`,
targetProp: "outlineColor",
state: "hover",
},
},
);
});
});
});
describe("link", () => {
describe("text colors", () => {
Expand Down
8 changes: 5 additions & 3 deletions packages/calcite-components/src/components/tile/tile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,12 @@

:host([selection-mode="none"]) {
.container {
outline-color: var(--calcite-tile-border-color, var(--calcite-color-border-2));
&:hover,
&.selected {
outline-color: var(--calcite-tile-border-color, var(--calcite-color-border-2));
}
&:focus {
outline-color: var(--calcite-color-brand);
position: relative;
outline-color: var(--calcite-tile-accent-color-press, var(--calcite-color-brand));
}
}
}
Expand Down

0 comments on commit 172eb2c

Please sign in to comment.