vanilla-jui 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -2
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/form.ts +51 -14
- package/src/components/modal.ts +52 -50
- package/src/components/pagination.ts +3 -1
- package/src/css/accordion.css +13 -6
- package/src/css/color.css +1 -2
- package/src/css/color_p3.css +1 -4
- package/src/css/content.css +18 -18
- package/src/css/drop.css +1 -1
- package/src/css/gradient.css +128 -63
- package/src/css/layout.css +11 -7
- package/src/css/menu.css +4 -3
- package/src/css/swiper.css +1 -1
- package/src/css/tabs.css +1 -1
- package/src/css/themes/default/drop.css +1 -1
- package/src/css/themes/default/swiper.css +1 -1
- package/src/css/themes/default/tabs.css +1 -1
- package/src/css/tokens.css +1 -1
- package/src/css/tooltip.css +1 -1
package/package.json
CHANGED
package/src/components/form.ts
CHANGED
|
@@ -13,10 +13,7 @@ import {
|
|
|
13
13
|
defineComponent,
|
|
14
14
|
} from '../core/component.ts';
|
|
15
15
|
import { joinClasses } from '../utilities/class-name.ts';
|
|
16
|
-
import {
|
|
17
|
-
type RenderableContent,
|
|
18
|
-
all,
|
|
19
|
-
} from '../utilities/dom.ts';
|
|
16
|
+
import { type RenderableContent, all } from '../utilities/dom.ts';
|
|
20
17
|
import { randomId } from '../utilities/id.ts';
|
|
21
18
|
import { isPlainObject } from '../utilities/object.ts';
|
|
22
19
|
import {
|
|
@@ -136,6 +133,8 @@ export interface FormValidatorConfig {
|
|
|
136
133
|
[key: string]: unknown;
|
|
137
134
|
}
|
|
138
135
|
|
|
136
|
+
export type ButtonsPosition = 'start' | 'center' | 'end';
|
|
137
|
+
|
|
139
138
|
export interface FormProps extends Record<string, unknown> {
|
|
140
139
|
id?: string | null;
|
|
141
140
|
vertical?: boolean;
|
|
@@ -143,6 +142,7 @@ export interface FormProps extends Record<string, unknown> {
|
|
|
143
142
|
style?: FormStyle;
|
|
144
143
|
fields?: readonly FormItem<FormField>[];
|
|
145
144
|
buttons?: boolean | readonly FormButton[];
|
|
145
|
+
buttonsPosition?: ButtonsPosition;
|
|
146
146
|
className?: FormClassNameConfig;
|
|
147
147
|
validator?: FormValidatorConfig;
|
|
148
148
|
onSubmit?:
|
|
@@ -158,13 +158,24 @@ interface ResolvedFormProps extends Record<string, unknown> {
|
|
|
158
158
|
style: FormStyle;
|
|
159
159
|
fields: FormItem<FormField>[];
|
|
160
160
|
buttons: FormButton[];
|
|
161
|
+
buttonsPosition: ButtonsPosition;
|
|
161
162
|
className: FormClassNames;
|
|
162
163
|
validator: FormValidatorConfig;
|
|
163
164
|
onSubmit: ((data: FormDataRecord, form: Form) => void | Promise<void>) | null;
|
|
164
165
|
onReset: ((event: Event, form: Form) => void) | null;
|
|
165
166
|
}
|
|
166
167
|
|
|
167
|
-
interface FormState extends
|
|
168
|
+
interface FormState extends Record<string, unknown> {
|
|
169
|
+
id: string;
|
|
170
|
+
vertical: boolean;
|
|
171
|
+
itemVertical: boolean;
|
|
172
|
+
style: FormStyle;
|
|
173
|
+
fields: FormItem<FormField>[];
|
|
174
|
+
buttons: FormButton[];
|
|
175
|
+
className: FormClassNames;
|
|
176
|
+
validator: FormValidatorConfig;
|
|
177
|
+
onSubmit: ((data: FormDataRecord, form: Form) => void | Promise<void>) | null;
|
|
178
|
+
onReset: ((event: Event, form: Form) => void) | null;
|
|
168
179
|
submitting: boolean;
|
|
169
180
|
data: FormDataRecord | null;
|
|
170
181
|
}
|
|
@@ -251,6 +262,11 @@ const FORM_PROPS_SCHEMA = {
|
|
|
251
262
|
return value;
|
|
252
263
|
},
|
|
253
264
|
},
|
|
265
|
+
buttonsPosition: {
|
|
266
|
+
default: 'end',
|
|
267
|
+
type: 'string',
|
|
268
|
+
enum: ['start', 'center', 'end'],
|
|
269
|
+
},
|
|
254
270
|
className: {
|
|
255
271
|
default: DEFAULT_CLASS_NAMES,
|
|
256
272
|
type: 'object',
|
|
@@ -311,7 +327,7 @@ function flattenFormItems(
|
|
|
311
327
|
current: FormItem<FormField>
|
|
312
328
|
): FormItem<FormField> | null => {
|
|
313
329
|
const index = roots.indexOf(current);
|
|
314
|
-
return index >= 0 ?
|
|
330
|
+
return index >= 0 ? roots[index + 1] || null : null;
|
|
315
331
|
};
|
|
316
332
|
|
|
317
333
|
for (const root of roots) {
|
|
@@ -386,6 +402,10 @@ function setElementStyle(element: HTMLElement, style: FormStyle): void {
|
|
|
386
402
|
}
|
|
387
403
|
}
|
|
388
404
|
|
|
405
|
+
function resolveButtonsJustifyContent(position: ButtonsPosition): string {
|
|
406
|
+
return position === 'center' ? 'center' : `flex-${position}`;
|
|
407
|
+
}
|
|
408
|
+
|
|
389
409
|
function cloneValidator(validator: unknown): FormValidatorConfig {
|
|
390
410
|
const source = (
|
|
391
411
|
isPlainObject(validator) ? validator : {}
|
|
@@ -412,6 +432,7 @@ function normalizeProps(input: FormProps): ResolvedFormProps {
|
|
|
412
432
|
style: props.style as FormStyle,
|
|
413
433
|
fields,
|
|
414
434
|
buttons: cloneButtons(props.buttons as readonly FormButton[]),
|
|
435
|
+
buttonsPosition: props.buttonsPosition as ButtonsPosition,
|
|
415
436
|
className: resolveClassNames(props.className),
|
|
416
437
|
validator: cloneValidator(props.validator),
|
|
417
438
|
onSubmit: props.onSubmit as ResolvedFormProps['onSubmit'],
|
|
@@ -445,6 +466,14 @@ function cloneResolvedProps(props: ResolvedFormProps): ResolvedFormProps {
|
|
|
445
466
|
};
|
|
446
467
|
}
|
|
447
468
|
|
|
469
|
+
function cloneStateProps(
|
|
470
|
+
props: ResolvedFormProps
|
|
471
|
+
): Omit<FormState, 'submitting' | 'data'> {
|
|
472
|
+
const stateProps: Partial<ResolvedFormProps> = cloneResolvedProps(props);
|
|
473
|
+
delete stateProps.buttonsPosition;
|
|
474
|
+
return stateProps as Omit<FormState, 'submitting' | 'data'>;
|
|
475
|
+
}
|
|
476
|
+
|
|
448
477
|
function autoComplete(type: string): string {
|
|
449
478
|
if (type === 'password') return 'current-password';
|
|
450
479
|
if (type === 'email') return 'email';
|
|
@@ -495,8 +524,11 @@ function radioNodeListItems(value: RadioNodeList | Element): Element[] {
|
|
|
495
524
|
export function createForm(input: FormProps = {}): Form {
|
|
496
525
|
const props = normalizeProps(input);
|
|
497
526
|
const initial = cloneResolvedProps(props);
|
|
527
|
+
const buttonsJustifyContent = resolveButtonsJustifyContent(
|
|
528
|
+
props.buttonsPosition
|
|
529
|
+
);
|
|
498
530
|
const state = createDeepStore({
|
|
499
|
-
...
|
|
531
|
+
...cloneStateProps(props),
|
|
500
532
|
submitting: false,
|
|
501
533
|
data: null,
|
|
502
534
|
}) as FormState;
|
|
@@ -512,7 +544,9 @@ export function createForm(input: FormProps = {}): Form {
|
|
|
512
544
|
if (state.fields.includes(item)) return item;
|
|
513
545
|
const cached = runtimeItems.get(item);
|
|
514
546
|
if (cached) return cached;
|
|
515
|
-
const runtimeItem = createDeepStore(
|
|
547
|
+
const runtimeItem = createDeepStore(
|
|
548
|
+
cloneFormItem(item)
|
|
549
|
+
) as FormItem<FormField>;
|
|
516
550
|
runtimeItems.set(item, runtimeItem);
|
|
517
551
|
return runtimeItem;
|
|
518
552
|
};
|
|
@@ -530,7 +564,8 @@ export function createForm(input: FormProps = {}): Form {
|
|
|
530
564
|
const itemKey = (item: FormItem, index: number): string => {
|
|
531
565
|
if (item.id) return `item:${item.id}`;
|
|
532
566
|
const field = item.payload as FormField;
|
|
533
|
-
if (field && typeof field === 'object')
|
|
567
|
+
if (field && typeof field === 'object')
|
|
568
|
+
return `${fieldKey(field)}:${item.type}`;
|
|
534
569
|
return `item:${item.type}:${index}`;
|
|
535
570
|
};
|
|
536
571
|
const resolveFieldId = (field: FormField, index: number): string => {
|
|
@@ -603,14 +638,13 @@ export function createForm(input: FormProps = {}): Form {
|
|
|
603
638
|
if (!field.name || !form.element) return [];
|
|
604
639
|
const element = form.element.elements.namedItem(field.name);
|
|
605
640
|
if (!element) return [];
|
|
606
|
-
return radioNodeListItems(element).filter(
|
|
641
|
+
return radioNodeListItems(element).filter(
|
|
642
|
+
(item) => item instanceof Element
|
|
643
|
+
);
|
|
607
644
|
};
|
|
608
645
|
const syncFieldValue = (
|
|
609
646
|
field: FormField,
|
|
610
|
-
control:
|
|
611
|
-
| HTMLInputElement
|
|
612
|
-
| HTMLSelectElement
|
|
613
|
-
| HTMLTextAreaElement,
|
|
647
|
+
control: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement,
|
|
614
648
|
type: FormControlType | 'checkbox' | 'radio' = 'text'
|
|
615
649
|
): void => {
|
|
616
650
|
flushSync(() => {
|
|
@@ -898,6 +932,9 @@ export function createForm(input: FormProps = {}): Form {
|
|
|
898
932
|
const buttonsView = (): HTMLElement =>
|
|
899
933
|
jsx('div', {
|
|
900
934
|
className: () => state.className.buttons,
|
|
935
|
+
style: {
|
|
936
|
+
justifyContent: buttonsJustifyContent,
|
|
937
|
+
},
|
|
901
938
|
'data-form-buttons': '',
|
|
902
939
|
hidden: () => state.buttons.length === 0,
|
|
903
940
|
children: For({
|
package/src/components/modal.ts
CHANGED
|
@@ -17,11 +17,7 @@ import { icon } from '../primitives/icons.ts';
|
|
|
17
17
|
import { createLoading } from '../primitives/loading.ts';
|
|
18
18
|
import { createPopup } from '../primitives/popup.ts';
|
|
19
19
|
import { joinClasses } from '../utilities/class-name.ts';
|
|
20
|
-
import {
|
|
21
|
-
all,
|
|
22
|
-
q,
|
|
23
|
-
type RenderableContent,
|
|
24
|
-
} from '../utilities/dom.ts';
|
|
20
|
+
import { all, q, type RenderableContent } from '../utilities/dom.ts';
|
|
25
21
|
import { randomId } from '../utilities/id.ts';
|
|
26
22
|
import { createMotionGroup, createTransition } from '../core/motion.ts';
|
|
27
23
|
import { isPlainObject } from '../utilities/object.ts';
|
|
@@ -62,6 +58,8 @@ export interface ModalText {
|
|
|
62
58
|
cancel: string;
|
|
63
59
|
}
|
|
64
60
|
|
|
61
|
+
type ModalStyle = string | Partial<CSSStyleDeclaration> | null;
|
|
62
|
+
|
|
65
63
|
export interface ModalProps extends Record<string, unknown> {
|
|
66
64
|
content?: ModalContent;
|
|
67
65
|
cache?: boolean;
|
|
@@ -79,6 +77,7 @@ export interface ModalProps extends Record<string, unknown> {
|
|
|
79
77
|
onCancel?: ((modal: Modal) => void | Promise<void>) | null;
|
|
80
78
|
header?: boolean;
|
|
81
79
|
footer?: boolean;
|
|
80
|
+
style?: ModalStyle;
|
|
82
81
|
id?: string | null;
|
|
83
82
|
escClose?: boolean;
|
|
84
83
|
bgClose?: boolean;
|
|
@@ -93,6 +92,7 @@ interface ResolvedModalProps extends Record<string, unknown> {
|
|
|
93
92
|
showCancel: boolean;
|
|
94
93
|
showClose: boolean;
|
|
95
94
|
fullscreen: boolean;
|
|
95
|
+
style: ModalStyle;
|
|
96
96
|
text: ModalText;
|
|
97
97
|
onShow: NonNullable<ModalProps['onShow']> | null;
|
|
98
98
|
onShown: NonNullable<ModalProps['onShown']> | null;
|
|
@@ -258,6 +258,7 @@ function normalizeProps(input: ModalProps): ResolvedModalProps {
|
|
|
258
258
|
escClose: props.escClose as boolean,
|
|
259
259
|
bgClose: props.bgClose as boolean,
|
|
260
260
|
className: props.className as ModalClassNames,
|
|
261
|
+
style: props.style as ModalStyle,
|
|
261
262
|
};
|
|
262
263
|
}
|
|
263
264
|
|
|
@@ -681,6 +682,7 @@ export function createModal(input: ModalProps = {}): Modal {
|
|
|
681
682
|
id: props.id,
|
|
682
683
|
role: 'document',
|
|
683
684
|
'data-modal-dialog': props.id,
|
|
685
|
+
...(props.style ? { style: props.style } : {}),
|
|
684
686
|
'data-mount': () => (motionVisible() ? 'true' : 'false'),
|
|
685
687
|
children: [
|
|
686
688
|
jsx('div', {
|
|
@@ -689,27 +691,27 @@ export function createModal(input: ModalProps = {}): Modal {
|
|
|
689
691
|
children: () =>
|
|
690
692
|
props.header && !state.loading
|
|
691
693
|
? [
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
694
|
+
jsx('div', {
|
|
695
|
+
className: props.className.title,
|
|
696
|
+
id: `${props.id}_title`,
|
|
697
|
+
'aria-label': props.text.title,
|
|
698
|
+
children: props.text.title,
|
|
699
|
+
}),
|
|
700
|
+
props.showClose
|
|
701
|
+
? jsx('button', {
|
|
702
|
+
type: 'button',
|
|
703
|
+
className: joinClasses(
|
|
704
|
+
props.className.button,
|
|
705
|
+
props.className.closeBtn
|
|
706
|
+
),
|
|
707
|
+
'data-action': 'close',
|
|
708
|
+
'aria-label': t('Close', locales),
|
|
709
|
+
disabled: isBusy,
|
|
710
|
+
children: icon('close'),
|
|
711
|
+
})
|
|
712
|
+
: null,
|
|
713
|
+
]
|
|
714
|
+
: null,
|
|
713
715
|
}),
|
|
714
716
|
jsx('div', {
|
|
715
717
|
className: props.className.body,
|
|
@@ -724,30 +726,30 @@ export function createModal(input: ModalProps = {}): Modal {
|
|
|
724
726
|
children: () =>
|
|
725
727
|
props.footer && !state.loading
|
|
726
728
|
? [
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
729
|
+
props.showCancel
|
|
730
|
+
? jsx('button', {
|
|
731
|
+
type: 'button',
|
|
732
|
+
className: joinClasses(
|
|
733
|
+
props.className.button,
|
|
734
|
+
props.className.cancelBtn
|
|
735
|
+
),
|
|
736
|
+
'data-action': 'cancel',
|
|
737
|
+
disabled: isBusy,
|
|
738
|
+
children: props.text.cancel,
|
|
739
|
+
})
|
|
740
|
+
: null,
|
|
741
|
+
jsx('button', {
|
|
742
|
+
type: 'button',
|
|
743
|
+
className: joinClasses(
|
|
744
|
+
props.className.button,
|
|
745
|
+
props.className.confirmBtn
|
|
746
|
+
),
|
|
747
|
+
'data-action': 'confirm',
|
|
748
|
+
disabled: isBusy,
|
|
749
|
+
children: props.text.confirm,
|
|
750
|
+
}),
|
|
751
|
+
]
|
|
752
|
+
: null,
|
|
751
753
|
}),
|
|
752
754
|
],
|
|
753
755
|
}) as HTMLElement;
|
|
@@ -289,7 +289,9 @@ export function createPagination(input: PaginationProps = {}): Pagination {
|
|
|
289
289
|
let changeId = 0;
|
|
290
290
|
let pagination: Pagination;
|
|
291
291
|
|
|
292
|
-
const pageCount = createMemo(() =>
|
|
292
|
+
const pageCount = createMemo(() =>
|
|
293
|
+
getPageCount(state.total, state.page.size)
|
|
294
|
+
);
|
|
293
295
|
const isLocked = (): boolean => props.lock && state.locked;
|
|
294
296
|
const isPrevDisabled = (): boolean => isLocked() || state.page.current <= 1;
|
|
295
297
|
const isNextDisabled = (): boolean =>
|
package/src/css/accordion.css
CHANGED
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
border-bottom: 0;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.j-accordion[data-direction='horizontal']
|
|
35
|
+
.j-accordion[data-direction='horizontal']
|
|
36
|
+
.accordion-header[aria-expanded='true'] {
|
|
36
37
|
border-right: 0;
|
|
37
38
|
}
|
|
38
39
|
|
|
@@ -44,7 +45,8 @@
|
|
|
44
45
|
border-bottom: 0;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
.j-accordion[data-direction='horizontal']
|
|
48
|
+
.j-accordion[data-direction='horizontal']
|
|
49
|
+
.accordion-header[aria-expanded='false']:nth-last-child(2) {
|
|
48
50
|
border-right: 0;
|
|
49
51
|
}
|
|
50
52
|
|
|
@@ -73,7 +75,9 @@
|
|
|
73
75
|
--accordion-icon-transform: rotate(180deg);
|
|
74
76
|
}
|
|
75
77
|
|
|
76
|
-
.j-accordion[data-direction='horizontal']
|
|
78
|
+
.j-accordion[data-direction='horizontal']
|
|
79
|
+
.accordion-header[aria-expanded='true']
|
|
80
|
+
.header-arrow {
|
|
77
81
|
--accordion-icon-transform: rotate(90deg);
|
|
78
82
|
}
|
|
79
83
|
|
|
@@ -88,7 +92,8 @@
|
|
|
88
92
|
min-height: 2rem;
|
|
89
93
|
}
|
|
90
94
|
|
|
91
|
-
.j-accordion[data-direction='horizontal']
|
|
95
|
+
.j-accordion[data-direction='horizontal']
|
|
96
|
+
.accordion-panel[aria-hidden='false'] {
|
|
92
97
|
border-right: var(--accordion-border);
|
|
93
98
|
border-bottom: 0;
|
|
94
99
|
flex: 1;
|
|
@@ -109,10 +114,12 @@
|
|
|
109
114
|
min-height: inherit;
|
|
110
115
|
}
|
|
111
116
|
|
|
112
|
-
.j-accordion[data-direction='horizontal']
|
|
117
|
+
.j-accordion[data-direction='horizontal']
|
|
118
|
+
.accordion-panel[aria-hidden='false']
|
|
119
|
+
.panel-content {
|
|
113
120
|
display: flex;
|
|
114
121
|
flex-direction: column;
|
|
115
122
|
justify-content: center;
|
|
116
123
|
height: 100%;
|
|
117
124
|
}
|
|
118
|
-
}
|
|
125
|
+
}
|
package/src/css/color.css
CHANGED
package/src/css/color_p3.css
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
@layer color {
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Advanced color mode: display-p3
|
|
9
8
|
*
|
|
@@ -15,7 +14,6 @@
|
|
|
15
14
|
*/
|
|
16
15
|
@supports (color: color(display-p3 1 1 1)) {
|
|
17
16
|
@media (color-gamut: p3) {
|
|
18
|
-
|
|
19
17
|
:root,
|
|
20
18
|
.light {
|
|
21
19
|
/* gray */
|
|
@@ -503,7 +501,6 @@
|
|
|
503
501
|
|
|
504
502
|
@supports (color: color(display-p3 1 1 1)) {
|
|
505
503
|
@media (color-gamut: p3) {
|
|
506
|
-
|
|
507
504
|
.dark {
|
|
508
505
|
/* gray */
|
|
509
506
|
--gray-1: oklch(17.8% 0.0034 264.5);
|
|
@@ -987,4 +984,4 @@
|
|
|
987
984
|
}
|
|
988
985
|
}
|
|
989
986
|
}
|
|
990
|
-
}
|
|
987
|
+
}
|
package/src/css/content.css
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@layer content {
|
|
2
|
-
|
|
3
2
|
/* ============================================
|
|
4
3
|
Content - 文章阅读/编辑器预览样式
|
|
5
4
|
============================================ */
|
|
@@ -29,7 +28,8 @@
|
|
|
29
28
|
.j-content h4,
|
|
30
29
|
.j-content h5,
|
|
31
30
|
.j-content h6 {
|
|
32
|
-
margin: var(--content-heading-space) 0
|
|
31
|
+
margin: var(--content-heading-space) 0
|
|
32
|
+
calc(var(--content-heading-space) * 0.75);
|
|
33
33
|
font-weight: 600;
|
|
34
34
|
line-height: 1.3;
|
|
35
35
|
color: var(--content-heading-fg);
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/* 标题后的段落减少间距 */
|
|
67
|
-
.j-content h1+p,
|
|
68
|
-
.j-content h2+p,
|
|
69
|
-
.j-content h3+p,
|
|
70
|
-
.j-content h4+p,
|
|
71
|
-
.j-content h5+p,
|
|
72
|
-
.j-content h6+p {
|
|
67
|
+
.j-content h1 + p,
|
|
68
|
+
.j-content h2 + p,
|
|
69
|
+
.j-content h3 + p,
|
|
70
|
+
.j-content h4 + p,
|
|
71
|
+
.j-content h5 + p,
|
|
72
|
+
.j-content h6 + p {
|
|
73
73
|
margin-top: calc(var(--content-paragraph-space) * -0.5);
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
color: var(--tone-body);
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
.j-content dd+dt {
|
|
252
|
+
.j-content dd + dt {
|
|
253
253
|
margin-top: 1em;
|
|
254
254
|
}
|
|
255
255
|
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
margin: 0;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
.j-content blockquote p+p {
|
|
280
|
+
.j-content blockquote p + p {
|
|
281
281
|
margin-top: 0.75em;
|
|
282
282
|
}
|
|
283
283
|
|
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
padding: 1.25em 1.5em;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
.j-content pre.j-code-editor .code-header+code[class*='language-'] {
|
|
396
|
+
.j-content pre.j-code-editor .code-header + code[class*='language-'] {
|
|
397
397
|
padding: 0.5rem 1rem 1rem;
|
|
398
398
|
}
|
|
399
399
|
|
|
@@ -641,14 +641,14 @@
|
|
|
641
641
|
transition: transform 0.2s ease;
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
-
.j-content details[open]>summary::before {
|
|
644
|
+
.j-content details[open] > summary::before {
|
|
645
645
|
transform: rotate(90deg);
|
|
646
646
|
}
|
|
647
647
|
|
|
648
648
|
.j-content details[open] p,
|
|
649
649
|
.j-content details[open] ul,
|
|
650
650
|
.j-content details[open] ol,
|
|
651
|
-
.j-content details[open]
|
|
651
|
+
.j-content details[open] > * {
|
|
652
652
|
margin-bottom: 1em;
|
|
653
653
|
}
|
|
654
654
|
|
|
@@ -656,11 +656,11 @@
|
|
|
656
656
|
margin-bottom: 0.75em;
|
|
657
657
|
} */
|
|
658
658
|
|
|
659
|
-
.j-content details[open]>summary
|
|
659
|
+
.j-content details[open] > summary + * {
|
|
660
660
|
margin-top: 0;
|
|
661
661
|
}
|
|
662
662
|
|
|
663
|
-
.j-content details[open]
|
|
663
|
+
.j-content details[open] > *:last-child {
|
|
664
664
|
margin-bottom: 0;
|
|
665
665
|
}
|
|
666
666
|
|
|
@@ -705,11 +705,11 @@
|
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
/* First/Last child margin reset */
|
|
708
|
-
.j-content
|
|
708
|
+
.j-content > *:first-child {
|
|
709
709
|
margin-top: 0;
|
|
710
710
|
}
|
|
711
711
|
|
|
712
|
-
.j-content
|
|
712
|
+
.j-content > *:last-child {
|
|
713
713
|
margin-bottom: 0;
|
|
714
714
|
}
|
|
715
|
-
}
|
|
715
|
+
}
|
package/src/css/drop.css
CHANGED