Module Support
| Module | Support Status | Notes |
|---|---|---|
| CSS Animation | ✓ | Android 8.0.37, iOS 8.0.39, see the table below for support details |
| Background & Border | ✓ | Basic features are supported, see Property Support for details |
| Box Model | ✓ | Supports border-box and content-box, no BFC |
| Inline Layout | × | In development |
| Inline-Block Layout | × | Only supports nested structures within the text component; full version is in development |
| Block Layout | ✓ | See Enable Default Block Layout for details |
| Flex Layout | ✓ | Includes inline-flex layout |
| Font | ✓ | Basic support, also supports custom fonts |
| Positioned Layout | ✓ | See the table below for support details. sticky can be replaced by sticky-header/sticky-section |
| CSS Transition | ✓ | |
| CSS Variable | ✓ | Android 8.0.35, iOS 8.0.38 |
| Media queries | ✓ | Only supports DarkMode |
| Font-face | ✓ | Only supports ttf format |
Selector Support
| Category | Example | Support | Remarks |
|---|---|---|---|
| Universal selector | * {} | × | |
| Element selector | tag {} | ✓ | |
| Class selector | .class {} | ✓ | |
| ID selector | #id {} | ✓ | |
| Group selector | a, b {} | ✓ | |
| Direct child selector | a > b {} | ✓ | |
| Descendant selector | a b {} | ✓ | |
| Attribute selector | [attr] {} | × | |
| General sibling selector | a ~ b {} | ✓ | 8.0.49 |
| Adjacent sibling selector | a + b {} | ✓ | 8.0.49 |
| Pseudo-class selector | :first-child {} | ✓ | Supports :first-child / :last-child; supports :not / :only-child / :empty starting from WeChat 8.0.49 (corresponding to Skyline 1.3.0); supports :nth-child starting from WeChat 8.0.50 (corresponding to Skyline 1.3.3) |
| Pseudo-element selector | ::before {} | ✓ | Only supports ::before and ::after |
Attribute Support
| Style Attribute | Supported Format | Default Value | Remarks |
|---|---|---|---|
| display | none / flex / block | flex | The default value can be changed to block via configuration |
| position | relative / absolute / fixed | relative | fixed has been supported since WeChat client version 8.0.43. It only supports positioning relative to the window viewport, and does not support parsing of the top / left / bottom / right default value auto. z-index only applies to sibling nodes; sticky can be replaced by using sticky-header/sticky-section |
| overflow | hidden / visible | visible | scroll is not supported and can only be implemented via scroll-view; standalone settings for overflow-x/y are not supported |
| pointer-events | auto / none | auto | |
| box-sizing | border-box / content-box | border-box | |
| transform | none / <transform-function> |
none | |
| transform-origin | left / center / right / top / bottom / <length>{1, 2} |
50% 50% | |
| z-index | <float> |
0 | Stacking context is not supported; it only takes effect on sibling nodes; applying it to direct child nodes under scroll-view is not supported |
| visibility | visible / hidden | visible | |
| color | <color> |
black | |
| opacity | <float> |
1 | |
| align-items | stretch / center / flex-start / flex-end / baseline | stretch | |
| align-self | auto / stretch / center / flex-start / flex-end / baseline | auto | |
| align-content | stretch / center / flex-start / flex-end / space-between / space-around | auto | |
| justify-content | center / flex-start / flex-end / space-between / space-around / space-evenly | flex-start | |
| flex-direction | row / row-reverse / column / column-reverse | column | |
| flex-wrap | nowrap / wrap / wrap-reverse | nowrap | |
| flex-grow | <float> |
0 | |
| flex-shrink | <float> |
1 | |
| flex-basis | <length> |
auto | |
| order | <float> |
0 | |
| gap | <length> |
0 | |
| flex | Shorthand property; parsing is supported, but expanded properties take precedence | ||
| background-color | <color> |
transparent | |
| background-image | none / <image> |
none | Multiple images are not supported |
| background-size | contain / cover / [`[<length> | auto]{1, 2}`](#wxss-length) | auto |
| background-position | left / center / right / top / bottom / <length> |
0 0 | Full support for <bg-position>#; please refer to MDN |
| background-repeat | repeat-x / repeat-y / repeat / no-repeat | repeat | |
| background | Shorthand property; parsing is supported, but expanded properties take precedence | ||
| width | <length> |
auto | |
| height | <length> |
auto | |
| min-width | <length> |
auto | |
| min-height | <length> |
none | |
| max-width | <length> |
auto | |
| max-height | <length> |
none | |
| left | <length> |
auto | |
| right | <length> |
auto | |
| top | <length> |
auto | |
| bottom | <length> |
auto | |
| padding | <length>{1,4} |
0 0 0 0 | |
| padding-left | <length> |
0 | |
| padding-top | <length> |
0 | |
| padding-right | <length> |
0 | |
| padding-bottom | <length> |
0 |
| margin | <length>{1,4} | 0 0 0 0 | |
| margin-left | <length> | 0 | |
| margin-top | <length> | 0 | |
| margin-right | <length> | 0 | |
| margin-bottom | <length> | 0 | |
| border-left-width | <length> | 3 | |
| border-left-style | <border-style> | none | |
| border-left-color | <color> | black | The default value differs from web, where the default is currentcolor |
| border-top-width | <length> | 3 | |
| border-top-style | <border-style> | none | |
| border-top-color | <color> | black | The default value differs from web, where the default is currentcolor |
| border-right-width | <length> | 3 | |
| border-right-style | <border-style> | none | |
| border-right-color | <color> | black | The default value differs from web, where the default is currentcolor |
| border-bottom-width | <length> | 3 | |
| border-bottom-style | <border-style> | none | |
| border-bottom-color | <color> | black | The default value differs from web, where the default is currentcolor |
| border-width | | | Shorthand property, parsing is supported but expanded properties take precedence |
| border-style | | | Shorthand property, parsing is supported but expanded properties take precedence |
| border-color | | | Shorthand property, parsing is supported but expanded properties take precedence |
| border-left | | | Shorthand property, parsing is supported but expanded properties take precedence |
| border-right | | | Shorthand property, parsing is supported but expanded properties take precedence |
| border-top | | | Shorthand property, parsing is supported but expanded properties take precedence |
| border-bottom | | | Shorthand property, parsing is supported but expanded properties take precedence |
| border | | | Shorthand property, parsing is supported but expanded properties take precedence |
| box-shadow | none / inset? && <length>{2,4} && <color>? | none | Multiple overlays are not supported |
| border-top-left-radius | <length>{1, 2} | 0 | When border-radius is not 0, border-width on all four sides can be inconsistent, but border-color and border-style on all four sides must be consistent |
| border-top-right-radius | <length>{1, 2} | 0 | When border-radius is not 0, border-width on all four sides can be inconsistent, but border-color and border-style on all four sides must be consistent |
| border-bottom-left-radius | <length>{1, 2} | 0 | When border-radius is not 0, border-width on all four sides can be inconsistent, but border-color and border-style on all four sides must be consistent |
| border-bottom-right-radius | <length>{1, 2} | 0 | When border-radius is not 0, border-width on all four sides can be inconsistent, but border-color and border-style on all four sides must be consistent |
| border-radius | | | Shorthand property, parsing is supported but expanded properties take precedence |
| transition-property | none / all / transform / opacity, etc. | all | Mostly supported, not listed individually |
| transition-duration | <time> | 0 | |
| transition-timing-function | <timing-function> | <timing-function> | |
| transition-delay | <time> | 0 | |
| transition | | | Shorthand property, parsing is supported but expanded properties take precedence |
| font | | | Shorthand property, parsing is supported but expanded properties take precedence; system fonts like caption / icon are not supported; |
| font-size | <length> | 16px | Percentages are not supported; keywords (smaller..) are not supported |
| line-height | normal / <number> / <length> / <percent> | normal | |
| text-align | left / center / right / justify / start / end | start | |
| font-weight | normal / bold / <float> | normal | |
| white-space | normal / nowrap / normal | |
| text-overflow | clip / ellipsis | clip | Applies only to text nodes |
| word-break | normal / break-all | normal | |
| word-spacing | normal / <length> | normal | |
| letter-spacing | normal / <length> | normal | |
| font-family | serif / sans-serif / monospace / cursive / fantasy / <string> | | |
| font-style | normal / italic | normal | |
| text-decoration-line | none / underline / overline / line-through | none | Applies only to text nodes |
| text-decoration-style | solid / double / dotted / dashed / wavy | solid | Applies only to text nodes |
| text-decoration-color | <color> | black | Applies only to text nodes; default value differs from web, where the web default is currentcolor |
| text-decoration | | | Shorthand property; parsing is supported but expanded properties take precedence; currently supports setting only one type; combined usage of text-decoration is not yet supported |
| text-shadow | none / <color>? && <length>{2,3} | none | |
| backdrop-filter | none / [<filter-function>] | none | Multi-function not supported; drop-shadow not supported; url not supported; issues with blending with opacity; blur may exhibit inconsistent behavior in certain cases; |
| filter | none / [<filter-function>] | none | Multi-function not supported; drop-shadow not supported; url not supported; |
| mask-image | none / <image> | none | Multiple images not supported |
| animation-delay | <time> | 0 | |
| animation-direction | normal / reverse / alternate / alternate-reverse | normal | |
| animation-duration | <time> | 0 | |
| animation-fill-mode | forwards / both | none | none and backwards are not yet supported; behavior is equivalent to forwards |
| animation-iteration-count | infinite / <number> | 1 | |
| animation-name | none / <custom-ident> | none | |
| animation-timing-function | <timing-function> | <timing-function> | |
| animation | | | Shorthand property; parsing is supported but expanded properties take precedence |
| will-change | auto / contents | auto | Declares painting boundaries to optimize rendering performance |
| text-underline-offset | auto / <length> | auto | Sets the offset distance of the text decoration underline |
Type Support List
| Category | Format | Support | Notes |
|---|---|---|---|
| <length> | auto | ✓ | |
| px | ✓ | ||
| rem | ✓ | ||
| em | × | ||
| rpx | ✓ | ||
| vw | ✓ | ||
| vh | ✓ | ||
| vmin | ✓ | ||
| vmax | ✓ | ||
| ratio | ✓ | ||
| env() | ✓ | Only supports safe-area-inset-* series | |
| calc() | ✓ | ||
| <color> | color keywords | ✓ | |
| transparent | ✓ | ||
| currentColor | × | Consider supporting | |
| rgb[a] | ✓ | ||
| #RRGGBB / #RGB | ✓ | ||
| hsl | ✓ | ||
| hsla | ✓ | ||
| <url> | url() | ✓ | |
| <gradient> | linear-gradient() | ✓ | |
| radial-gradient() | ✓ | ||
| conic-gradient() | ✓ | ||
| <image> | <url> | ✓ | |
| <gradient> | ✓ | ||
| <border-style> | none | ✓ | |
| hidden | ✓ | ||
| solid | ✓ | ||
| dashed | ✓ | ||
| dotted | ✓ | ||
| <filter-function> | brightness() | ✓ | Multiple functions are not supported for now |
| contrast() | ✓ | ||
| saturate() | ✓ | ||
| huerotate() | ✓ | ||
| invert() | ✓ | ||
| opacity() | ✓ | ||
| grayscale() | ✓ | ||
| specia() | ✓ | ||
| drop-shadow | × | ||
| <angle> | deg | ✓ | |
| grad | ✓ | ||
| rad | ✓ | ||
| turn | ✓ | ||
| <timing-function> | ease | ✓ | |
| ease-in | ✓ | ||
| ease-out | ✓ | ||
| ease-in-out | ✓ | ||
| linear | ✓ | ||
| cubic-bezier | ✓ | ||
| steps | ✓ | ||
| step-start | ✓ | ||
| step-end | ✓ |
Enabling Default Block Layout
In Skyline, nodes default to flex layout. You can switch the default layout to block using the configuration below.
| Platform | Minimum Version |
|---|---|
| Android | 8.0.34 |
| iOS | 8.0.36 |
| Developer Tools | Nightly Build (1.06.2304262) |
| Base Library | 2.31.1 |
Configure in app.json or page.json:
rendererOptions: {
"skyline": {
"defaultDisplayBlock": true,
}
}
Enable Default ContentBox Box Model
By default, nodes under Skyline use the border-box box model. You can switch to the default content-box box model using the following configuration.
| Platform | Minimum Version |
|---|---|
| Android | 8.0.42 |
| iOS | 8.0.42 |
| Developer Tools | Nightly Build (1.06.2310092) |
| Base Library | 3.1.0 |
Configure in app.json or page.json:
rendererOptions: {
"skyline": {
"defaultContentBox": true,
}
}
Enable Global Matching for Tag Selectors
Under Skyline, tag selectors follow the style isolation mechanism. In contrast, WebView is not subject to style isolation constraints. You can align the behavior with WebView by configuring tagNameStyleIsolation: legacy. If you specify tagNameStyleIsolation: isolated, the tag selectors will follow the style isolation mechanism.
| Platform | Minimum Version |
|---|---|
| Android | 8.0.51 |
| iOS | 8.0.51 |
| Developer Tools | Nightly Build (1.06.2409032) |
| Base Library | 3.6.0 |
Configure in app.json or page.json:
rendererOptions: {
"skyline": {
"tagNameStyleIsolation": "legacy",
}
}
Enabling Automatic Expansion for scroll-view
Under Skyline, scroll-view requires explicit width and height specifications by default to ensure proper layout. You can enable automatic expansion based on content using the configuration below.
| Platform | Minimum Version |
|---|---|
| Android | 8.0.54 |
| iOS | 8.0.54 |
| Base Library | 3.7.2 |
Configure in app.json or page.json:
rendererOptions: {
"skyline": {
"enableScrollViewAutoSize": true,
}
}
Enable Global Sharing of Keyframe Styles
Under Skyline, @keyframe rules follow the style isolation mechanism. Under WebView, they are not subject to style isolation constraints. You can align with WebView behavior by configuring keyframeStyleIsolation: legacy. If keyframeStyleIsolation: isolated is specified, the style isolation mechanism will be followed.
| Platform | Minimum Version |
|---|---|
| Android | 8.0.57 |
| iOS | 8.0.57 |
| WeChat SDK | 3.8.0 |
Configure in app.json or page.json:
rendererOptions: {
"skyline": {
"keyframeStyleIsolation": "legacy",
}
}