@@ -128,15 +128,15 @@ determine component colors:
128128
129129* A ** primary** palette for the color that appears most frequently throughout your application
130130
131- 在整个应用程序中最常出现的颜色的 ** primary\ ( 主要\ )** 调色板
131+ 在整个应用程序中最常出现的颜色的 ** primary(主要)** 调色板
132132
133133* An ** accent** , or _ secondary_ , palette used to selectively highlight key parts of your UI
134134
135- 用于有选择地突出显示 UI 中某些关键部位的 ** accent\ ( 强调\ )** 或 * secondary\ ( 辅助\ )* 调色板
135+ 用于有选择地突出显示 UI 中某些关键部位的 ** accent(强调)** 或 * secondary(辅助)* 调色板
136136
137137* A ** warn** , or _ error_ , palette used for warnings and error states
138138
139- 用于警告和错误状态的 ** warn\ ( 警告\ )** 或 * error\ ( 错误\ )* 调色板
139+ 用于警告和错误状态的 ** warn(警告)** 或 * error(错误)* 调色板
140140
141141You can include the CSS styles for a theme in your application in one of two ways: by defining a
142142custom theme with Sass, or by importing a pre-built theme CSS file.
@@ -186,7 +186,7 @@ represent, in order: the "default" hue, a "lighter" hue, a "darker" hue, and a "
186186Components use these hues to choose the most appropriate color for different parts of
187187themselves.
188188
189- 构建主题首先需要定义你的 ` primary ` \ ( 主要\ ) 和 ` accent ` \ ( 重音\ ) 调色板,以及可选的 ` warn ` \ ( 警告\ ) 调色板。Sass 函数 ` define-palette ` 接受一个调色板(这在上面的[ 调色板] ( #palettes ) 部分中讲过)以及四个可选的色调数值。这四种色调依次表示:“default\ ( 默认\ ) ”色调、“lighter\ ( 较浅\ ) ”色调、“darker\ ( 较暗\ ) ”色调和“text\ ( 文本\ ) ”色调。各个组件会使用这些色调为自身的不同部位选择最合适的颜色。
189+ 构建主题首先需要定义你的 ` primary ` (主要)和 ` accent ` (重音)调色板,以及可选的 ` warn ` (警告)调色板。Sass 函数 ` define-palette ` 接受一个调色板(这在上面的[ 调色板] ( #palettes ) 部分中讲过)以及四个可选的色调数值。这四种色调依次表示:“default(默认)”色调、“lighter(较浅)”色调、“darker(较暗)”色调和“text(文本)”色调。各个组件会使用这些色调为自身的不同部位选择最合适的颜色。
190190
191191``` scss
192192@use ' @angular/material' as mat ;
@@ -248,7 +248,7 @@ configuration to `define-light-theme` or `define-dark-theme`.
248248Apply the styles for each of the components used in your application by including each of their
249249theme Sass mixins.
250250
251- 通过包含 \ (` include ` \ ) 每个主题 Sass mixins,可以为应用程序中使用的每个组件应用样式。
251+ 通过包含 (` include ` ) 每个主题 Sass mixins,可以为应用程序中使用的每个组件应用样式。
252252
253253``` scss
254254@use ' @angular/material' as mat ;
@@ -321,17 +321,17 @@ You can use one of these pre-built themes if you don't want to define a custom t
321321
322322Angular Material 包括四个预构建的主题 CSS 文件,每个文件都选择了不同的调色板。如果你不想使用 Sass 来自定义主题,则可以使用这些预构建的主题之一。
323323
324- | Theme | Light or dark? | Palettes (primary, accent, warn) |
325- | ----- | -------------- | -------------------------------- |
326- | 主题 | 亮还是暗? | 调色板(primary, accent, warn) |
327- | ` deeppurple-amber.css ` | Light | deep-purple, amber, red |
328- | ` deeppurple-amber.css ` | 亮 | deep-purple, amber, red |
329- | ` indigo-pink.css ` | Light | indigo, pink, red |
330- | ` indigo-pink.css ` | 亮 | indigo, pink, red |
331- | ` pink-bluegrey.css ` | Dark | pink, blue-grey, red |
332- | ` pink-bluegrey.css ` | 暗 | pink, bluegrey, red |
333- | ` purple-green.css ` | Dark | purple, green, red |
334- | ` purple-green.css ` | 暗 | purple, green, red |
324+ | Theme | Light or dark? | Palettes (primary, accent, warn) |
325+ | ---------------------- | -------------- | -------------------------------- |
326+ | 主题 | 亮还是暗? | 调色板(primary, accent, warn) |
327+ | ` deeppurple-amber.css ` | Light | deep-purple, amber, red |
328+ | ` deeppurple-amber.css ` | 亮 | deep-purple, amber, red |
329+ | ` indigo-pink.css ` | Light | indigo, pink, red |
330+ | ` indigo-pink.css ` | 亮 | indigo, pink, red |
331+ | ` pink-bluegrey.css ` | Dark | pink, blue-grey, red |
332+ | ` pink-bluegrey.css ` | 暗 | pink, bluegrey, red |
333+ | ` purple-green.css ` | Dark | purple, green, red |
334+ | ` purple-green.css ` | 暗 | purple, green, red |
335335
336336These files include the CSS for every component in the library. To include only the CSS for a subset
337337of components, you must use the Sass API detailed in [ Defining a theme] ( #defining-a-theme ) above.
@@ -341,11 +341,11 @@ theme definitions.
341341这些文件包括库中每个组件的 CSS。如果要单独包含这些组件的某个子集的 CSS,你必须使用上面[ 定义主题] ( #defining-a-theme ) 中详述的 Sass API。你可以[ 参考这些预建主题的源代码] [ prebuilt ] 查看完整主题定义的示例。
342342
343343You can find the pre-built theme files in the "prebuilt-themes" directory of Angular Material's
344- npm package \ (` @angular/material/prebuilt-themes ` \ ) . To include the pre-built theme in your
344+ npm package (` @angular/material/prebuilt-themes ` ). To include the pre-built theme in your
345345application, [ add your chosen CSS file to the ` styles ` array of your project's ` angular.json `
346346file] [ adding-styles ] .
347347
348- 你可以在 Angular Material 的 npm 包 \ ( ` @angular/material/prebuilt-themes ` \ ) 的 ` prebuilt-themes ` 目录中找到预构建的主题文件。要在你的应用程序中包含预先构建的主题,[ 请将你选择的 CSS 文件添加到你项目的 ` angular.json ` 文件的 ` styles ` 数组中] [ adding-styles ] 。
348+ 你可以在 Angular Material 的 npm 包 ( ` @angular/material/prebuilt-themes ` ) 的 ` prebuilt-themes ` 目录中找到预构建的主题文件。要在你的应用程序中包含预先构建的主题,[ 请将你选择的 CSS 文件添加到你项目的 ` angular.json ` 文件的 ` styles ` 数组中] [ adding-styles ] 。
349349
350350[ prebuilt ] : https://github.com/angular/components/blob/main/src/material/core/theming/prebuilt
351351
@@ -440,7 +440,7 @@ to match the components' theme, you can either:
440440
441441 假设你正在使用 ` MatSidenav ` ,请将应用程序的主要内容放入 ` mat-sidenav-container ` ,或者
442442
443- 2 . Apply the ` mat-app-background ` CSS class to your main content root element \ ( typically ` body ` \ ) .
443+ 2 . Apply the ` mat-app-background ` CSS class to your main content root element (typically ` body ` ).
444444
445445 将 ` mat-app-background ` CSS 类应用到你主要内容的根元素(通常是 ` body ` )。
446446
@@ -518,7 +518,7 @@ the number for _less density_.
518518Angular Material 的密集度定制是基于 [ Material Design 密集度指南] ( https://m2.material.io/design/layout/applying-density.html ) 的。该系统定义了一个等级,其中零表示默认密集度。你可以减少该数字以* 增加密集度* ,增加该数字以* 减少密集度* 。
519519
520520The density system is based on a * density scale* . The scale starts with the
521- default density of ` 0 ` . Each whole number step down \ (` -1 ` , ` -2 ` , etc.\ ) reduces
521+ default density of ` 0 ` . Each whole number step down (` -1 ` , ` -2 ` , etc.) reduces
522522the affected sizes by ` 4px ` , down to the minimum size necessary for a component to render coherently.
523523
524524密集度系统基于某个* 密集度等级* 。此等级以默认密集度 ` 0 ` 开始。每个整数递减(` -1 ` 、` -2 ` 等)都会将受影响的尺寸减小 ` 4px ` ,直至组件连续渲染所需的最小尺寸。
0 commit comments