-
Notifications
You must be signed in to change notification settings - Fork 0
/
inset.ts
39 lines (33 loc) · 1.04 KB
/
inset.ts
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
import type { CSSProperties } from "../CSSProperties";
export type InsetLonghands = Required<
Pick<CSSProperties, "top" | "right" | "bottom" | "left">
>;
export function inset(all: NonNullable<CSSProperties["top"]>): InsetLonghands;
export function inset(
vertical: NonNullable<CSSProperties["top"]>,
horizontal: NonNullable<CSSProperties["right"]>,
): InsetLonghands;
export function inset(
top: NonNullable<CSSProperties["top"]>,
horizontal: NonNullable<CSSProperties["right"]>,
bottom: NonNullable<CSSProperties["bottom"]>,
): InsetLonghands;
export function inset(
top: NonNullable<CSSProperties["top"]>,
right: NonNullable<CSSProperties["right"]>,
bottom: NonNullable<CSSProperties["bottom"]>,
left: NonNullable<CSSProperties["left"]>,
): InsetLonghands;
export function inset(
top: NonNullable<CSSProperties["top"]>,
right: NonNullable<CSSProperties["right"]> = top,
bottom: NonNullable<CSSProperties["bottom"]> = top,
left: NonNullable<CSSProperties["left"]> = right,
): InsetLonghands {
return {
top,
right,
bottom,
left,
};
}