engine/view/styles/utils
@ckeditor/ckeditor5-engine/src/view/styles/utils
Filtering
Functions
-
getBoxSidesShorthandValue( styleShorthand ) → String
module:engine/view/styles/utils~getBoxSidesShorthandValue
-
getBoxSidesValueReducer( styleShorthand ) → function
module:engine/view/styles/utils~getBoxSidesValueReducer
Default reducer for CSS properties that concerns edges of a box shorthand notations:
stylesProcessor.setReducer( 'padding', getBoxSidesValueReducer( 'padding' ) );
Parameters
styleShorthand : String
Returns
function
-
getPositionShorthandNormalizer( shorthand ) → function
module:engine/view/styles/utils~getPositionShorthandNormalizer
Creates a normalizer for a shorthand 1-to-4 value.
stylesProcessor.setNormalizer( 'margin', getPositionShorthandNormalizer( 'margin' ) );
Parameters
shorthand : String
Returns
function
-
getShorthandValues( string ) → Array.<String>
module:engine/view/styles/utils~getShorthandValues
Parses parts of a 1-to-4 value notation - handles some CSS values with spaces (like RGB()).
getShorthandValues( 'red blue RGB(0, 0, 0)'); // will return [ 'red', 'blue', 'RGB(0, 0, 0)' ]
Parameters
string : String
Returns
Array.<String>
-
isAttachment( string ) → Boolean
module:engine/view/styles/utils~isAttachment
Checks if string contains background attachment CSS value.
Parameters
string : String
Returns
Boolean
-
isColor( string ) → Boolean
module:engine/view/styles/utils~isColor
Checks if string contains color CSS value.
isColor( '#f00' ); // true isColor( '#AA00BB33' ); // true isColor( 'rgb(0, 0, 250)' ); // true isColor( 'hsla(240, 100%, 50%, .7)' ); // true isColor( 'deepskyblue' ); // true
Note: It does not support CSS Level 4 whitespace syntax, system colors and radius values for HSL colors.
Parameters
string : String
Returns
Boolean
-
isLength( string ) → Boolean
module:engine/view/styles/utils~isLength
Checks if string contains length CSS value.
Parameters
string : String
Returns
Boolean
-
isLineStyle( string ) → Boolean
module:engine/view/styles/utils~isLineStyle
Checks if string contains line style CSS value.
Parameters
string : String
Returns
Boolean
-
isPercentage( string ) → Boolean
module:engine/view/styles/utils~isPercentage
Checks if string contains percentage CSS value.
Parameters
string : String
Returns
Boolean
-
isPosition( string ) → Boolean
module:engine/view/styles/utils~isPosition
Checks if string contains background position CSS value.
Parameters
string : String
Returns
Boolean
-
isRepeat( string ) → Boolean
module:engine/view/styles/utils~isRepeat
Checks if string contains background repeat CSS value.
Parameters
string : String
Returns
Boolean
-
isURL( string ) → Boolean
module:engine/view/styles/utils~isURL
Checks if string contains URL CSS value.
Parameters
string : String
Returns
Boolean
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.