feat(stepper): Add initial styles to stepper based on Material guidelines#6242
feat(stepper): Add initial styles to stepper based on Material guidelines#6242g1shin merged 5 commits intoangular:stepperfrom
Conversation
src/lib/stepper/_stepper-theme.scss
Outdated
| } | ||
|
|
||
| .mat-stepper-index { | ||
| background: mat-color($primary); |
src/lib/stepper/_stepper-theme.scss
Outdated
| } | ||
|
|
||
| .mat-stepper-horizontal, .mat-stepper-vertical { | ||
| background: mat-color($background, 'card'); |
src/lib/stepper/stepper.scss
Outdated
|
|
||
| :host { | ||
| display: block; | ||
| padding-left: 24px; |
src/lib/stepper/stepper.scss
Outdated
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| flex-shrink: 1; | ||
| min-width: 50px; |
src/lib/stepper/stepper.scss
Outdated
| .mat-horizontal-stepper-header-container { | ||
| white-space: nowrap; | ||
| display: flex; | ||
| padding-right: 24px; |
src/lib/stepper/stepper.scss
Outdated
| .connector-line { | ||
| border: 0; | ||
| height: 1px; | ||
| border-top: 1px solid #bdbdbd; |
There was a problem hiding this comment.
border-top-color should be part of theme file
src/lib/stepper/stepper.scss
Outdated
|
|
||
| .vertical-content-container { | ||
| content: ''; | ||
| border-left: 1px solid #bdbdbd; |
There was a problem hiding this comment.
scss vars, border-left-color in theme file
src/lib/stepper/stepper.scss
Outdated
| } | ||
|
|
||
| .mat-vertical-stepper-content { | ||
| margin-left: 24px; |
src/lib/stepper/stepper.scss
Outdated
| } | ||
|
|
||
| &[aria-expanded='true'] { | ||
| padding-bottom: 48px; |
src/lib/stepper/stepper.scss
Outdated
| } | ||
|
|
||
| &:first-child { | ||
| padding-top: 24px; |
|
Ready for review again 😀 |
mmalerba
left a comment
There was a problem hiding this comment.
Are you using pixel margins to vertically center things? This is usually a bad idea because its very brittle. I can show you how to use some of the flexbox alignment properties to do this more easily
| [attr.aria-expanded]="selectedIndex == i"> | ||
| <ng-container [ngTemplateOutlet]="step.content"></ng-container> | ||
| <div class="vertical-content-container"> | ||
| <!--<div *ngIf="!isLast" class="vertical-connector-line"></div>--> |
src/lib/stepper/stepper.scss
Outdated
| .mat-stepper-content[aria-expanded='false'] { | ||
| display: none; | ||
| $mat-horizontal-stepper-header-height: 72px; | ||
| $mat-vertical-stepper-header-height: 24px; |
There was a problem hiding this comment.
are any of these values related to each other or conceptually the same thing? for example I see a lot of 24px
src/lib/stepper/stepper.scss
Outdated
| .mat-horizontal-stepper-header { | ||
| display: inline-flex; | ||
| line-height: $mat-horizontal-stepper-header-height; | ||
| flex-grow: 0; |
There was a problem hiding this comment.
can use shorthand for flex-grow and flex-shrink: flex: 0 1 auto
| display: inline-flex; | ||
| white-space: nowrap; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; |
There was a problem hiding this comment.
does this work now? if not leave a TODO to investigate
src/lib/stepper/stepper.scss
Outdated
| margin-right: $mat-horizontal-stepper-index-margin-right; | ||
| margin-top: $mat-horizontal-stepper-index-martin-top; | ||
| display: inline-block; | ||
| flex-shrink: 0; |
src/lib/stepper/stepper.scss
Outdated
| border-top-style: solid; | ||
| margin-top: $mat-connector-line-margin-top; | ||
| width: 5%; | ||
| flex-grow: 1; |
src/lib/stepper/stepper.scss
Outdated
| flex-grow: 1; | ||
| flex-shrink: 1; | ||
| margin-left: $mat-connector-line-margin; | ||
| margin-right: $mat-connector-line-margin; |
There was a problem hiding this comment.
can use margin shorthand: margin: <top> <right> 0 <left>
src/lib/stepper/stepper.scss
Outdated
| } | ||
|
|
||
| .vertical-content-container { | ||
| content: ''; |
src/lib/stepper/stepper.scss
Outdated
| border-top-width: $mat-connector-line-width; | ||
| border-top-style: solid; | ||
| margin-top: $mat-connector-line-margin-top; | ||
| width: 5%; |
src/lib/stepper/stepper.scss
Outdated
| content: ''; | ||
| border-left-width: $mat-connector-line-width; | ||
| border-left-style: solid; | ||
| margin: $mat-connector-line-margin 0 $mat-connector-line-margin 12px; |
|
Changes made; ready for review. |
|
Changes have been made regarding managing margins, and I deployed the modified demo onto Firebase app. 👍 |
mmalerba
left a comment
There was a problem hiding this comment.
I'd like to further refine the CSS in the future, but for now it looks good
…ines (#6242) * Add initial styles to stepper based on Material guidelines * Fix flex-shrink and min-width * Changes made based on review * Fix alignment * Margin modifications
…ines (#6242) * Add initial styles to stepper based on Material guidelines * Fix flex-shrink and min-width * Changes made based on review * Fix alignment * Margin modifications
…ines (angular#6242) * Add initial styles to stepper based on Material guidelines * Fix flex-shrink and min-width * Changes made based on review * Fix alignment * Margin modifications
…ines (angular#6242) * Add initial styles to stepper based on Material guidelines * Fix flex-shrink and min-width * Changes made based on review * Fix alignment * Margin modifications
…ines (angular#6242) * Add initial styles to stepper based on Material guidelines * Fix flex-shrink and min-width * Changes made based on review * Fix alignment * Margin modifications
…ines (#6242) * Add initial styles to stepper based on Material guidelines * Fix flex-shrink and min-width * Changes made based on review * Fix alignment * Margin modifications
…tepper branch. (#5742) * Prototyping * Further work * Further prototyping * Further prototyping * Further work * Adding event emitters * Adding "selectedIndex" attribute to stepper and working on TemplateOulet. * Prototyping * Further work * Further prototyping * Further prototyping * Further work * Adding event emitters * Template rendering and selectIndex control done. * Work in progress for accessibility * Added functionalities based on the tentative API doc. * Refactor code for cdk-stepper and cdk-step * Add support for templated label * Added support for keyboard events and focus changes for accessibility. * Updated vertical stepper + added comments * Fix package-lock.json * Fix indention * Changes made based on the review * Changes based on review - event properties, selectors, SPACE support, etc. + demo * Add select() for step component + refactor to avoid circular dependency + support cycling using arrow keys * API change based on review * Minor code clean up based on review. * Several name changes, etc based on review * Add to compatibility mode list and refactor to avoid circular dependency feat(stepper): Create stepper button directives to enable adding buttons to stepper (#5951) * Create stepper button directives to enable adding buttons to stepper * Changes made based on review * Minor changes with click handlers Build changes feat(stepper): Add initial styles to stepper based on Material guidelines (#6242) * Add initial styles to stepper based on Material guidelines * Fix flex-shrink and min-width * Changes made based on review * Fix alignment * Margin modifications feat(stepper): Add support for linear stepper (#6116) * Add form controls and custom error state matcher * Modify form controls for stepper-demo and add custom validator * Move custom step validation function so that users can simply import and use * Implement @input() stepControl for each step * Add linear attribute to stepper * Add enabling/disabling linear state of demo feat(stepper): Add animation to stepper (#6361) * Add animation * Implement Angular animation * Clean up unnecessary code * Generalize animation so that vertical and horizontal steppers can use the same function Rebase onto upstream/master feat(stepper): Add unit tests for stepper (#6428) * Add unit tests for stepper * Changes made based on review * More changes based on review feat(stepper): Add support for linear stepper #2 - each step as its own form. (#6117) * Add form control - consider each step as its own form group * Comment edits * Add 'valid' to MdStep for form validation * Add [stepControl] to each step based on merging * Changes based on review Fix focus logic and CSS changes (#6507) feat(stepper): Add documentation for stepper (#6533) * Documentation for stepper * Revision based on review + add accessibility section feat(stepper): Support additional properties for step (#6509) * Additional properties for step * Unit tests * Code changes based on review + test name changes * Refactor code for shared functionality between vertical and horizontal stepper * Refactor md-step-header and md-step-content + optional step change * Simplify code based on review * Changes to step-header based on review * Minor changes Fix host style and demo page (#6592) Revert package.json and package-lock.json Changes made along with BUILD changes in google3 Add typography mixin Changes to address aot compiler failures fix rtl bugs
…tepper branch. (angular#5742) * Prototyping * Further work * Further prototyping * Further prototyping * Further work * Adding event emitters * Adding "selectedIndex" attribute to stepper and working on TemplateOulet. * Prototyping * Further work * Further prototyping * Further prototyping * Further work * Adding event emitters * Template rendering and selectIndex control done. * Work in progress for accessibility * Added functionalities based on the tentative API doc. * Refactor code for cdk-stepper and cdk-step * Add support for templated label * Added support for keyboard events and focus changes for accessibility. * Updated vertical stepper + added comments * Fix package-lock.json * Fix indention * Changes made based on the review * Changes based on review - event properties, selectors, SPACE support, etc. + demo * Add select() for step component + refactor to avoid circular dependency + support cycling using arrow keys * API change based on review * Minor code clean up based on review. * Several name changes, etc based on review * Add to compatibility mode list and refactor to avoid circular dependency feat(stepper): Create stepper button directives to enable adding buttons to stepper (angular#5951) * Create stepper button directives to enable adding buttons to stepper * Changes made based on review * Minor changes with click handlers Build changes feat(stepper): Add initial styles to stepper based on Material guidelines (angular#6242) * Add initial styles to stepper based on Material guidelines * Fix flex-shrink and min-width * Changes made based on review * Fix alignment * Margin modifications feat(stepper): Add support for linear stepper (angular#6116) * Add form controls and custom error state matcher * Modify form controls for stepper-demo and add custom validator * Move custom step validation function so that users can simply import and use * Implement @input() stepControl for each step * Add linear attribute to stepper * Add enabling/disabling linear state of demo feat(stepper): Add animation to stepper (angular#6361) * Add animation * Implement Angular animation * Clean up unnecessary code * Generalize animation so that vertical and horizontal steppers can use the same function Rebase onto upstream/master feat(stepper): Add unit tests for stepper (angular#6428) * Add unit tests for stepper * Changes made based on review * More changes based on review feat(stepper): Add support for linear stepper angular#2 - each step as its own form. (angular#6117) * Add form control - consider each step as its own form group * Comment edits * Add 'valid' to MdStep for form validation * Add [stepControl] to each step based on merging * Changes based on review Fix focus logic and CSS changes (angular#6507) feat(stepper): Add documentation for stepper (angular#6533) * Documentation for stepper * Revision based on review + add accessibility section feat(stepper): Support additional properties for step (angular#6509) * Additional properties for step * Unit tests * Code changes based on review + test name changes * Refactor code for shared functionality between vertical and horizontal stepper * Refactor md-step-header and md-step-content + optional step change * Simplify code based on review * Changes to step-header based on review * Minor changes Fix host style and demo page (angular#6592) Revert package.json and package-lock.json Changes made along with BUILD changes in google3 Add typography mixin Changes to address aot compiler failures fix rtl bugs
…tepper branch. (angular#5742) * Prototyping * Further work * Further prototyping * Further prototyping * Further work * Adding event emitters * Adding "selectedIndex" attribute to stepper and working on TemplateOulet. * Prototyping * Further work * Further prototyping * Further prototyping * Further work * Adding event emitters * Template rendering and selectIndex control done. * Work in progress for accessibility * Added functionalities based on the tentative API doc. * Refactor code for cdk-stepper and cdk-step * Add support for templated label * Added support for keyboard events and focus changes for accessibility. * Updated vertical stepper + added comments * Fix package-lock.json * Fix indention * Changes made based on the review * Changes based on review - event properties, selectors, SPACE support, etc. + demo * Add select() for step component + refactor to avoid circular dependency + support cycling using arrow keys * API change based on review * Minor code clean up based on review. * Several name changes, etc based on review * Add to compatibility mode list and refactor to avoid circular dependency feat(stepper): Create stepper button directives to enable adding buttons to stepper (angular#5951) * Create stepper button directives to enable adding buttons to stepper * Changes made based on review * Minor changes with click handlers Build changes feat(stepper): Add initial styles to stepper based on Material guidelines (angular#6242) * Add initial styles to stepper based on Material guidelines * Fix flex-shrink and min-width * Changes made based on review * Fix alignment * Margin modifications feat(stepper): Add support for linear stepper (angular#6116) * Add form controls and custom error state matcher * Modify form controls for stepper-demo and add custom validator * Move custom step validation function so that users can simply import and use * Implement @input() stepControl for each step * Add linear attribute to stepper * Add enabling/disabling linear state of demo feat(stepper): Add animation to stepper (angular#6361) * Add animation * Implement Angular animation * Clean up unnecessary code * Generalize animation so that vertical and horizontal steppers can use the same function Rebase onto upstream/master feat(stepper): Add unit tests for stepper (angular#6428) * Add unit tests for stepper * Changes made based on review * More changes based on review feat(stepper): Add support for linear stepper angular#2 - each step as its own form. (angular#6117) * Add form control - consider each step as its own form group * Comment edits * Add 'valid' to MdStep for form validation * Add [stepControl] to each step based on merging * Changes based on review Fix focus logic and CSS changes (angular#6507) feat(stepper): Add documentation for stepper (angular#6533) * Documentation for stepper * Revision based on review + add accessibility section feat(stepper): Support additional properties for step (angular#6509) * Additional properties for step * Unit tests * Code changes based on review + test name changes * Refactor code for shared functionality between vertical and horizontal stepper * Refactor md-step-header and md-step-content + optional step change * Simplify code based on review * Changes to step-header based on review * Minor changes Fix host style and demo page (angular#6592) Revert package.json and package-lock.json Changes made along with BUILD changes in google3 Add typography mixin Changes to address aot compiler failures fix rtl bugs
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Uh oh!
There was an error while loading. Please reload this page.