-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tile): add design tokens #10476
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Erik! Looking good. I have a few suggestions to ensure we keep the component aligned to current design patterns.
@ashetland can you confirm "heading" "description/text" align with the future cross-component heading patterns?
} | ||
} | ||
|
||
:host([selection-appearance="border"][layout="vertical"]) { | ||
.container.selected { | ||
box-shadow: inset 4px 0 0 0 var(--calcite-color-brand); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only the "x" and "y" axis lengths are in changing between these box-shadows. You could probably simplify this down to a single style prop. Something like....
.container {
box-shadow: inset var(--calcite-internal-tile-shadow-x) var(--calcite-internal-tile-shadow-y) 0 0 var(--calcite-internal-tile-shadow-color, none);
}
:host([selection-appearance="border"]) .container.selected {
--calcite-internal-tile-shadow-color: var(--calcite-tile-color-selected, var(--calcite-color-brand));
}
:host([layout="vertical"]) .container {
--calcite-internal-tile-shadow-x: 4px;
--calcite-internal-tile-shadow-y: 0;
}
:host([layout="horizontal"]) .container {
--calcite-internal-tile-shadow-x: 0;
--calcite-internal-tile-shadow-y: -4px;
}
--calcite-icon-color: var(--calcite-color-text-link); | ||
--calcite-internal-tile-border-color: var(--calcite-color-text-link); | ||
--calcite-internal-tile-heading-text-color: var(--calcite-color-text-link); | ||
--calcite-internal-tile-icon-color: var(--calcite-color-text-link); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add an extra token for this case --calcite-title-href-text-color
:host([href]:focus:not([disabled])),
:host([href]:hover:not([disabled])) {
.container,
.heading {
color: var(--calcite-title-href-text-color, var(--calcite-color-text-link));
}
.container {
border-color: var(--calcite-title-href-text-color, var(--calcite-color-text-link));
}
}
…xt-color-hover" token to allow both a default and overridable hover color.
…ender this unnecessary and we don't want to ship a token we'll have to immediately deprecate
…so that one color token controls both the unfocused and focused states
…irectly on a calcite-tile element selector in CSS
… Restoring selection-appearance border selected styles with box-shadow rules.
…internal-tile-border-color and using brand token for hover, focus states on borders
…calcite-tile-heading-text-color-hover
…way of setting the color of the presentation calcite-icon using a direct color property, and adding additional --calcite-tile-href-icon-color-hover token that defaults to the link color
…le-description-text-color, syncing up all current css properties in tests and demos, commenting out some tests that need fixed in a follow-up
…ption-text-color-hover token with correct fallback, refactoring icon selectors to use css classes instead of element selectors, fixing heading text hover color, updating tests and demos, adding a link token test for heading text and icon hover
…cite-tile-selection-color/hover just like Card does.
…able for selected, hover and focus states instead of the base one. This allows for the base color of the selection icon to be controlled separately from selected/hover/focus state. Not sure if this is the right thing to do, need to follow up
…lharper/7180-tile-tokens
Related Issue: #7180
Summary
Adds design tokens for the Tile component.