Skip to content

Commit

Permalink
chore: add pseduo-class example (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
a2937 authored Nov 13, 2024
1 parent 0989d5e commit 672df7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/__fixtures__/curriculum-helper-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ body {
);
}
}
.card:hover {
background-color: khaki;
}
`;

const testValues = {
Expand Down
5 changes: 5 additions & 0 deletions lib/__tests__/css-helper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ describe("css-help", () => {
"var(--building-color4)"
);
});
it("should return value of pseudo class selector", () => {
expect(
t.getStyle(".card:hover")?.getPropertyValue("background-color")
).toEqual("khaki");
});
});
describe("getCSSRules", () => {
it("should return a CSSRules array of length 1", () => {
Expand Down

0 comments on commit 672df7f

Please sign in to comment.