瀏覽代碼

Docs: Minor corrections.

Aleksander Nowodzinski 5 年之前
父節點
當前提交
8b3278769f
共有 2 個文件被更改,包括 12 次插入3 次删除
  1. 2 1
      packages/ckeditor5-engine/src/view/styles/utils.js
  2. 10 2
      packages/ckeditor5-engine/src/view/stylesmap.js

+ 2 - 1
packages/ckeditor5-engine/src/view/styles/utils.js

@@ -146,7 +146,8 @@ export function getBoxSidesValueReducer( styleShorthand ) {
 }
 
 /**
- * Returns a proper 1-to-4 value of a CSS [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) notation.
+ * Returns a [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) notation
+ * of a CSS property value.
  *
  *		getBoxSidesShorthandValue( { top: '1px', right: '1px', bottom: '2px', left: '1px' } );
  *		// will return '1px 1px 2px'

+ 10 - 2
packages/ckeditor5-engine/src/view/stylesmap.js

@@ -887,14 +887,22 @@ function appendStyleValue( stylesObject, nameOrPath, valueOrObject ) {
  */
 
 /**
- * An object describing box sides values.
+ * An object describing values associated with the sides of a box, for instance margins, paddings,
+ * border widths, border colors, etc.
  *
  *		const margin = {
  *			top: '1px',
  *			right: '3px',
  *			bottom: '3px',
  *			left: '7px'
- *		}
+ *		};
+ *
+ *		const borderColor = {
+ *			top: 'red',
+ *			right: 'blue',
+ *			bottom: 'blue',
+ *			left: 'red'
+ *		};
  *
  * @typedef {Object} module:engine/view/stylesmap~BoxSides
  *