Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/en/api/css/properties/background-image.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,29 +81,29 @@ background-image = <bg-image>#

<gradient> = <linear-gradient()> | <radial-gradient()>

<linear-gradient()> =
<linear-gradient()> =
linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )

<radial-gradient()> =
<radial-gradient()> =
radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )

<side-or-corner> =
<side-or-corner> =
[ left | right ] || [ top | bottom ]

<ending-shape> =
<ending-shape> =
circle | ellipse

<size> =
<size> =
closest-side |
farthest-side |
closest-corner |
farthest-corner |
<length> |
<length-percentage>{2}

<position> =
<position> =
[ left | center | right ] || [ top | center | bottom ] |
[ left | center | right | <length-percentage> ]
[ left | center | right | <length-percentage> ]
[ top | center | bottom | <length-percentage> ]? |
[ [ left | right ] <length-percentage> ] &&
[ [ top | bottom ] <length-percentage> ]
Expand Down
8 changes: 4 additions & 4 deletions docs/en/api/css/properties/inset-inline-end.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ import { PropertyDefinition } from '@/components/PropertyDefinition';
## Formal syntax

```
inset-inline-end =
inset-inline-end =
auto |
<length-percentage>
<length-percentage>

<length-percentage> =
<length-percentage> =
<length> |
<percentage>
<percentage>
```

## Difference with the web
Expand Down
8 changes: 4 additions & 4 deletions docs/en/api/css/properties/inset-inline-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ import { PropertyDefinition } from '@/components/PropertyDefinition';
## Formal syntax

```
inset-inline-start =
inset-inline-start =
auto |
<length-percentage>
<length-percentage>

<length-percentage> =
<length-percentage> =
<length> |
<percentage>
<percentage>
```

## Difference with the web
Expand Down
14 changes: 7 additions & 7 deletions docs/en/api/css/properties/mask-image.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ import { PropertyDefinition } from '@/components/PropertyDefinition';
## Formal Syntax

```
mask-image =
<mask-reference>#
mask-image =
<mask-reference>#

<mask-reference> =
<mask-reference> =
none |
<image>
<image>

<image> =
<image> =
<url()> |
<gradient>
<gradient>

<url()> =
<url()> =
url( <string> )
```

Expand Down
48 changes: 24 additions & 24 deletions docs/en/api/css/properties/mask.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,64 +79,64 @@ Sets the area that is affected by the mask image. See [mask-clip](https://develo
## Formal Syntax

```
mask =
<mask-layer>#
mask =
<mask-layer>#

<mask-layer> =
<mask-layer> =
<mask-reference> ||
<position> [ / <bg-size> ]? ||
<repeat-style> ||
<box> ||
<compositing-operator> ||
<masking-mode>
<masking-mode>

<mask-reference> =
<mask-reference> =
none |
<image>
<image>

<image> =
<image> =
<url()> |
<gradient>
<gradient>

<url()> =
<url()> =
url( <string> )

<position> =
<position> =
[ left | center | right ] && [ top | center | bottom ] |
[ left | center | right | <length-percentage> ]
[ left | center | right | <length-percentage> ]
[ top | center | bottom | <length-percentage> ]? |
[ [ left | right ] <length-percentage> ] &&
[ [ top | bottom ] <length-percentage> ]
[ [ top | bottom ] <length-percentage> ]

<bg-size> =
<bg-size> =
[ <length-percentage> | auto ]{1,2} |
cover |
contain
contain

<repeat-style> =
<repeat-style> =
repeat-x |
repeat-y |
[ repeat | space | round | no-repeat ]{1,2}
[ repeat | space | round | no-repeat ]{1,2}

<box> =
<box> =
border-box |
padding-box |
content-box
content-box

<compositing-operator> =
<compositing-operator> =
add |
subtract |
intersect |
exclude
exclude

<masking-mode> =
<masking-mode> =
alpha |
luminance |
match-source
match-source

<length-percentage> =
<length-percentage> =
<length> |
<percentage>
<percentage>

```

Expand Down
2 changes: 2 additions & 0 deletions docs/en/api/css/properties/row-gap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ import { Go } from '@lynx';
[`<percentage>`](/api/css/data-type/percentage.mdx) values are relative to the dimension of the element.

## Formal syntax

```
row-gap = <length-percentage [0,∞]>

<length-percentage> = <length> | <percentage>
```

## Syntax

```css
Expand Down
9 changes: 4 additions & 5 deletions docs/en/api/css/properties/transition-property.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,15 @@ import { PropertyDefinition } from '@/components/PropertyDefinition';
## Formal syntax

```
transition-property =
transition-property =
none |
<single-transition-property>#
<single-transition-property>#

<single-transition-property> =
<single-transition-property> =
all |
<custom-ident>
<custom-ident>
```


## More

- [transition-delay](./transition-delay.mdx)
Expand Down
79 changes: 79 additions & 0 deletions docs/en/api/elements/built-in/frame-API.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import {
AndroidOnly,
IOSOnly,
ClayOnly,
HarmonyOnly,
Required,
Deprecated,
Go,
PlatformTabs,
} from '@lynx';
import { AvailableBadge, LegacyCompatTable } from '@lynx';

## Attributes

### `data`

{' '}
<AndroidOnly /> <IOSOnly /> <AvailableBadge
type="version"
data={{ version: '3.4', support: 'support' }}
/>

```tsx
data?: Record<string, unknown>;
```

Passes data to the nested Lynx page within the frame.

### `global-props`

{' '}
<AndroidOnly /> <IOSOnly /> <AvailableBadge
type="version"
data={{ version: '3.6', support: 'support' }}
/>

```tsx
'global-props'?: Record<string, unknown>;
```

Pass global props to the nested Lynx page within the frame.

### `src`

{' '}
<AndroidOnly /> <IOSOnly /> <AvailableBadge
type="version"
data={{ version: '3.4', support: 'support' }}
/>

```tsx
src: string;
```

Sets the loading path for the frame resource.

## Events

Frontend can bind corresponding event callbacks to listen for runtime behaviors of the element, as shown below.

### `bindload`

{' '}
<AndroidOnly /> <IOSOnly /> <AvailableBadge
type="version"
data={{ version: '3.6', support: 'support' }}
/>

```tsx
bindload = (e: FrameLoadEvent) => {};
```

| Field | Type | Optional | Default | Platforms | Since | Description |
| ------------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------------------------------- | ----- | ---------------------------- |
| statusCode | number | No | – | <AndroidOnly /> <IOSOnly /> <AvailableBadge type="version" data={{ version: '3.6', support: 'support' }} /> | 3.6 | Frame loaded status code. |
| statusMessage | string | No | – | <AndroidOnly /> <IOSOnly /> <AvailableBadge type="version" data={{ version: '3.6', support: 'support' }} /> | 3.6 | Frame loaded status message. |
| url | string | No | – | <AndroidOnly /> <IOSOnly /> <AvailableBadge type="version" data={{ version: '3.6', support: 'support' }} /> | 3.6 | The loaded url of the frame. |

Bind frame load event callback.
Loading