Lược đồ đặt tên của Thuộc tính tùy chỉnh CSS #

https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/

Presets such as --wp--preset--color--black can be divided into the following chunks:

  • --wp: prefix to namespace the CSS variable.

  • preset: indicates is a CSS variable that belongs to the presets.

  • color: indicates which preset category the variable belongs to. It can be color, font-size, gradients.

  • black: the slug of the particular preset value.

Custom properties such as --wp--custom--line-height--body, which can be divided into the following chunks:

  • --wp: prefix to namespace the CSS variable.

  • custom: indicates is a “free-form” CSS variable created by the theme.

  • line-height--body: the result of converting the “custom” object keys into a string.

Last updated