From d4d402b2abba095c0a84ffea02f5c8d517dc5d88 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Sat, 21 Dec 2024 23:29:36 +0800 Subject: [PATCH] fix syntax for functions of `basic-type` type --- files/en-us/web/css/basic-shape/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/files/en-us/web/css/basic-shape/index.md b/files/en-us/web/css/basic-shape/index.md index 6a7bd6626b6d72c..359fd5b6834a603 100644 --- a/files/en-us/web/css/basic-shape/index.md +++ b/files/en-us/web/css/basic-shape/index.md @@ -44,7 +44,7 @@ The parameters common across the syntax of some basic shape functions include: The {{cssxref("basic-shape/inset","inset()")}} function creates an inset rectangle, with its size defined by the offset distance of each of the four sides of its container and, optionally, rounded corners. ```plain -inset( {1,4} [ round <`border-radius`> ]? ) +inset( {1,4} [ round <'border-radius'> ]? ) ``` When all of the first four arguments are supplied, they represent the top, right, bottom, and left offsets from the reference box inward that define the position of the edges of the inset rectangle. These arguments follow the syntax of the {{cssxref("margin")}} shorthand, which lets you set all four insets with one, two, three, or four values. @@ -56,7 +56,7 @@ If a pair of insets for a dimension adds up to more than 100% of that dimension, The {{cssxref("basic-shape/rect","rect()")}} function defines a rectangle using the specified distances from the top and left edges of the reference box, with optional rounded corners. ```plain -rect( [ | auto ]{4} [ round <`border-radius`> ]? ) +rect( [ | auto ]{4} [ round <'border-radius'> ]? ) ``` When using the `rect()` function, you do not define the width and height of the rectangle. Instead, you specify four values to create the rectangle, with its dimensions determined by the size of the reference box and the four offset values. Each value can be either a {{cssxref("length")}}, a {{cssxref("percentage")}}, or the keyword `auto`. The `auto` keyword is interpreted as `0%` for the top and left values and as `100%` for the bottom and right values. @@ -66,7 +66,7 @@ When using the `rect()` function, you do not define the width and height of the The {{cssxref("basic-shape/xywh","xywh()")}} function defines a rectangle located at the specified distances from the left (`x`) and top (`y`) edges of the reference box and sized by the specified width (`w`) and height (`h`) of the rectangle, in that order, with optional rounded corners. ```plain -xywh( {2} {2} [ round <`border-radius`> ]? ) +xywh( {2} {2} [ round <'border-radius'> ]? ) ``` ### Syntax for circles @@ -94,7 +94,7 @@ The `` arguments represent _rx_ and _ry_, the x-axis and y-axis ra The {{cssxref("basic-shape/polygon","polygon()")}} function defines a polygon using an SVG {{SVGAttr("fill-rule")}} and a set of coordinates. ```plain -polygon( <`fill-rule`>?, [ ]# ) +polygon( <'fill-rule'>? , [ ]# ) ``` The function takes a list of comma-separated coordinate pairs, each consisting of two space-separated `` values as the _xi_ and _yi_ pair. These values represent the x and y axis coordinates of the polygon at position _i_ (the vertex point where two lines meet). @@ -104,7 +104,7 @@ The function takes a list of comma-separated coordinate pairs, each consisting o The {{cssxref("basic-shape/path","path()")}} function defines a shape using an SVG {{SVGAttr("fill-rule")}} and an SVG [path definition](/en-US/docs/Web/SVG/Attribute/d). ```plain -path( <`fill-rule`>?, ]? ) +path( <'fill-rule'>? , ) ``` The required `` is an [SVG path](/en-US/docs/Web/SVG/Attribute/d) as a quoted string. The `path()` function is not a valid {{cssxref("shape-outside")}} property value. @@ -114,7 +114,7 @@ The required `` is an [SVG path](/en-US/docs/Web/SVG/Attribute/d) as a q The {{cssxref("basic-shape/shape","shape()")}} function defines a shape using an initial starting point and a series of shape commands. ```plain -shape( ? from , # ) +shape( <'fill-rule'>? from , # ) ``` The `from ` parameter represents the starting point for the first shape command, and `` defines one or more shape commands, which are similar to the [SVG path commands](/en-US/docs/Web/SVG/Attribute/d#path_commands). The `shape()` function is not a valid {{cssxref("shape-outside")}} property value.