Skip to content

Commit

Permalink
Fix issue with ::slotted always having less specificity than global s…
Browse files Browse the repository at this point in the history
…tyles.
  • Loading branch information
marvel-uiuc committed Sep 13, 2024
1 parent f70dba7 commit 9d8e799
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 45 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/sample.yml

This file was deleted.

2 changes: 1 addition & 1 deletion builder/ilw-card.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"description": "A card component that can be used as a container for grouping information.",
"toolkit-version": "",
"production-version": "",
"development-version": "1.0.0-alpha2"
"development-version": "1.0.0-alpha3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"type": "web component",
"element-name": "ilw-card",
"description": "A card component that can be used as a container for grouping information.",
"version": "1.0.0-alpha2",
"version": "1.0.0-alpha3",
"date": "08/02/2024",
"css": "https://dev.toolkit.illinois.edu/ilw-card/1.0.0-alpha2/ilw-card.css",
"js": "https://dev.toolkit.illinois.edu/ilw-card/1.0.0-alpha2/ilw-card.js",
"css": "https://dev.toolkit.illinois.edu/ilw-card/1.0.0-alpha3/ilw-card.css",
"js": "https://dev.toolkit.illinois.edu/ilw-card/1.0.0-alpha3/ilw-card.js",
"production": false,
"notes": "",
"parent-style": "margin: 0 auto; max-width: 400px; padding: 15px;",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Illinois Toolkit: A card component that can be used as a container for grouping information, reminiscent of a physical note or playing card.",
"repository": "github:web-illinois/ilw-card",
"private": false,
"version": "1.0.0-alpha2",
"version": "1.0.0-alpha3",
"type": "module",
"files": [
"src/**",
Expand Down
4 changes: 2 additions & 2 deletions src/ilw-card.styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,13 @@ article {

::slotted([slot="image"]) {
aspect-ratio: var(--ilw-card--aspect-ratio);
width: 100%;
width: 100% !important; /* use important here because this should never be anything else */
object-fit: cover;
}
}

.card-image ::slotted(*) {
width: 100%;
width: 100% !important; /* use important here because this should never be anything else */
}

.card-content {
Expand Down

0 comments on commit 9d8e799

Please sign in to comment.