-
Notifications
You must be signed in to change notification settings - Fork 375
Extend <Stepper> with an indicator-only "rail" layout variant. #13103
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
Changes from all commits
ea3fcca
4881146
a2ec7fa
289d714
e7948ad
cb5182c
c6d6075
0596b98
df5fa51
32d9ea4
044c66a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -126,4 +126,121 @@ | |
| margin-bottom: 0; | ||
| } | ||
| } | ||
|
|
||
| .googlesitekit-stepper--rail { | ||
| --googlesitekit-stepper-row-gap: 12px; | ||
| --googlesitekit-stepper-size: 18px; | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Figma these are
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @JakePT. I think this is correct anyway, as the full size of the vector appears to be 18px in Figma designs too.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nfmohit If you zoom in you'll see some white space though. The green circle itself is 16.5px.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right. I think we can disregard that. LGTM 👍 |
||
| --googlesitekit-stepper-small-size: 10px; | ||
|
|
||
| align-items: center; | ||
| box-sizing: content-box; | ||
| display: flex; | ||
|
|
||
| @media (min-width: $bp-desktop) { | ||
| align-items: stretch; | ||
| display: grid; | ||
| gap: var(--googlesitekit-stepper-row-gap); | ||
| grid-auto-rows: 1fr; | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step { | ||
| display: block; | ||
| flex: 2 1 0; | ||
|
|
||
| @media (min-width: $bp-desktop) { | ||
| display: grid; | ||
| flex-grow: 1; | ||
| gap: 14px; | ||
| grid-template-columns: var(--googlesitekit-stepper-size) auto; | ||
| min-block-size: 36px; | ||
| } | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step:first-child, | ||
| .googlesitekit-stepper__step:last-child { | ||
| flex-grow: 1; | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step-info { | ||
| display: none; | ||
|
|
||
| @media (min-width: $bp-desktop) { | ||
| align-self: center; | ||
| display: block; | ||
| } | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step-title { | ||
| block-size: auto; | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step-progress { | ||
| display: flex; | ||
| flex-direction: row; | ||
| place-items: center; | ||
|
|
||
| @media (min-width: $bp-desktop) { | ||
| flex-direction: column; | ||
| position: relative; | ||
| } | ||
|
|
||
| &::after, | ||
| &::before { | ||
| background-color: $c-surfaces-surface-2; | ||
| block-size: 1px; | ||
| content: ""; | ||
| display: block; | ||
| flex: 1 1 0; | ||
|
|
||
| @media (min-width: $bp-desktop) { | ||
| block-size: auto; | ||
| inline-size: 1px; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step:first-child .googlesitekit-stepper__step-progress::before, | ||
| .googlesitekit-stepper__step:last-child .googlesitekit-stepper__step-progress::after { | ||
| display: none; | ||
|
|
||
| @media (min-width: $bp-desktop) { | ||
| display: block; | ||
| visibility: hidden; | ||
| } | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step-number { | ||
| aspect-ratio: 1 / 1; | ||
| background-color: $c-site-kit-sk-600; | ||
| block-size: auto; | ||
| inline-size: var(--googlesitekit-stepper-size); | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step--active { | ||
|
|
||
| .googlesitekit-stepper__step-number { | ||
| background-clip: content-box; | ||
| box-shadow: inset 0 0 0 1px $c-site-kit-sk-600; | ||
| padding: calc((var(--googlesitekit-stepper-size) - var(--googlesitekit-stepper-small-size)) / 2); | ||
| } | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step--upcoming .googlesitekit-stepper__step-number { | ||
| background-color: $c-site-kit-sk-200; | ||
| inline-size: var(--googlesitekit-stepper-small-size); | ||
| } | ||
|
|
||
| .googlesitekit-stepper__step-progress-line { | ||
| display: none; | ||
|
|
||
| @media (min-width: $bp-desktop) { | ||
| block-size: var(--googlesitekit-stepper-row-gap); | ||
| display: block; | ||
| inset-block-start: 100%; | ||
| margin: 0; | ||
| min-block-size: 0; | ||
| position: absolute; | ||
| } | ||
| } | ||
| } | ||
| } | ||

Uh oh!
There was an error while loading. Please reload this page.