Skip to content

Commit

Permalink
Fixing href styling behavior 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 172eb2c commit 3ea5d9a
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 3 deletions.
64 changes: 62 additions & 2 deletions packages/calcite-components/src/components/tile/tile.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,67 @@ describe("calcite-tile", () => {
});
});
describe("link", () => {
describe("text colors", () => {
describe("--calcite-color-text-link applies to heading text on hover", () => {
themed(
html`
<calcite-tile
heading="Tile heading lorem ipsum"
description="Leverage agile frameworks to provide a robust synopsis for high level overviews."
icon="layers"
href="#"
>
</calcite-tile>
`,
{
"--calcite-color-text-link": {
shadowSelector: `.${CSS.heading}`,
targetProp: "color",
state: "hover",
},
},
);
});
describe("--calcite-color-text-link applies to icon on hover", () => {
themed(
html`
<calcite-tile
heading="Tile heading lorem ipsum"
description="Leverage agile frameworks to provide a robust synopsis for high level overviews."
icon="layers"
href="#"
>
</calcite-tile>
`,
{
"--calcite-color-text-link": {
shadowSelector: `.${CSS.icon}`,
targetProp: "color",
state: "hover",
},
},
);
});
describe("--calcite-color-text-link applies to border on hover", () => {
themed(
html`
<calcite-tile
heading="Tile heading lorem ipsum"
description="Leverage agile frameworks to provide a robust synopsis for high level overviews."
icon="layers"
href="#"
>
</calcite-tile>
`,
{
"--calcite-color-text-link": {
shadowSelector: `.${CSS.container}`,
targetProp: "outlineColor",
state: "hover",
},
},
);
});
describe("tile text-color tokens apply to heading and description on hover", () => {
themed(
html`
<calcite-tile
Expand All @@ -506,7 +566,7 @@ describe("calcite-tile", () => {
},
);
});
describe("icon color", () => {
describe("tile text-color token applies to icon on hover", () => {
themed(
html`
<calcite-tile
Expand Down
3 changes: 2 additions & 1 deletion packages/calcite-components/src/components/tile/tile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@

:host([href]:active:not([disabled])) {
.container {
box-shadow: 0 0 0 3px var(--calcite-tile-border-color);
box-shadow: inset 0 0 0 1px var(--calcite-color-text-link);
outline-color: var(--calcite-color-text-link);
}
}

Expand Down

0 comments on commit 3ea5d9a

Please sign in to comment.