to design file 4. Check what changed 5. Copy changed values and update css files a. Ensure one does not make a copy & paste error b. Ensure one does not miss a value 6. Test application if values are applied correctly a. Peer review b. Different devices/browsers 7. Designers review application 8. Deploy app Motivation
to design file 4. Check what changed 5. Copy changed values and update css files a. Ensure one does not make a copy & paste error b. Ensure one does not miss a value 6. Test application if values are applied correctly a. Peer review b. Different devices/browsers 7. Designers review application 8. Deploy app What if we could entirely eliminate the need for developer involvement? Motivation
Font Family • Font weight • Duration • Cubic Bézier • Number Composite Types • Stroke Style • Border • Transition • Shadow • Gradient • Typography Type Resolving: 1. Read type provided by value 2. Otherwise, if token is a reference, use type of reference token 3. Otherwise, use type of closest group
In most cases you don’t know what the user wants to put inside your component. ng-content ng-template <ng-content /> <ng-content select=”...” /> ng-container *ngTemplateOutlet
many cases you want to provide defaults that users should be able to override. ng-content ng-template <ng-template> <img ….> </ng-template> ng-container *ngTemplateOutlet
many cases you want to provide defaults that users should be able to override. ng-content ng-template ng-container *ngTemplateOutlet <ng-container *ngTemplateOutlet=” progressBarIconTemplate” />
many cases you want to provide defaults that users should be able to override. ng-content ng-template ng-container *ngTemplateOutlet <ng-container *ngTemplateOutlet=” progressBarIconTemplate; context:{ $implicit: “https://…” alt: label }” /> <ng-template let-src let-alt=”alt”> <img [src]=”src” [alt]=alt> </ng-template>
them (Not all CSS Selectors have the same performance) Reduce amount of DOM Level 3 - Performance Type Checking Directive Shorthands Performance Rule 6: Make sure your component is fast
--property-name{ syntax: “<color>”; inherits: false; initial-value: #ff0000; } Type Checking Directive Shorthands Performance Bonus Full browser support coming soon! Rule 7: Keep up to date with web standards to improve your design system