Skip to content
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(progress): add component tokens #8661

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions packages/calcite-components/src/components/progress/progress.scss
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
@import "../../assets/styles/animation";

/**
* CSS Custom Properties
*
* These properties can be overridden using the component's tag as selector.
*
* @prop --calcite-progress-background-color: The background color of the component.
* @prop --calcite-progress-font-size: The font size of the component.
* @prop --calcite-progress-font-color: The font color of the component.
Elijbet marked this conversation as resolved.
Show resolved Hide resolved
*/

:host {
@apply relative block w-full;
@apply relative block;
inline-size: var(--calcite-container-size-content-fluid);
}

.track,
.bar {
@apply absolute top-0;

block-size: 2px;
Elijbet marked this conversation as resolved.
Show resolved Hide resolved
}

.track {
@apply z-default w-full overflow-hidden;
background: theme("borderColor.color.3");
@apply overflow-hidden;

inline-size: var(--calcite-container-size-content-fluid);
z-index: var(--calcite-z-index);
--calcite-progress-background-color: var(--calcite-color-border-3);
}

.bar {
@apply bg-brand z-default;
--calcite-progress-background-color: var(--calcite-color-brand);
Elijbet marked this conversation as resolved.
Show resolved Hide resolved
}

@media (forced-colors: active) {
.track {
background-color: highlightText;
--calcite-progress-background-color: highlightText;
}
.bar {
background-color: linkText;
--calcite-progress-background-color: linkText;
}
}

.indeterminate {
@apply w-1/5;
--calcite-container-size-content-fluid: 20%;
animation: looping-progress-bar-ani scaleDuration(--calcite-internal-animation-timing-medium, 11) linear infinite;
&.calcite--rtl {
animation-name: looping-progress-bar-ani-rtl;
Expand All @@ -41,8 +56,9 @@
}

.text {
@apply text-n2h px-0 pt-4 pb-0 text-center font-medium;
color: var(--calcite-color-text-2);
@apply px-0 pt-4 pb-0 text-center font-medium;
Elijbet marked this conversation as resolved.
Show resolved Hide resolved
--calcite-progress-font-size: theme("fontSize.n2h");
--calcite-progress-font-color: var(--calcite-color-text-2);
}

@keyframes looping-progress-bar-ani {
Expand Down
Loading