Skip to content

Commit

Permalink
Use container-type instead of contain.
Browse files Browse the repository at this point in the history
  • Loading branch information
marvel-uiuc committed Aug 30, 2024
1 parent dd490d8 commit fab452a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions samples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</head>

<body style="margin: 0; padding: 0;">
<div style="width: 800px; margin: auto">
<div style="max-width: 800px; margin: auto">
<ilw-call-to-action theme="white">
<img src="https://cdn.brand.illinois.edu/icons/line/blue/faq.svg" alt="" slot="icon">
<h2>Get started today</h2>
Expand All @@ -41,7 +41,7 @@ <h2>Get started today</h2>
<li><a href="#">Contact us</a></li>
</ul>
</ilw-call-to-action>
<ilw-call-to-action theme="blue-gradient">
<ilw-call-to-action theme="blue-gradient" width="full">
<svg slot="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 7 51.26 51.26">
<defs>
<style>.cls-1 {
Expand Down
4 changes: 3 additions & 1 deletion src/ilw-call-to-action.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
--ilw-call-to-action--link: var(--ilw-link--color); /*var: Color for links inside the component */
--ilw-call-to-action--link-focus: var(--ilw-link--focused-color); /*var: Focus and hover color for links inside the component*/
--ilw-call-to-action--link-visited: var(--ilw-link--visited-color); /*var: Visited link color for inside the component*/

--root-page-width: calc(100vw - (100vw - 100%));
}

ilw-call-to-action[theme="white"] {
Expand Down Expand Up @@ -69,7 +71,7 @@
}

ilw-call-to-action {
contain: layout;
container-type: inline-size;
color: var(--ilw-call-to-action--text-color);

.ilw-buttons {
Expand Down

0 comments on commit fab452a

Please sign in to comment.