PluginProbe
Code Snippets / 3.10.0-beta.1
Code Snippets v3.10.0-beta.1
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 / edit / _form.scss

_form.scss in Code Snippets 3.10.0-beta.1, at css/edit/_form.scss

163 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use '../common/theme';
2
3 $sidebar-width: 321px;
4 $sidebar-gap: 30px;
5
6 .snippet-form #titlediv #title,
7 .snippet-type-container {
8 border-color: #ccc;
9 block-size: 45px
10 }
11
12 // The type selector is a react-select control that sizes to its content; pin
13 // its bordered control box to the same 45px as the adjacent title field and
14 // keep the selected value vertically centred within it.
15 .snippet-type-container .code-snippets-select {
16 block-size: 100%;
17
18 // Target the control box only (:first-of-type). The open menu is a later
19 // sibling div; matching it here would clamp and flex-row the option list.
20 > div:first-of-type {
21 min-block-size: 45px;
22 block-size: 45px;
23 max-block-size: 45px;
24 }
25
26 > div:first-of-type > div:first-child {
27 display: flex;
28 align-items: center;
29 block-size: 45px;
30 padding-block: 0;
31 }
32 }
33
34 .snippet-type-option {
35 display: flex;
36 align-items: center;
37 justify-content: space-between;
38 flex-flow: row;
39 gap: 2em;
40
41 .snippet-type-option-main {
42 display: flex;
43 align-items: center;
44 gap: 8px;
45 }
46
47 .small-badge {
48 margin-inline-start: 0.5em;
49 }
50 }
51
52
53 .conditions-editor-open {
54 .conditions-editor-header {
55 display: flex;
56 align-items: center;
57 justify-content: space-between;
58 gap: 8px;
59 }
60
61 .button.button-large {
62 display: flex;
63 align-items: center;
64 gap: 8px;
65 inline-size: 100%;
66 border-color: #ccc;
67 padding-block: 6px;
68 padding-inline: 12px;
69 }
70
71 &.no-condition .cond-badge {
72 background: transparent;
73 color: inherit;
74 border: 1px solid currentcolor;
75 }
76
77 &.no-condition:hover :not([disabled]) .cond-badge {
78 color: #fff;
79 background: theme.$accent;
80 border-color: theme.$accent;
81 }
82 }
83
84 .snippet-form {
85 margin-block-start: 10px;
86 display: grid;
87 gap: $sidebar-gap;
88 grid-template-columns: 1fr $sidebar-width;
89 grid-template-areas: 'upper sidebar' 'lower sidebar';
90 transition: all 700ms;
91
92 @media (prefers-reduced-motion: reduce) {
93 transition-duration: 0.01s;
94 }
95
96 &.snippet-form-expanded {
97 grid-template-areas: 'upper upper' 'lower sidebar';
98 }
99
100 .snippet-form-upper {
101 grid-area: upper;
102 }
103
104 .snippet-form-lower {
105 grid-area: lower;
106 }
107
108 .snippet-form-upper,
109 .snippet-form-lower {
110 display: flex;
111 flex-flow: column;
112 gap: 24px;
113 }
114
115 .snippet-editor-sidebar {
116 grid-area: span 3 / sidebar;
117 max-inline-size: $sidebar-width;
118 position: sticky;
119 inset-block-start: 32px;
120 align-self: start;
121 }
122
123 @media (width <= 1024px) {
124 grid-template-columns: 1fr;
125 }
126
127 h2, h3 {
128 margin-block: 25px 15px;
129 margin-inline: 0;
130 font-size: 1.16em;
131
132 label {
133 cursor: auto;
134 }
135
136 .button {
137 font-weight: normal;
138 }
139 }
140 }
141
142 .above-editor-container {
143 display: flex;
144 flex-flow: row wrap;
145 gap: 1em;
146
147 > * {
148 flex: 1;
149 display: flex;
150 flex-flow: column;
151 min-inline-size: 180px;
152 }
153 }
154
155 // Match the location selector's control height to the adjacent conditions
156 // button so the two sidebar controls line up. This targets a different
157 // container than the type selector rules above, so their relative order does
158 // not affect the cascade.
159 // stylelint-disable-next-line no-descending-specificity
160 .snippet-editor-sidebar .code-snippets-select.code-snippets-select-location > div:first-of-type {
161 min-block-size: 48px;
162 }
163