File: cr_dialog.css

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (160 lines) | stat: -rw-r--r-- 4,360 bytes parent folder | download | duplicates (2)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/* Copyright 2024 The Chromium Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

/* #css_wrapper_metadata_start
 * #type=style-lit
 * #import=../cr_shared_vars.css.js
 * #import=../cr_hidden_style_lit.css.js
 * #import=../cr_icons_lit.css.js
 * #import=../cr_scrollable_lit.css.js
 * #scheme=relative
 * #include=cr-hidden-style-lit cr-icons-lit cr-scrollable-lit
 * #css_wrapper_metadata_end */

dialog {
  background-color: var(--cr-dialog-background-color, white);
  border: 0;
  border-radius: var(--cr-dialog-border-radius, 8px);
  bottom: 50%;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.12),
              0 16px 16px rgba(0, 0, 0, 0.24);
  color: inherit;
  line-height: 20px;
  max-height: initial;
  max-width: initial;
  overflow-y: hidden;
  padding: 0;
  position: absolute;
  top: 50%;
  width: var(--cr-dialog-width, 512px);
}

@media (prefers-color-scheme: dark) {
  dialog {
    background-color: var(--cr-dialog-background-color,
        var(--google-grey-900));
    /* Note: the colors in linear-gradient() are intentionally the same to
     * add a 4% white layer on top of the fully opaque background-color. */
    background-image: linear-gradient(rgba(255, 255, 255, .04),
                                      rgba(255, 255, 255, .04));
  }
}

@media (forced-colors: active) {
  dialog {
    /* Use border instead of box-shadow (which does not work) in Windows
       HCM. */
    border: var(--cr-border-hcm);
  }
}

dialog[open] #content-wrapper {
  /* Keep max-height within viewport, and flex content accordingly. */
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow: auto;
}

/* When needing to flex, force .body-container alone to shrink. */
.top-container,
:host ::slotted([slot=button-container]),
:host ::slotted([slot=footer]) {
  flex-shrink: 0;
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
}

:host ::slotted([slot=body]) {
  color: var(--cr-secondary-text-color);
  padding: 0 var(--cr-dialog-body-padding-horizontal, 20px);
}

:host ::slotted([slot=title]) {
  color: var(--cr-primary-text-color);
  flex: 1;
  font-family: var(--cr-dialog-font-family, inherit);
  font-size: var(--cr-dialog-title-font-size, calc(15 / 13 * 100%));
  line-height: 1;
  padding-bottom: var(--cr-dialog-title-slot-padding-bottom, 16px);
  padding-inline-end:  var(--cr-dialog-title-slot-padding-end, 20px);
  padding-inline-start: var(--cr-dialog-title-slot-padding-start, 20px);
  padding-top: var(--cr-dialog-title-slot-padding-top, 20px);
}

/* Note that if the padding is non-uniform and the button-container
 * border is visible, then the buttons will appear off-center. */
:host ::slotted([slot=button-container]) {
  display: flex;
  justify-content: flex-end;
  padding-bottom: var(--cr-dialog-button-container-padding-bottom, 16px);
  padding-inline-end: var(--cr-dialog-button-container-padding-horizontal, 16px);
  padding-inline-start: var(--cr-dialog-button-container-padding-horizontal, 16px);
  padding-top: var(--cr-dialog-button-container-padding-top, 16px);
}

:host ::slotted([slot=footer]) {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  border-top: 1px solid #dbdbdb;
  margin: 0;
  padding: 16px 20px;
}

:host([hide-backdrop]) dialog::backdrop {
  opacity: 0;
}

@media (prefers-color-scheme: dark) {
  :host ::slotted([slot=footer]) {
    border-top-color: var(--cr-separator-color);
  }
}

.body-container {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 1.375rem; /* Minimum reasonably usable height. */
  overflow: auto;
}

.top-container {
  align-items: flex-start;
  display: flex;
  min-height: var(--cr-dialog-top-container-min-height, 31px);
}

.title-container {
  display: flex;
  flex: 1;
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
  outline: none;
}

#close {
  align-self: flex-start;
  margin-inline-end: 4px;
  margin-top: 4px;
}

/* If --cr-dialog-body-border-top is defined, force show the scrollable top
 * border and override its styling. */
/* clean-css ignore:start */
@container style(--cr-dialog-body-border-top) {
  .cr-scrollable-top {
    display: block;
    border-top: var(--cr-dialog-body-border-top);
  }
}
/* clean-css ignore:end */