diff options
Diffstat (limited to 'src/css/values.nim')
-rw-r--r-- | src/css/values.nim | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/css/values.nim b/src/css/values.nim index 0bf57675..93864212 100644 --- a/src/css/values.nim +++ b/src/css/values.nim @@ -41,7 +41,7 @@ type PROPERTY_MIN_WIDTH, PROPERTY_MIN_HEIGHT, PROPERTY_BACKGROUND_IMAGE, PROPERTY_CHA_COLSPAN, PROPERTY_CHA_ROWSPAN, PROPERTY_FLOAT, PROPERTY_VISIBILITY, PROPERTY_BOX_SIZING, PROPERTY_CLEAR, - PROPERTY_TEXT_TRANSFORM + PROPERTY_TEXT_TRANSFORM, PROPERTY_BGCOLOR_IS_CANVAS CSSValueType* = enum VALUE_NONE, VALUE_LENGTH, VALUE_COLOR, VALUE_CONTENT, VALUE_DISPLAY, @@ -50,7 +50,7 @@ type VALUE_TEXT_ALIGN, VALUE_LIST_STYLE_POSITION, VALUE_POSITION, VALUE_CAPTION_SIDE, VALUE_LENGTH2, VALUE_BORDER_COLLAPSE, VALUE_QUOTES, VALUE_COUNTER_RESET, VALUE_IMAGE, VALUE_FLOAT, VALUE_VISIBILITY, - VALUE_BOX_SIZING, VALUE_CLEAR, VALUE_TEXT_TRANSFORM + VALUE_BOX_SIZING, VALUE_CLEAR, VALUE_TEXT_TRANSFORM, VALUE_BGCOLOR_IS_CANVAS CSSGlobalValueType* = enum VALUE_NOGLOBAL, VALUE_INITIAL, VALUE_INHERIT, VALUE_REVERT, VALUE_UNSET @@ -224,6 +224,8 @@ type clear*: CSSClear of VALUE_TEXT_TRANSFORM: texttransform*: CSSTextTransform + of VALUE_BGCOLOR_IS_CANVAS: + bgcoloriscanvas*: bool of VALUE_NONE: discard CSSComputedValues* = ref array[CSSPropertyType, CSSComputedValue] @@ -300,7 +302,8 @@ const PropertyNames = { "visibility": PROPERTY_VISIBILITY, "box-sizing": PROPERTY_BOX_SIZING, "clear": PROPERTY_CLEAR, - "text-transform": PROPERTY_TEXT_TRANSFORM + "text-transform": PROPERTY_TEXT_TRANSFORM, + "-cha-bgcolor-is-canvas": PROPERTY_BGCOLOR_IS_CANVAS }.toTable() const ValueTypes* = [ @@ -351,7 +354,8 @@ const ValueTypes* = [ PROPERTY_VISIBILITY: VALUE_VISIBILITY, PROPERTY_BOX_SIZING: VALUE_BOX_SIZING, PROPERTY_CLEAR: VALUE_CLEAR, - PROPERTY_TEXT_TRANSFORM: VALUE_TEXT_TRANSFORM + PROPERTY_TEXT_TRANSFORM: VALUE_TEXT_TRANSFORM, + PROPERTY_BGCOLOR_IS_CANVAS: VALUE_BGCOLOR_IS_CANVAS ] const InheritedProperties = { @@ -1196,6 +1200,8 @@ proc getValueFromDecl(val: CSSComputedValue, d: CSSDeclaration, val.clear = ?cssClear(cval) of VALUE_TEXT_TRANSFORM: val.texttransform = ?cssTextTransform(cval) + of VALUE_BGCOLOR_IS_CANVAS: + return err() # internal value of VALUE_NONE: discard return ok() |