diff options
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/cssvalues.nim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/css/cssvalues.nim b/src/css/cssvalues.nim index 158847b6..bfe65804 100644 --- a/src/css/cssvalues.nim +++ b/src/css/cssvalues.nim @@ -98,6 +98,7 @@ type cptFlexShrink = "flex-shrink" cptFlexBasis = "flex-basis" cptOverflow = "overflow" + cptZIndex = "z-index" CSSValueType* = enum cvtNone = "" @@ -456,7 +457,8 @@ const ValueTypes = [ cptFlexGrow: cvtNumber, cptFlexShrink: cvtNumber, cptFlexBasis: cvtLength, - cptOverflow: cvtOverflow + cptOverflow: cvtOverflow, + cptZIndex: cvtInteger ] const InheritedProperties = { @@ -466,6 +468,11 @@ const InheritedProperties = { cptVisibility, cptTextTransform } +#TODO implement sticky +const PositionStaticLike* = { + PositionStatic, PositionSticky +} + func shorthandType(s: string): CSSShorthandType = return parseEnumNoCase[CSSShorthandType](s).get(cstNone) @@ -1184,6 +1191,7 @@ proc parseValue(cvals: openArray[CSSComponentValue]; t: CSSPropertyType): of cptFontWeight: return_new integer, ?cssFontWeight(cval) of cptChaColspan: return_new integer, ?cssInteger(cval, 1 .. 1000) of cptChaRowspan: return_new integer, ?cssInteger(cval, 0 .. 65534) + of cptZIndex: return_new integer, ?cssInteger(cval, -65534 .. 65534) else: assert false of cvtTextDecoration: return_new textdecoration, ?cssTextDecoration(cvals) of cvtWordBreak: return_new wordBreak, ?parseIdent[CSSWordBreak](cval) |