Skip to content

Commit f838726

Browse files
hawkgspkozlowski-opensource
authored andcommitted
refactor(devtools): typography (angular#60531)
Introduce typography placeholder classes and employ them across the app where applicable. PR Close angular#60531
1 parent 2e87130 commit f838726

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+255
-149
lines changed

devtools/projects/demo-standalone/src/BUILD.bazel

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ copy_to_directory(
2727
},
2828
)
2929

30+
copy_to_directory(
31+
name = "assets",
32+
srcs = [
33+
"//devtools/projects/ng-devtools/src/assets",
34+
],
35+
out = "assets",
36+
replace_prefixes = {
37+
"devtools/projects/ng-devtools/src/assets": "",
38+
},
39+
)
40+
3041
ng_module(
3142
name = "demo",
3243
srcs = ["main.ts"],
@@ -59,6 +70,7 @@ exports_files(["index.html"])
5970
filegroup(
6071
name = "dev_app_static_files",
6172
srcs = [
73+
":assets",
6274
":browser_specific_styles",
6375
":demo_styles",
6476
":index.html",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package(default_visibility = ["//devtools:__subpackages__"])
2+
3+
filegroup(
4+
name = "assets",
5+
srcs = glob(["*"]),
6+
)

devtools/projects/ng-devtools/src/lib/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ package(default_visibility = ["//visibility:public"])
88
sass_binary(
99
name = "devtools_component_styles",
1010
src = "devtools.component.scss",
11+
deps = [
12+
"//devtools/projects/ng-devtools/src/styles:typography",
13+
],
1114
)
1215

1316
ng_module(

devtools/projects/ng-devtools/src/lib/devtools-tabs/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ package(default_visibility = ["//visibility:public"])
88
sass_binary(
99
name = "devtools_tabs_component_styles",
1010
src = "devtools-tabs.component.scss",
11+
deps = [
12+
"//devtools/projects/ng-devtools/src/styles:typography",
13+
],
1114
)
1215

1316
ng_module(

devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection/resolution-path/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ sass_binary(
99
name = "resolution_path_styles",
1010
src = "resolution-path.component.scss",
1111
visibility = ["//visibility:private"],
12+
deps = [
13+
"//devtools/projects/ng-devtools/src/styles:typography",
14+
],
1215
)
1316

1417
ng_module(

devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection/resolution-path/resolution-path.component.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '../../../../styles/typography';
2+
13
:host {
24
display: flex;
35
flex-wrap: wrap;
@@ -6,15 +8,17 @@
68
border-top: 1px solid var(--senary-contrast);
79

810
.node {
11+
@extend %body-01;
912
position: relative;
1013
border-radius: 5px;
1114
background: var(--octonary-contrast);
1215
color: black;
1316
padding: 4px 25px 4px 15px;
1417
margin-bottom: 0.25rem;
15-
font-size: 0.75rem;
1618
height: 28px;
1719
box-sizing: border-box;
20+
display: flex;
21+
align-items: center;
1822

1923
&.type-env {
2024
background: var(--red-06);

devtools/projects/ng-devtools/src/lib/devtools-tabs/devtools-tabs.component.scss

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '../../styles/typography';
2+
13
:host {
24
position: relative;
35
width: 100%;
@@ -49,8 +51,6 @@ nav {
4951
align-self: center;
5052
margin-left: auto;
5153
margin-right: 8px;
52-
font-size: 0.8em;
53-
font-weight: bold;
5454
white-space: nowrap;
5555
text-overflow: ellipsis;
5656
overflow: hidden;
@@ -78,13 +78,11 @@ mat-icon {
7878
}
7979

8080
.mat-mdc-tab-link {
81+
@extend %body-medium-01;
8182
min-width: unset;
82-
line-height: 30px;
8383
height: 30px;
84-
font-size: 13px;
8584
padding: 0px 10px;
8685
opacity: 1;
87-
font-weight: 400;
8886
}
8987

9088
@media only screen and (max-width: 700px) {
@@ -118,5 +116,4 @@ mat-icon {
118116
padding: 2px;
119117
outline-offset: -2px;
120118
width: 100px;
121-
font-size: 12px;
122119
}

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ package(default_visibility = ["//visibility:public"])
66
sass_binary(
77
name = "directive_forest_component_styles",
88
src = "directive-forest.component.scss",
9+
deps = [
10+
"//devtools/projects/ng-devtools/src/styles:typography",
11+
],
912
)
1013

1114
ng_module(

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ package(default_visibility = ["//visibility:public"])
66
sass_binary(
77
name = "breadcrumbs_component_styles",
88
src = "breadcrumbs.component.scss",
9+
deps = [
10+
"//devtools/projects/ng-devtools/src/styles:typography",
11+
],
912
)
1013

1114
ng_module(

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs/breadcrumbs.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '../../../../../styles/typography';
2+
13
.mdc-card.breadcrumb-card {
24
padding: 0;
35
width: 100%;
@@ -31,6 +33,7 @@
3133
}
3234

3335
button {
36+
@extend %monospaced;
3437
height: 24px;
3538

3639
&.selected {
@@ -42,7 +45,6 @@
4245
.mdc-button {
4346
height: 20px;
4447
line-height: 20px;
45-
font-size: 11px;
4648
margin-right: 5px;
4749
width: fit-content;
4850
color: var(--color-tree-node-element-name);

0 commit comments

Comments
 (0)