@inc2734/unitone-css 0.47.3 → 0.48.0
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/README.md +1 -1
- package/dist/app.css +1 -1
- package/dist/app.js +1 -1
- package/dist/index.js +1 -1
- package/dist/library.js +1 -1
- package/package.json +8 -14
- package/src/app.js +50 -11
- package/src/layout-primitives/center/_center.scss +1 -6
- package/src/layout-primitives/center/index.jsx +1 -1
- package/src/layout-primitives/cover/_cover.scss +1 -0
- package/src/layout-primitives/float/_float.scss +4 -4
- package/src/layout-primitives/float/index.jsx +1 -1
- package/src/layout-primitives/layers/_layers.scss +21 -8
- package/src/layout-primitives/layers/index.jsx +4 -2
- package/src/layout-primitives/text/index.jsx +2 -1
- package/src/layout-primitives/vertical-writing/index.jsx +3 -1
- package/src/library.js +2 -1
- package/dist/storybook.css +0 -1
- package/src/layout-primitives/both-sides/README.md +0 -143
- package/src/layout-primitives/both-sides/stories/index.stories.jsx +0 -49
- package/src/layout-primitives/center/README.md +0 -113
- package/src/layout-primitives/center/stories/index.stories.jsx +0 -63
- package/src/layout-primitives/cluster/README.md +0 -133
- package/src/layout-primitives/cluster/stories/index.stories.jsx +0 -135
- package/src/layout-primitives/container/README.md +0 -93
- package/src/layout-primitives/container/stories/index.stories.jsx +0 -65
- package/src/layout-primitives/cover/README.md +0 -195
- package/src/layout-primitives/cover/stories/index.stories.jsx +0 -179
- package/src/layout-primitives/decorator/README.md +0 -179
- package/src/layout-primitives/decorator/stories/index.stories.jsx +0 -198
- package/src/layout-primitives/float/README.md +0 -115
- package/src/layout-primitives/float/stories/index.stories.jsx +0 -78
- package/src/layout-primitives/frame/README.md +0 -67
- package/src/layout-primitives/frame/stories/index.stories.jsx +0 -50
- package/src/layout-primitives/gutters/README.md +0 -47
- package/src/layout-primitives/gutters/stories/index.stories.jsx +0 -48
- package/src/layout-primitives/layers/README.md +0 -307
- package/src/layout-primitives/layers/stories/index.stories.jsx +0 -187
- package/src/layout-primitives/reel/README.md +0 -115
- package/src/layout-primitives/reel/stories/index.stories.jsx +0 -80
- package/src/layout-primitives/responsive-grid/README.md +0 -130
- package/src/layout-primitives/responsive-grid/stories/index.stories.jsx +0 -234
- package/src/layout-primitives/stack/README.md +0 -98
- package/src/layout-primitives/stack/stories/index.stories.jsx +0 -193
- package/src/layout-primitives/switcher/README.md +0 -73
- package/src/layout-primitives/switcher/stories/index.stories.jsx +0 -50
- package/src/layout-primitives/text/README.md +0 -139
- package/src/layout-primitives/text/stories/index.stories.jsx +0 -148
- package/src/layout-primitives/vertical-writing/README.md +0 -133
- package/src/layout-primitives/vertical-writing/stories/index.stories.jsx +0 -104
- package/src/layout-primitives/with-sidebar/README.md +0 -169
- package/src/layout-primitives/with-sidebar/stories/index.stories.jsx +0 -124
- package/src/patterns/features/features-1/Features1.jsx +0 -54
- package/src/patterns/features/features-1/stories/index.stories.jsx +0 -68
- package/src/patterns/features/features-2/Features2.jsx +0 -28
- package/src/patterns/features/features-2/stories/index.stories.jsx +0 -67
- package/src/patterns/header/header-1/Header1.jsx +0 -34
- package/src/patterns/header/header-1/stories/index.stories.jsx +0 -44
- package/src/patterns/header/header-2/Header2.jsx +0 -28
- package/src/patterns/header/header-2/stories/index.stories.jsx +0 -44
- package/src/patterns/header/header-3/Header3.jsx +0 -25
- package/src/patterns/header/header-3/stories/index.stories.jsx +0 -43
- package/src/patterns/header/header-4/Header4.jsx +0 -28
- package/src/patterns/header/header-4/stories/index.stories.jsx +0 -41
- package/src/patterns/header/header-5/Header5.jsx +0 -35
- package/src/patterns/header/header-5/stories/index.stories.jsx +0 -43
- package/src/patterns/header/header-6/Header6.jsx +0 -37
- package/src/patterns/header/header-6/stories/index.stories.jsx +0 -58
- package/src/patterns/media-text/media-text-1/MediaText1.jsx +0 -44
- package/src/patterns/media-text/media-text-1/stories/index.stories.jsx +0 -34
- package/src/patterns/media-text/media-text-2/MediaText2.jsx +0 -42
- package/src/patterns/media-text/media-text-2/stories/index.stories.jsx +0 -34
- package/src/stories/1.introduction.stories.mdx +0 -60
- package/src/stories/2.get-started.stories.mdx +0 -49
- package/src/stories/3.global-api.stories.mdx +0 -61
- package/src/stories/4.global-css-variables.stories.mdx +0 -198
- package/src/storybook.scss +0 -10
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Float } from '../';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Layout Primitives/Float',
|
|
8
|
-
component: Float,
|
|
9
|
-
parameters: {
|
|
10
|
-
notes: { readme },
|
|
11
|
-
},
|
|
12
|
-
argTypes: {
|
|
13
|
-
gap: {
|
|
14
|
-
control: { type: 'inline-radio' },
|
|
15
|
-
description:
|
|
16
|
-
'Gap between items. Set by CSS var `--unitone--gap` or `data-unitone-layout` attribute `-gap:x`.',
|
|
17
|
-
options: [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7],
|
|
18
|
-
table: { defaultValue: { summary: 'var(--unitone--global--gap)' } },
|
|
19
|
-
type: { name: 'number', required: false },
|
|
20
|
-
},
|
|
21
|
-
minMeasure: {
|
|
22
|
-
control: { type: 'text' },
|
|
23
|
-
description:
|
|
24
|
-
'Min width of the item following the floating item. Set by CSS var `--unitone--min-measure`.',
|
|
25
|
-
table: { defaultValue: { summary: 'calc(var(--unitone--measure) / 2)' } },
|
|
26
|
-
type: { name: 'string', required: false },
|
|
27
|
-
},
|
|
28
|
-
minWidth: {
|
|
29
|
-
control: { type: 'text' },
|
|
30
|
-
description: 'Min width of the floating item. Set by CSS var `--unitone--min-width`.',
|
|
31
|
-
table: { defaultValue: { summary: 'calc(var(--unitone--measure) / 2)' } },
|
|
32
|
-
type: { name: 'string', required: false },
|
|
33
|
-
},
|
|
34
|
-
position: {
|
|
35
|
-
control: { type: 'inline-radio' },
|
|
36
|
-
description:
|
|
37
|
-
'The floating item position. Set by `data-unitone-layout` attribute `-right` or `-left`.',
|
|
38
|
-
options: ['left', 'right'],
|
|
39
|
-
table: { defaultValue: { summary: 'left' } },
|
|
40
|
-
type: { name: 'string', required: false },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
args: {
|
|
44
|
-
gap: 2,
|
|
45
|
-
minMeasure: 'calc(var(--unitone--measure) / 2)',
|
|
46
|
-
minWidth: 'calc(var(--unitone--measure) / 2)',
|
|
47
|
-
position: 'left',
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const content =
|
|
52
|
-
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill';
|
|
53
|
-
|
|
54
|
-
export const Default = (args) => {
|
|
55
|
-
return (
|
|
56
|
-
<>
|
|
57
|
-
<Float {...args}>
|
|
58
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
59
|
-
</Float>
|
|
60
|
-
<p>{content}</p>
|
|
61
|
-
</>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const ExampleRight = (args) => {
|
|
66
|
-
return (
|
|
67
|
-
<>
|
|
68
|
-
<Float {...args}>
|
|
69
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
70
|
-
</Float>
|
|
71
|
-
<p>{content}</p>
|
|
72
|
-
</>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
ExampleRight.storyName = 'Example : Right';
|
|
76
|
-
ExampleRight.args = {
|
|
77
|
-
position: 'right',
|
|
78
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Frame
|
|
2
|
-
|
|
3
|
-
## Usage
|
|
4
|
-
|
|
5
|
-
### HTML
|
|
6
|
-
|
|
7
|
-
```html
|
|
8
|
-
<div data-unitone-layout="frame">
|
|
9
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
10
|
-
</div>
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### JSX
|
|
14
|
-
|
|
15
|
-
```jsx
|
|
16
|
-
import { Frame } from '@inc2734/unitone-css';
|
|
17
|
-
|
|
18
|
-
<Frame>
|
|
19
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
20
|
-
</Frame>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
### Ratio
|
|
26
|
-
|
|
27
|
-
Aspect ratio.
|
|
28
|
-
|
|
29
|
-
#### HTML
|
|
30
|
-
|
|
31
|
-
```html
|
|
32
|
-
<div data-unitone-layout="frame" style="--unitone--aspect-ratio: 16/9">
|
|
33
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
34
|
-
</div>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
#### JSX
|
|
38
|
-
|
|
39
|
-
```jsx
|
|
40
|
-
import { Frame } from '@inc2734/unitone-css';
|
|
41
|
-
|
|
42
|
-
<Frame aspectRatio="16/9">
|
|
43
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
44
|
-
</Frame>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Switch
|
|
48
|
-
|
|
49
|
-
Switch aspect ratio when portrait.
|
|
50
|
-
|
|
51
|
-
#### HTML
|
|
52
|
-
|
|
53
|
-
```html
|
|
54
|
-
<div data-unitone-layout="frame -switch">
|
|
55
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
56
|
-
</div>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
#### JSX
|
|
60
|
-
|
|
61
|
-
```jsx
|
|
62
|
-
import { Frame } from '@inc2734/unitone-css';
|
|
63
|
-
|
|
64
|
-
<Frame switch>
|
|
65
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
66
|
-
</Frame>
|
|
67
|
-
```
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Frame } from '../';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Layout Primitives/Frame',
|
|
8
|
-
component: Frame,
|
|
9
|
-
parameters: {
|
|
10
|
-
notes: { readme },
|
|
11
|
-
},
|
|
12
|
-
argTypes: {
|
|
13
|
-
ratio: {
|
|
14
|
-
control: { type: 'text' },
|
|
15
|
-
description: 'Aspect ratio. Set by CSS var `--unitone--ratio`.',
|
|
16
|
-
table: { defaultValue: { summary: '16/9' } },
|
|
17
|
-
type: { name: 'string', required: false },
|
|
18
|
-
},
|
|
19
|
-
switchRatio: {
|
|
20
|
-
control: { type: 'inline-radio' },
|
|
21
|
-
description: 'When the orientation switches, the `--unitone--ratio` also switches.',
|
|
22
|
-
options: [false, true],
|
|
23
|
-
table: { defaultValue: { summary: false } },
|
|
24
|
-
type: { name: 'boolean', required: false },
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
args: {
|
|
28
|
-
ratio: '16/9',
|
|
29
|
-
switchRatio: false,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const Default = (args) => {
|
|
34
|
-
return (
|
|
35
|
-
<Frame {...args}>
|
|
36
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
37
|
-
</Frame>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const Switch = (args) => {
|
|
42
|
-
return (
|
|
43
|
-
<Frame {...args}>
|
|
44
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
45
|
-
</Frame>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
Switch.args = {
|
|
49
|
-
switchRatio: true,
|
|
50
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Gutters
|
|
2
|
-
|
|
3
|
-
Separate content with top and bottom padding.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### HTML
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<div data-unitone-layout="gutters">
|
|
11
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill
|
|
12
|
-
</div>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### JSX
|
|
16
|
-
|
|
17
|
-
```jsx
|
|
18
|
-
import { Gutters } from '@inc2734/unitone-css';
|
|
19
|
-
|
|
20
|
-
<Gutters>
|
|
21
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill
|
|
22
|
-
</Gutters>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
### Padding
|
|
28
|
-
|
|
29
|
-
Top and bottom padding.
|
|
30
|
-
|
|
31
|
-
#### HTML
|
|
32
|
-
|
|
33
|
-
```html
|
|
34
|
-
<div data-unitone-layout="section -padding:1">
|
|
35
|
-
...
|
|
36
|
-
</div>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
#### JSX
|
|
40
|
-
|
|
41
|
-
```jsx
|
|
42
|
-
import { Gutters } from '@inc2734/unitone-css';
|
|
43
|
-
|
|
44
|
-
<Gutters padding={1}>
|
|
45
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill
|
|
46
|
-
</Gutters>
|
|
47
|
-
```
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Gutters } from '../';
|
|
5
|
-
import { Center } from '../../center';
|
|
6
|
-
import { Container } from '../../container';
|
|
7
|
-
import { Stack } from '../../stack';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'Layout Primitives/Gutters',
|
|
11
|
-
component: Gutters,
|
|
12
|
-
parameters: {
|
|
13
|
-
notes: { readme },
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
padding: {
|
|
17
|
-
control: { type: 'inline-radio' },
|
|
18
|
-
description:
|
|
19
|
-
'Top and bottom padding. Set by CSS var `--unitone--padding` or `data-unitone-layout` attribute `-padding:x`.',
|
|
20
|
-
options: [1, 2, 3, 4, 5, 6, 7],
|
|
21
|
-
table: { defaultValue: { summary: 'var(--unitone--s4)' } },
|
|
22
|
-
type: { name: 'number', required: false },
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
args: {
|
|
26
|
-
padding: 4,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const Default = (args) => {
|
|
31
|
-
return (
|
|
32
|
-
<Gutters {...args}>
|
|
33
|
-
<Container>
|
|
34
|
-
<Stack gap={3}>
|
|
35
|
-
<Center>
|
|
36
|
-
<h2 style={{ '--unitone--font-size': 2 }}>Lorem ipsum dolor sit amet</h2>
|
|
37
|
-
</Center>
|
|
38
|
-
<p>
|
|
39
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
|
|
40
|
-
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
|
|
41
|
-
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
42
|
-
dolor in reprehenderit in voluptate velit esse cill
|
|
43
|
-
</p>
|
|
44
|
-
</Stack>
|
|
45
|
-
</Container>
|
|
46
|
-
</Gutters>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
# Layers
|
|
2
|
-
|
|
3
|
-
Elements on top of each other. Layers have a 12 x 7 (7 x 12 in portrait mode) grid, along which child layers can be shifted.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### HTML
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<div data-unitone-layout="layers">
|
|
11
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
12
|
-
|
|
13
|
-
<div data-unitone-layout="decorator" style="--unitone--align-self:end">
|
|
14
|
-
Lorem ipsum dolor sit amet
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### JSX
|
|
20
|
-
|
|
21
|
-
```jsx
|
|
22
|
-
import { Layers, Decorator } from '@inc2734/unitone-css';
|
|
23
|
-
|
|
24
|
-
<Layers>
|
|
25
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
26
|
-
|
|
27
|
-
<Decorator style={{ '--unitone--align-self': 'end' }}>
|
|
28
|
-
Lorem ipsum dolor sit amet
|
|
29
|
-
</Decorator>
|
|
30
|
-
</Layers>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Props
|
|
34
|
-
|
|
35
|
-
### Gap
|
|
36
|
-
|
|
37
|
-
Gap.
|
|
38
|
-
|
|
39
|
-
#### HTML
|
|
40
|
-
|
|
41
|
-
```html
|
|
42
|
-
<div data-unitone-layout="layers -gap:1">
|
|
43
|
-
...
|
|
44
|
-
</div>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### JSX
|
|
48
|
-
|
|
49
|
-
```jsx
|
|
50
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
51
|
-
|
|
52
|
-
<Layers gap={1}>
|
|
53
|
-
...
|
|
54
|
-
</Layers>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Min height
|
|
58
|
-
|
|
59
|
-
Min height.
|
|
60
|
-
|
|
61
|
-
#### HTML
|
|
62
|
-
|
|
63
|
-
```html
|
|
64
|
-
<div data-unitone-layout="layers" style="--unitone--min-height: 500px">
|
|
65
|
-
...
|
|
66
|
-
</div>
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
#### JSX
|
|
70
|
-
|
|
71
|
-
```jsx
|
|
72
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
73
|
-
|
|
74
|
-
<Layers minHeight="500px">
|
|
75
|
-
...
|
|
76
|
-
</Layers>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Columns
|
|
80
|
-
|
|
81
|
-
Number of columns.
|
|
82
|
-
|
|
83
|
-
#### HTML
|
|
84
|
-
|
|
85
|
-
```html
|
|
86
|
-
<div data-unitone-layout="layers" style="--unitone--columns: 20">
|
|
87
|
-
...
|
|
88
|
-
</div>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
#### JSX
|
|
92
|
-
|
|
93
|
-
```jsx
|
|
94
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
95
|
-
|
|
96
|
-
<Layers columns="20">
|
|
97
|
-
...
|
|
98
|
-
</Layers>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Rows
|
|
102
|
-
|
|
103
|
-
Number of rows.
|
|
104
|
-
|
|
105
|
-
#### HTML
|
|
106
|
-
|
|
107
|
-
```html
|
|
108
|
-
<div data-unitone-layout="layers" style="--unitone--rows: 20">
|
|
109
|
-
...
|
|
110
|
-
</div>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
#### JSX
|
|
114
|
-
|
|
115
|
-
```jsx
|
|
116
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
117
|
-
|
|
118
|
-
<Layers rows="20">
|
|
119
|
-
...
|
|
120
|
-
</Layers>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Covered image
|
|
124
|
-
|
|
125
|
-
Background image/video is sized to maintain its aspect ratio while filling the element's entire content box. If the object's aspect ratio does not match the aspect ratio of its box, then the object will be clipped to fit.
|
|
126
|
-
|
|
127
|
-
#### HTML
|
|
128
|
-
|
|
129
|
-
```html
|
|
130
|
-
<div data-unitone-layout="layers -cover">
|
|
131
|
-
<img ...>
|
|
132
|
-
|
|
133
|
-
<div>
|
|
134
|
-
...
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
#### JSX
|
|
140
|
-
|
|
141
|
-
```jsx
|
|
142
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
143
|
-
|
|
144
|
-
<Layers cover>
|
|
145
|
-
<img ... />
|
|
146
|
-
|
|
147
|
-
<div>
|
|
148
|
-
...
|
|
149
|
-
</div>
|
|
150
|
-
</Layers>
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Filled image
|
|
154
|
-
|
|
155
|
-
The background image/video is enlarged according to the amount of content.
|
|
156
|
-
|
|
157
|
-
#### HTML
|
|
158
|
-
|
|
159
|
-
```html
|
|
160
|
-
<div data-unitone-layout="layers -fill">
|
|
161
|
-
<img ...>
|
|
162
|
-
|
|
163
|
-
<div>
|
|
164
|
-
...
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
#### JSX
|
|
170
|
-
|
|
171
|
-
```jsx
|
|
172
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
173
|
-
|
|
174
|
-
<Layers fill>
|
|
175
|
-
<img ... />
|
|
176
|
-
|
|
177
|
-
<div>
|
|
178
|
-
...
|
|
179
|
-
</div>
|
|
180
|
-
</Layers>
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### Blur image
|
|
184
|
-
|
|
185
|
-
Blur the background image/video.
|
|
186
|
-
|
|
187
|
-
#### HTML
|
|
188
|
-
|
|
189
|
-
```html
|
|
190
|
-
<div data-unitone-layout="layers -blur" style="--unitone--blur: 100px">
|
|
191
|
-
<img ...>
|
|
192
|
-
|
|
193
|
-
<div>
|
|
194
|
-
...
|
|
195
|
-
</div>
|
|
196
|
-
</div>
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
#### JSX
|
|
200
|
-
|
|
201
|
-
```jsx
|
|
202
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
203
|
-
|
|
204
|
-
<Layers blur style={{ '--unitone--blur': '100px' }}>
|
|
205
|
-
<img ... />
|
|
206
|
-
|
|
207
|
-
<div>
|
|
208
|
-
...
|
|
209
|
-
</div>
|
|
210
|
-
</Layers>
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### Portrait grid
|
|
214
|
-
|
|
215
|
-
In portrait mode, swaps the height and width of the grid.
|
|
216
|
-
|
|
217
|
-
#### HTML
|
|
218
|
-
|
|
219
|
-
```html
|
|
220
|
-
<div data-unitone-layout="layers -portrait">
|
|
221
|
-
...
|
|
222
|
-
</div>
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
#### JSX
|
|
226
|
-
|
|
227
|
-
```jsx
|
|
228
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
229
|
-
|
|
230
|
-
<Layers portrait>
|
|
231
|
-
...
|
|
232
|
-
</Layers>
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### Mix blend mode
|
|
236
|
-
|
|
237
|
-
You can specify how the elements should look when stacked.
|
|
238
|
-
|
|
239
|
-
#### HTML
|
|
240
|
-
|
|
241
|
-
```html
|
|
242
|
-
<div data-unitone-layout="layers -portrait">
|
|
243
|
-
<img ... />
|
|
244
|
-
|
|
245
|
-
<div style="--unitone--mix-blend-mode: overlay">
|
|
246
|
-
...
|
|
247
|
-
</div>
|
|
248
|
-
</div>
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
#### JSX
|
|
252
|
-
|
|
253
|
-
```jsx
|
|
254
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
255
|
-
|
|
256
|
-
<Layers portrait>
|
|
257
|
-
<img ... />
|
|
258
|
-
|
|
259
|
-
<div style={{ '--unitone--mix-blend-mode': 'overlay' }}>
|
|
260
|
-
...
|
|
261
|
-
</div>
|
|
262
|
-
</Layers>
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### Items position
|
|
266
|
-
|
|
267
|
-
You can set the position of child elements with the associated properties of the CSS grid.
|
|
268
|
-
|
|
269
|
-
#### HTML
|
|
270
|
-
|
|
271
|
-
```html
|
|
272
|
-
<div data-unitone-layout="layers">
|
|
273
|
-
<img ...>
|
|
274
|
-
|
|
275
|
-
<div style="--unitone--alilgn-self: end; --unitone--justify-self: center">
|
|
276
|
-
...
|
|
277
|
-
</div>
|
|
278
|
-
</div>
|
|
279
|
-
|
|
280
|
-
<div data-unitone-layout="layers">
|
|
281
|
-
<img ...>
|
|
282
|
-
|
|
283
|
-
<div style="--unitone--grid-column: 1/-1; --unitone--grid-row: 1/-1">
|
|
284
|
-
...
|
|
285
|
-
</div>
|
|
286
|
-
</div>
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
```jsx
|
|
290
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
291
|
-
|
|
292
|
-
<Layers>
|
|
293
|
-
<img ... />
|
|
294
|
-
|
|
295
|
-
<div style={{ '--unitone--alilgn-self': 'end', '--unitone--justify-self': 'center' }}>
|
|
296
|
-
...
|
|
297
|
-
</div>
|
|
298
|
-
</Layers>
|
|
299
|
-
|
|
300
|
-
<Layers>
|
|
301
|
-
<img ... />
|
|
302
|
-
|
|
303
|
-
<div style={{ '--unitone--grid-column': '1/-1', '--unitone--grid-row': '1/-1' }}>
|
|
304
|
-
...
|
|
305
|
-
</div>
|
|
306
|
-
</Layers>
|
|
307
|
-
```
|