如何在 Dart 2 中使用 material angular dart 组件的排版?
How to use typography of material angular dart components with Dart 2?
我想在 material angular_dart 组件的帮助下在组件中使用 material 版式。我怎样才能做到这一点?
app_component.html
<section class="layout">
<h1 class="headline">The headline goes here!</h1>
<h2 class="sub-headline">Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.</h2>
<div class="body-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</section>
app_component.scss
@import 'package:angular_components/css/material/material';
:host {
}
.headline {
}
.sub-headline {
}
.body-text {
}
有一堆 mixins 可以使用 here:
以你的例子为例:
@import 'package:angular_components/css/material/material';
.headline {
@include mat-font-headline;
}
.sub-headline {
@include mat-font-subhead;
}
.body-text {
@include mat-font-body;
}
我想在 material angular_dart 组件的帮助下在组件中使用 material 版式。我怎样才能做到这一点? app_component.html
<section class="layout">
<h1 class="headline">The headline goes here!</h1>
<h2 class="sub-headline">Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.</h2>
<div class="body-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</section>
app_component.scss
@import 'package:angular_components/css/material/material';
:host {
}
.headline {
}
.sub-headline {
}
.body-text {
}
有一堆 mixins 可以使用 here:
以你的例子为例:
@import 'package:angular_components/css/material/material';
.headline {
@include mat-font-headline;
}
.sub-headline {
@include mat-font-subhead;
}
.body-text {
@include mat-font-body;
}