From f83e9b3426e2bc0932effbbc41fab14a14afaa40 Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya Date: Mon, 4 Nov 2024 20:07:08 -0500 Subject: [PATCH 1/7] update @property descriptors --- files/en-us/web/css/@property/index.md | 35 +++--- .../en-us/web/css/@property/inherits/index.md | 35 ++---- .../web/css/@property/initial-value/index.md | 41 +++---- files/en-us/web/css/@property/syntax/index.md | 110 +++++++++++------- 4 files changed, 108 insertions(+), 113 deletions(-) diff --git a/files/en-us/web/css/@property/index.md b/files/en-us/web/css/@property/index.md index 19e3b05c4e5b04c..748b3ea7a9f43bd 100644 --- a/files/en-us/web/css/@property/index.md +++ b/files/en-us/web/css/@property/index.md @@ -7,40 +7,41 @@ browser-compat: css.at-rules.property {{CSSRef}} -The **`@property`** [CSS](/en-US/docs/Web/CSS) [at-rule](/en-US/docs/Web/CSS/At-rule) is part of the [CSS Houdini](/en-US/docs/Web/API/Houdini_APIs) umbrella of APIs. It allows developers to explicitly define their [CSS custom properties](/en-US/docs/Web/CSS/--*), allowing for property type checking and constraining, setting default values, and defining whether a custom property can inherit values or not. +The **`@property`** [CSS](/en-US/docs/Web/CSS) [at-rule](/en-US/docs/Web/CSS/At-rule) is part of the [CSS Houdini](/en-US/docs/Web/API/Houdini_APIs) set of APIs. It allows developers to explicitly define [CSS custom properties](/en-US/docs/Web/CSS/--*), allowing for property type checking and constraining, setting default values, and defining whether a custom property can inherit values or not. -The `@property` rule represents a custom property registration directly in a stylesheet without having to run any JS. Valid `@property` rules result in a registered custom property, as if {{domxref('CSS.registerProperty_static', 'registerProperty()')}} had been called with equivalent parameters. +The `@property` rule represents a custom property registration directly in a stylesheet without having to run any JavaScript. Valid `@property` rules result in a registered custom property, which is similar as calling {{domxref('CSS.registerProperty_static', 'registerProperty()')}} with equivalent parameters. ## Syntax ```css -@property --property-name { +@property --theme-color { syntax: ""; inherits: false; initial-value: #c0ffee; } ``` +The custom property name is a [``](/en-US/docs/Web/CSS/dashed-ident) that starts with `--` and is followed by a valid, user-defined identifier. It is case-sensitive. + ### Descriptors - {{cssxref("@property/syntax","syntax")}} - - - : Describes the allowable syntax for the property. May be a ``, ``, ``, ``, ``, ``, ``, ``, ``, `