forked from primer/view_components
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpage_header.pcss
More file actions
103 lines (85 loc) · 2.14 KB
/
page_header.pcss
File metadata and controls
103 lines (85 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/* OP PageHeader */
.PageHeader {
display: flex;
padding-bottom: var(--base-size-8);
margin-bottom: var(--base-size-16);
border-bottom: var(--borderWidth-thin) solid var(--borderColor-muted);
flex-flow: column;
}
.PageHeader--withTabNav {
border-bottom: none;
padding-bottom: 0;
margin-bottom: 0;
}
.PageHeader-contextBar {
display: flex;
flex-flow: row;
justify-content: flex-end;
align-items: center;
margin-bottom: var(--base-size-8);
height: var(--control-small-size);
}
.PageHeader-titleBar {
display: flex;
flex-flow: row;
justify-content: flex-end;
align-items: center; /* Keep back button vertically aligned. */
margin-bottom: var(--base-size-8);
}
.PageHeader-title {
font-size: var(--text-title-size-medium);
flex: 1 1 auto;
}
.PageHeader-title--large {
font-size: var(--text-title-size-large);
}
/* One-liner of supporting text */
.PageHeader-description {
font-size: var(--text-body-size-medium);
color: var(--fgColor-muted);
flex: 1 auto;
}
.PageHeader-description--underlined-links a {
/* Ensure the accessibility is met, given that the description is written in light grey */
text-decoration: underline;
}
.PageHeader-tabNavBar {
overflow: auto;
}
.PageHeader-tabNavBar .PageHeader-tabNav {
min-width: max-content;
}
.PageHeader--withTabNav .PageHeader-description {
margin-bottom: var(--base-size-16);
}
.PageHeader-actions {
justify-content: flex-end;
display: flex;
align-items: center;
}
.PageHeader-breadcrumbs {
display: block;
width: 100%;
}
.PageHeader-leadingAction {
margin-top: var(--base-size-2); /* to center align with label */
margin-right: var(--base-size-4);
}
.PageHeader-parentLink {
flex: 1 1 auto;
}
/* Hide the context bar on desktop when no breadcrumb is visible */
@media screen and (min-width: 543.98px) {
.PageHeader--noBreadcrumb .PageHeader-contextBar {
display: none;
}
}
/* Match the title bar and actions height with the toggle menu button for proper vertical alignment */
.PageHeader--noBreadcrumb {
& .PageHeader-titleBar {
line-height: var(--control-small-size);
}
& .PageHeader-actions {
height: var(--control-small-size);
}
}