xref: /aosp_15_r20/development/tools/winscope/src/viewers/components/styles/viewer_card.styles.ts (revision 90c8c64db3049935a07c6143d7fd006e26f8ecca)
1/*
2 * Copyright (C) 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17export const viewerCardStyle = `
18  .rects-view:not(.collapsed),
19  .hierarchy-view:not(.collapsed),
20  .ime-additional-properties:not(.collapsed),
21  .properties-view:not(.collapsed),
22  .log-view:not(.collapsed),
23  .property-groups:not(.collapsed),
24  .global-search:not(.collapsed),
25  .search-results:not(.collapsed),
26  .how-to-search:not(.collapsed) {
27    display: flex;
28    flex-direction: column;
29    overflow: auto;
30    border-radius: 4px;
31    margin: 4px;
32    padding-bottom: 12px;
33    background-color: var(--background-color);
34    box-shadow: 0px 1px 3px var(--border-color), 0px 1px 2px var(--border-color);
35  }
36
37  .rects-view:not(.collapsed),
38  .hierarchy-view:not(.collapsed),
39  .ime-additional-properties:not(.collapsed),
40  .properties-view:not(.collapsed),
41  .global-search:not(.collapsed),
42  .how-to-search:not(.collapsed) {
43    flex: 1;
44  }
45
46  .property-groups:not(.collapsed):not(.empty) {
47    flex: 2;
48  }
49
50  .property-groups.empty:not(.collapsed) {
51    flex: 0.2;
52  }
53
54  .log-view:not(.collapsed),
55  .search-results:not(.collapsed) {
56    flex: 3;
57  }
58
59  .collapsed {
60    display: none;
61  }
62`;
63
64export const viewerCardInnerStyle = `
65  .title-section {
66    display: flex;
67    flex-direction: row;
68    flex-wrap: wrap;
69    justify-content: space-between;
70    background-color: var(--card-title-background-color);
71    padding: 0px 12px 0px 12px;
72  }
73
74  .view-controls {
75    display: flex;
76    flex-direction: row;
77    align-items: baseline;
78    padding: 8px 12px;
79    overflow-x: auto;
80    overflow-y: hidden;
81  }
82
83  .placeholder-text {
84    padding: 8px 12px;
85  }
86
87  .padded-title {
88    padding-bottom: 8px;
89  }
90`;
91