PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / css / common / _modal.scss

_modal.scss in Code Snippets 4.0.0-beta.2, at css/common/_modal.scss

186 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use 'theme';
2
3 .code-snippets-modal {
4 .components-modal__header {
5 padding-block-end: 24px;
6 }
7
8 .components-modal__content {
9 padding: 0;
10 display: flex;
11 flex-flow: column;
12 background: var(--cs-color-surface-subtle);
13 overflow: initial;
14 max-inline-size: 100%;
15 }
16
17 .modal-content {
18 flex: 1;
19 padding-block: 36px;
20 padding-inline: 45px;
21 display: flex;
22 flex-flow: column;
23 }
24
25 .components-modal__header + div {
26 display: flex;
27 flex-flow: column;
28 flex: 1;
29 overflow-y: auto;
30 }
31
32 .modal-footer {
33 border-block-start: 1px solid var(--cs-color-border-subtle);
34 display: flex;
35 flex-flow: row-reverse;
36 justify-content: space-between;
37 align-items: center;
38 inset-block-end: 0;
39 background: var(--cs-color-surface-subtle);
40 inline-size: 100%;
41 padding: 11px 19px;
42
43 .button-link {
44 text-decoration: none;
45 }
46
47 .button-large {
48 block-size: 45px;
49
50 &.button-primary {
51 padding: 0 30px;
52 }
53 }
54 }
55 }
56
57 .components-modal__frame.code-snippets-preview-modal {
58 min-inline-size: 520px;
59 min-block-size: 240px;
60 inline-size: var(--cs-preview-modal-inline-size);
61 max-block-size: 85vh;
62
63 @media (width <= 600px) {
64 min-inline-size: 90vw;
65 }
66
67 .components-modal__header {
68 border-block-end-color: #ddd;
69 }
70
71 .code-snippets-preview-modal__badge {
72 display: flex;
73 flex-shrink: 0;
74 margin-inline-end: 8px;
75 }
76
77 // Header and footer stay pinned; the CodeMirror editor is the only
78 // scroll region, scrolling long code both vertically and horizontally.
79 .components-modal__content {
80 display: flex;
81 flex-flow: column;
82 min-block-size: 0;
83 padding: 0;
84 overflow: hidden;
85 }
86
87 // Newer Modal versions wrap children in an unstyled focus container.
88 .components-modal__header + div {
89 display: flex;
90 flex-flow: column;
91 flex: 1;
92 min-block-size: 0;
93 overflow: hidden;
94 }
95
96 .code-snippets-preview-modal__editor {
97 display: flex;
98 flex-flow: column;
99 flex: 1;
100 min-block-size: 0;
101
102 .CodeMirror {
103 flex: 1;
104 min-block-size: 0;
105 block-size: 100%;
106 }
107
108 textarea {
109 flex: 1;
110 min-block-size: 0;
111 inline-size: 100%;
112 resize: none;
113 font-family: monospace;
114 }
115 }
116
117 .code-snippets-preview-modal__footer {
118 display: flex;
119 align-items: center;
120 justify-content: space-between;
121 flex-wrap: wrap;
122 flex-shrink: 0;
123 gap: 16px;
124 padding: 11px 19px;
125 border-block-start: 1px solid var(--cs-color-border-subtle);
126 background: var(--cs-color-surface-subtle);
127 }
128
129 .code-snippets-preview-modal__priority {
130 display: flex;
131 align-items: center;
132 gap: 8px;
133 font-size: 14px;
134 color: var(--cs-color-text-muted);
135
136 .code-snippets-preview-modal__priority-value {
137 font-weight: 600;
138 color: var(--cs-color-text);
139 }
140 }
141
142 .code-snippets-preview-modal__buttons {
143 display: flex;
144 align-items: center;
145 flex-wrap: wrap;
146 gap: 8px;
147
148 .button {
149 border-radius: 5px;
150 font-size: 14px;
151 }
152
153 .button-link.code-snippets-preview-modal__trash {
154 min-block-size: 38px;
155 padding-block: 0;
156 padding-inline: 16px;
157 border: 1px solid var(--cs-color-error);
158 border-radius: 5px;
159 background: var(--cs-color-surface-subtle);
160 line-height: 2.5715;
161 font-weight: 400;
162 color: var(--cs-color-error);
163 text-decoration: none;
164
165 &:hover,
166 &:focus {
167 border-color: var(--cs-color-error);
168 background: var(--cs-color-surface-muted);
169 color: var(--cs-color-error);
170 }
171 }
172 }
173 }
174
175 .components-modal__content {
176 .action-buttons {
177 display: flex;
178 justify-content: flex-end;
179 }
180
181 .components-button.is-secondary {
182 box-shadow: none;
183 }
184 }
185
186