pengzhanbo 385059f214
docs: update en docs (#708)
* docs: update en docs

* chore: tweak

* chore: tweak

* chore: tweak
2025-10-09 15:46:05 +08:00

2.7 KiB

title, createTime, icon, permalink
title createTime icon permalink
Can I Use 2025/10/08 14:50:55 streamline:desktop-help /en/guide/markdown/caniuse/

Overview

When writing articles, this feature provides the functionality to embed platform support information for WEB features from can-i-use.

This allows for a more intuitive representation of a feature's support level when describing a specific WEB feature.

Configuration

This feature is disabled by default. You can enable it in the configuration file.

export default defineUserConfig({
  theme: plumeTheme({
    markdownP: {
      caniuse: true, // [!code ++]
    },
  })
})

In your article's markdown file, use the following format:

@[caniuse](feature)

For ease of use, the theme provides tool support: caniuse Feature Search. You can use this tool directly to help generate the markdown code.

Syntax

@[caniuse](feature)
@[caniuse{browser_versions}](feature)
@[caniuse embed_type](feature)
@[caniuse embed_type{browser_versions}](feature)
  • feature

    Required. For correct values, please refer to caniuse-embed.vercel.app.

  • {browser_versions}

    Optional. Specifies the support status of the current feature across multiple browser versions.

    Default value: {-2,1}

    Format: {past,future} Value range: -5 ~ 3

    • Values less than 0 indicate support status for browser versions lower than the current one.
    • 0 indicates the support status for the current browser version.
    • Values greater than 0 indicate support status for browser versions higher than the current one.
  • embed_type

    Optional. The type of resource embedding.

    Type: 'embed' | 'image'

    Default value: 'embed'

:::caution The image type is no longer recommended. It is advised to use the embed type. The theme has changed the implementation technology for the embed component. The current embed type now offers significant advantages over the image type, including faster loading speed, smaller size, and better interactive experience. :::

Examples

Get the browser support for the CSS pseudo-class selector :dir():

@[caniuse](css-matches-pseudo)

Result:

@caniuse

Get the browser support for the CSS pseudo-class selector :dir() as an image:

@[caniuse image](css-matches-pseudo)

Result:

@caniuse image

Get the browser support for the CSS pseudo-class selector :dir() for a specific range of browser versions:

@[caniuse{-2,3}](css-matches-pseudo)

Result:

@caniuse{-2,3}