Documentation ¶
Overview ¶
This package defines the types needed to handle the various CSS properties. There are 3 groups of types for a property, separated by 2 steps : cascading and computation. Thus the need of 3 types (see below). Schematically, the style computation is :
ValidatedProperty (ComputedFromCascaded)-> CascadedProperty (Compute)-> CssProperty
Index ¶
- Constants
- Variables
- func Is(m MaybeFloat) bool
- type AttrData
- type Bool
- type BoolString
- type CascadedProperty
- type Center
- type Centers
- type Color
- type ColorStop
- type ColorsStops
- type ContentProperties
- type ContentProperty
- func (c ContentProperty) AsCounter() (counterName string, counterStyle CounterStyleID)
- func (c ContentProperty) AsCounters() (counterName, separator string, counterStyle CounterStyleID)
- func (c ContentProperty) AsLeader() string
- func (c ContentProperty) AsQuote() Quote
- func (c ContentProperty) AsString() (value string)
- func (c ContentProperty) AsStrings() []string
- func (c ContentProperty) AsTargetCounter() (anchorToken ContentProperty, counterName, counterStyle string)
- func (c ContentProperty) AsTargetCounters() (anchorToken ContentProperty, counterName string, separator ContentProperty, ...)
- func (c ContentProperty) AsTargetText() (anchorToken ContentProperty, textStyle string)
- func (v ContentProperty) IsNone() bool
- type CounterStyleID
- type Counters
- type CssProperty
- type Decorations
- type DefaultKind
- type Dimension
- type Dimensions
- type DirectionType
- type Display
- type ElementStyle
- type Fl
- type Float
- type FloatString
- type GradientSize
- type Image
- type Images
- type InnerContent
- type Int
- type IntNamedString
- type IntString
- type IntStrings
- type Ints3
- type KnownProp
- type LinearGradient
- type Marks
- type MaybeBool
- type MaybeFloat
- type NamedProperties
- type NamedProperty
- type NamedString
- type NoneImage
- type OptionalRanges
- type Page
- type Point
- type PropKey
- type Properties
- func (p Properties) Copy() Properties
- func (s Properties) GetAlignContent() String
- func (s Properties) GetAlignItems() String
- func (s Properties) GetAlignSelf() String
- func (s Properties) GetAnchor() String
- func (s Properties) GetAppearance() String
- func (s Properties) GetBackgroundAttachment() Strings
- func (s Properties) GetBackgroundClip() Strings
- func (s Properties) GetBackgroundColor() Color
- func (s Properties) GetBackgroundImage() Images
- func (s Properties) GetBackgroundOrigin() Strings
- func (s Properties) GetBackgroundPosition() Centers
- func (s Properties) GetBackgroundRepeat() Repeats
- func (s Properties) GetBackgroundSize() Sizes
- func (s Properties) GetBleedBottom() Value
- func (s Properties) GetBleedLeft() Value
- func (s Properties) GetBleedRight() Value
- func (s Properties) GetBleedTop() Value
- func (s Properties) GetBlockEllipsis() TaggedString
- func (s Properties) GetBookmarkLabel() ContentProperties
- func (s Properties) GetBookmarkLevel() IntString
- func (s Properties) GetBookmarkState() String
- func (s Properties) GetBorderBottomColor() Color
- func (s Properties) GetBorderBottomLeftRadius() Point
- func (s Properties) GetBorderBottomRightRadius() Point
- func (s Properties) GetBorderBottomStyle() String
- func (s Properties) GetBorderBottomWidth() Value
- func (s Properties) GetBorderCollapse() String
- func (s Properties) GetBorderLeftColor() Color
- func (s Properties) GetBorderLeftStyle() String
- func (s Properties) GetBorderLeftWidth() Value
- func (s Properties) GetBorderRightColor() Color
- func (s Properties) GetBorderRightStyle() String
- func (s Properties) GetBorderRightWidth() Value
- func (s Properties) GetBorderSpacing() Point
- func (s Properties) GetBorderTopColor() Color
- func (s Properties) GetBorderTopLeftRadius() Point
- func (s Properties) GetBorderTopRightRadius() Point
- func (s Properties) GetBorderTopStyle() String
- func (s Properties) GetBorderTopWidth() Value
- func (s Properties) GetBottom() Value
- func (s Properties) GetBoxDecorationBreak() String
- func (s Properties) GetBoxSizing() String
- func (s Properties) GetBreakAfter() String
- func (s Properties) GetBreakBefore() String
- func (s Properties) GetBreakInside() String
- func (s Properties) GetCaptionSide() String
- func (s Properties) GetClear() String
- func (s Properties) GetClip() Values
- func (s Properties) GetColor() Color
- func (s Properties) GetColumnCount() IntString
- func (s Properties) GetColumnFill() String
- func (s Properties) GetColumnGap() Value
- func (s Properties) GetColumnRuleColor() Color
- func (s Properties) GetColumnRuleStyle() String
- func (s Properties) GetColumnRuleWidth() Value
- func (s Properties) GetColumnSpan() String
- func (s Properties) GetColumnWidth() Value
- func (s Properties) GetContent() SContent
- func (s Properties) GetContinue() String
- func (s Properties) GetCounterIncrement() SIntStrings
- func (s Properties) GetCounterReset() SIntStrings
- func (s Properties) GetCounterSet() SIntStrings
- func (s Properties) GetDirection() String
- func (s Properties) GetDisplay() Display
- func (s Properties) GetEmptyCells() String
- func (s Properties) GetFlexBasis() Value
- func (s Properties) GetFlexDirection() String
- func (s Properties) GetFlexGrow() Float
- func (s Properties) GetFlexShrink() Float
- func (s Properties) GetFlexWrap() String
- func (s Properties) GetFloat() String
- func (s Properties) GetFontFamily() Strings
- func (s Properties) GetFontFeatureSettings() SIntStrings
- func (s Properties) GetFontKerning() String
- func (s Properties) GetFontLanguageOverride() String
- func (s Properties) GetFontSize() Value
- func (s Properties) GetFontStretch() String
- func (s Properties) GetFontStyle() String
- func (s Properties) GetFontVariant() String
- func (s Properties) GetFontVariantAlternates() String
- func (s Properties) GetFontVariantCaps() String
- func (s Properties) GetFontVariantEastAsian() SStrings
- func (s Properties) GetFontVariantLigatures() SStrings
- func (s Properties) GetFontVariantNumeric() SStrings
- func (s Properties) GetFontVariantPosition() String
- func (s Properties) GetFontVariationSettings() SFloatStrings
- func (s Properties) GetFontWeight() IntString
- func (s Properties) GetFootnoteDisplay() String
- func (s Properties) GetFootnotePolicy() String
- func (s Properties) GetHeight() Value
- func (s Properties) GetHyphenateCharacter() String
- func (s Properties) GetHyphenateLimitChars() Ints3
- func (s Properties) GetHyphenateLimitZone() Value
- func (s Properties) GetHyphens() String
- func (s Properties) GetImageOrientation() SBoolFloat
- func (s Properties) GetImageRendering() String
- func (s Properties) GetImageResolution() Value
- func (s Properties) GetJustifyContent() String
- func (s Properties) GetLang() NamedString
- func (s Properties) GetLeft() Value
- func (s Properties) GetLetterSpacing() Value
- func (s Properties) GetLineHeight() Value
- func (s Properties) GetLink() NamedString
- func (s Properties) GetListStyleImage() Image
- func (s Properties) GetListStylePosition() String
- func (s Properties) GetListStyleType() CounterStyleID
- func (s Properties) GetMarginBottom() Value
- func (s Properties) GetMarginBreak() String
- func (s Properties) GetMarginLeft() Value
- func (s Properties) GetMarginRight() Value
- func (s Properties) GetMarginTop() Value
- func (s Properties) GetMarks() Marks
- func (s Properties) GetMaxHeight() Value
- func (s Properties) GetMaxLines() TaggedInt
- func (s Properties) GetMaxWidth() Value
- func (s Properties) GetMinHeight() Value
- func (s Properties) GetMinWidth() Value
- func (s Properties) GetObjectFit() String
- func (s Properties) GetObjectPosition() Center
- func (s Properties) GetOpacity() Float
- func (s Properties) GetOrder() Int
- func (s Properties) GetOrphans() Int
- func (s Properties) GetOutlineColor() Color
- func (s Properties) GetOutlineStyle() String
- func (s Properties) GetOutlineWidth() Value
- func (s Properties) GetOverflow() String
- func (s Properties) GetOverflowWrap() String
- func (s Properties) GetPaddingBottom() Value
- func (s Properties) GetPaddingLeft() Value
- func (s Properties) GetPaddingRight() Value
- func (s Properties) GetPaddingTop() Value
- func (s Properties) GetPage() Page
- func (s Properties) GetPosition() BoolString
- func (s Properties) GetQuotes() Quotes
- func (s Properties) GetRight() Value
- func (s Properties) GetSize() Point
- func (s Properties) GetStringSet() StringSet
- func (s Properties) GetTabSize() Value
- func (s Properties) GetTableLayout() String
- func (s Properties) GetTextAlignAll() String
- func (s Properties) GetTextAlignLast() String
- func (s Properties) GetTextDecorationColor() Color
- func (s Properties) GetTextDecorationLine() Decorations
- func (s Properties) GetTextDecorationStyle() String
- func (s Properties) GetTextIndent() Value
- func (s Properties) GetTextOverflow() String
- func (s Properties) GetTextTransform() String
- func (s Properties) GetTop() Value
- func (s Properties) GetTransform() Transforms
- func (s Properties) GetTransformOrigin() Point
- func (s Properties) GetUnicodeBidi() String
- func (s Properties) GetVerticalAlign() Value
- func (s Properties) GetVisibility() String
- func (s Properties) GetWhiteSpace() String
- func (s Properties) GetWidows() Int
- func (s Properties) GetWidth() Value
- func (s Properties) GetWordBreak() String
- func (s Properties) GetWordSpacing() Value
- func (s Properties) GetZIndex() IntString
- func (s Properties) SetAlignContent(v String)
- func (s Properties) SetAlignItems(v String)
- func (s Properties) SetAlignSelf(v String)
- func (s Properties) SetAnchor(v String)
- func (s Properties) SetAppearance(v String)
- func (s Properties) SetBackgroundAttachment(v Strings)
- func (s Properties) SetBackgroundClip(v Strings)
- func (s Properties) SetBackgroundColor(v Color)
- func (s Properties) SetBackgroundImage(v Images)
- func (s Properties) SetBackgroundOrigin(v Strings)
- func (s Properties) SetBackgroundPosition(v Centers)
- func (s Properties) SetBackgroundRepeat(v Repeats)
- func (s Properties) SetBackgroundSize(v Sizes)
- func (s Properties) SetBleedBottom(v Value)
- func (s Properties) SetBleedLeft(v Value)
- func (s Properties) SetBleedRight(v Value)
- func (s Properties) SetBleedTop(v Value)
- func (s Properties) SetBlockEllipsis(v TaggedString)
- func (s Properties) SetBookmarkLabel(v ContentProperties)
- func (s Properties) SetBookmarkLevel(v IntString)
- func (s Properties) SetBookmarkState(v String)
- func (s Properties) SetBorderBottomColor(v Color)
- func (s Properties) SetBorderBottomLeftRadius(v Point)
- func (s Properties) SetBorderBottomRightRadius(v Point)
- func (s Properties) SetBorderBottomStyle(v String)
- func (s Properties) SetBorderBottomWidth(v Value)
- func (s Properties) SetBorderCollapse(v String)
- func (s Properties) SetBorderLeftColor(v Color)
- func (s Properties) SetBorderLeftStyle(v String)
- func (s Properties) SetBorderLeftWidth(v Value)
- func (s Properties) SetBorderRightColor(v Color)
- func (s Properties) SetBorderRightStyle(v String)
- func (s Properties) SetBorderRightWidth(v Value)
- func (s Properties) SetBorderSpacing(v Point)
- func (s Properties) SetBorderTopColor(v Color)
- func (s Properties) SetBorderTopLeftRadius(v Point)
- func (s Properties) SetBorderTopRightRadius(v Point)
- func (s Properties) SetBorderTopStyle(v String)
- func (s Properties) SetBorderTopWidth(v Value)
- func (s Properties) SetBottom(v Value)
- func (s Properties) SetBoxDecorationBreak(v String)
- func (s Properties) SetBoxSizing(v String)
- func (s Properties) SetBreakAfter(v String)
- func (s Properties) SetBreakBefore(v String)
- func (s Properties) SetBreakInside(v String)
- func (s Properties) SetCaptionSide(v String)
- func (s Properties) SetClear(v String)
- func (s Properties) SetClip(v Values)
- func (s Properties) SetColor(v Color)
- func (s Properties) SetColumnCount(v IntString)
- func (s Properties) SetColumnFill(v String)
- func (s Properties) SetColumnGap(v Value)
- func (s Properties) SetColumnRuleColor(v Color)
- func (s Properties) SetColumnRuleStyle(v String)
- func (s Properties) SetColumnRuleWidth(v Value)
- func (s Properties) SetColumnSpan(v String)
- func (s Properties) SetColumnWidth(v Value)
- func (s Properties) SetContent(v SContent)
- func (s Properties) SetContinue(v String)
- func (s Properties) SetCounterIncrement(v SIntStrings)
- func (s Properties) SetCounterReset(v SIntStrings)
- func (s Properties) SetCounterSet(v SIntStrings)
- func (s Properties) SetDirection(v String)
- func (s Properties) SetDisplay(v Display)
- func (s Properties) SetEmptyCells(v String)
- func (s Properties) SetFlexBasis(v Value)
- func (s Properties) SetFlexDirection(v String)
- func (s Properties) SetFlexGrow(v Float)
- func (s Properties) SetFlexShrink(v Float)
- func (s Properties) SetFlexWrap(v String)
- func (s Properties) SetFloat(v String)
- func (s Properties) SetFontFamily(v Strings)
- func (s Properties) SetFontFeatureSettings(v SIntStrings)
- func (s Properties) SetFontKerning(v String)
- func (s Properties) SetFontLanguageOverride(v String)
- func (s Properties) SetFontSize(v Value)
- func (s Properties) SetFontStretch(v String)
- func (s Properties) SetFontStyle(v String)
- func (s Properties) SetFontVariant(v String)
- func (s Properties) SetFontVariantAlternates(v String)
- func (s Properties) SetFontVariantCaps(v String)
- func (s Properties) SetFontVariantEastAsian(v SStrings)
- func (s Properties) SetFontVariantLigatures(v SStrings)
- func (s Properties) SetFontVariantNumeric(v SStrings)
- func (s Properties) SetFontVariantPosition(v String)
- func (s Properties) SetFontVariationSettings(v SFloatStrings)
- func (s Properties) SetFontWeight(v IntString)
- func (s Properties) SetFootnoteDisplay(v String)
- func (s Properties) SetFootnotePolicy(v String)
- func (s Properties) SetHeight(v Value)
- func (s Properties) SetHyphenateCharacter(v String)
- func (s Properties) SetHyphenateLimitChars(v Ints3)
- func (s Properties) SetHyphenateLimitZone(v Value)
- func (s Properties) SetHyphens(v String)
- func (s Properties) SetImageOrientation(v SBoolFloat)
- func (s Properties) SetImageRendering(v String)
- func (s Properties) SetImageResolution(v Value)
- func (s Properties) SetJustifyContent(v String)
- func (s Properties) SetLang(v NamedString)
- func (s Properties) SetLeft(v Value)
- func (s Properties) SetLetterSpacing(v Value)
- func (s Properties) SetLineHeight(v Value)
- func (s Properties) SetLink(v NamedString)
- func (s Properties) SetListStyleImage(v Image)
- func (s Properties) SetListStylePosition(v String)
- func (s Properties) SetListStyleType(v CounterStyleID)
- func (s Properties) SetMarginBottom(v Value)
- func (s Properties) SetMarginBreak(v String)
- func (s Properties) SetMarginLeft(v Value)
- func (s Properties) SetMarginRight(v Value)
- func (s Properties) SetMarginTop(v Value)
- func (s Properties) SetMarks(v Marks)
- func (s Properties) SetMaxHeight(v Value)
- func (s Properties) SetMaxLines(v TaggedInt)
- func (s Properties) SetMaxWidth(v Value)
- func (s Properties) SetMinHeight(v Value)
- func (s Properties) SetMinWidth(v Value)
- func (s Properties) SetObjectFit(v String)
- func (s Properties) SetObjectPosition(v Center)
- func (s Properties) SetOpacity(v Float)
- func (s Properties) SetOrder(v Int)
- func (s Properties) SetOrphans(v Int)
- func (s Properties) SetOutlineColor(v Color)
- func (s Properties) SetOutlineStyle(v String)
- func (s Properties) SetOutlineWidth(v Value)
- func (s Properties) SetOverflow(v String)
- func (s Properties) SetOverflowWrap(v String)
- func (s Properties) SetPaddingBottom(v Value)
- func (s Properties) SetPaddingLeft(v Value)
- func (s Properties) SetPaddingRight(v Value)
- func (s Properties) SetPaddingTop(v Value)
- func (s Properties) SetPage(v Page)
- func (s Properties) SetPosition(v BoolString)
- func (s Properties) SetQuotes(v Quotes)
- func (s Properties) SetRight(v Value)
- func (s Properties) SetSize(v Point)
- func (s Properties) SetStringSet(v StringSet)
- func (s Properties) SetTabSize(v Value)
- func (s Properties) SetTableLayout(v String)
- func (s Properties) SetTextAlignAll(v String)
- func (s Properties) SetTextAlignLast(v String)
- func (s Properties) SetTextDecorationColor(v Color)
- func (s Properties) SetTextDecorationLine(v Decorations)
- func (s Properties) SetTextDecorationStyle(v String)
- func (s Properties) SetTextIndent(v Value)
- func (s Properties) SetTextOverflow(v String)
- func (s Properties) SetTextTransform(v String)
- func (s Properties) SetTop(v Value)
- func (s Properties) SetTransform(v Transforms)
- func (s Properties) SetTransformOrigin(v Point)
- func (s Properties) SetUnicodeBidi(v String)
- func (s Properties) SetVerticalAlign(v Value)
- func (s Properties) SetVisibility(v String)
- func (s Properties) SetWhiteSpace(v String)
- func (s Properties) SetWidows(v Int)
- func (s Properties) SetWidth(v Value)
- func (s Properties) SetWordBreak(v String)
- func (s Properties) SetWordSpacing(v Value)
- func (s Properties) SetZIndex(v IntString)
- func (p Properties) UpdateWith(other Properties)
- type Quote
- type Quotes
- type RadialGradient
- type RawTokens
- type Rectangle
- type Repeats
- type SBoolFloat
- type SContent
- type SContentProp
- type SContentProps
- type SContents
- type SDimensions
- type SFloatStrings
- type SIntStrings
- type SStrings
- type SetK
- type Size
- type Sizes
- type SpecifiedAttributes
- type String
- type StringSet
- type Strings
- type StyleAccessor
- type Tag
- type TaggedInt
- type TaggedString
- type TextRatioCache
- type Transforms
- type Unit
- type UrlImage
- type ValidatedProperty
- type Value
- type Values
- type VarData
Constants ¶
const ( True = Bool(true) False = Bool(false) )
const ( // AutoF indicates a value specified as "auto", which will // be resolved during layout. AutoF special = true )
Variables ¶
var ( ZeroPixels = Dimension{Unit: Px} CurrentColor = Color{Type: parser.ColorCurrentColor} // How many CSS pixels is one <unit>? // http://www.w3.org/TR/CSS21/syndata.html#length-units LengthsToPixels = map[Unit]Float{ Px: 1, Pt: 1. / 0.75, Pc: 16., In: 96., Cm: 96. / 2.54, Mm: 96. / 25.4, Q: 96. / 25.4 / 4., } // Value in pixels of font-size for <absolute-size> keywords: 12pt (16px) for // medium, and scaling factors given in CSS3 for others: // http://www.w3.org/TR/css3-fonts/#font-size-prop FontSizeKeywords = map[string]Float{ "xx-small": InitialValues.GetFontSize().Value * 3 / 5, "x-small": InitialValues.GetFontSize().Value * 3 / 4, "small": InitialValues.GetFontSize().Value * 8 / 9, "medium": InitialValues.GetFontSize().Value * 1 / 1, "large": InitialValues.GetFontSize().Value * 6 / 5, "x-large": InitialValues.GetFontSize().Value * 3 / 2, "xx-large": InitialValues.GetFontSize().Value * 2 / 1, } FontSizeKeywordsOrder = []string{"xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"} // http://www.w3.org/TR/css3-page/#size PageSizes = map[string]Point{ "a10": {Dimension{Value: 26, Unit: Mm}, Dimension{Value: 37, Unit: Mm}}, "a9": {Dimension{Value: 37, Unit: Mm}, Dimension{Value: 52, Unit: Mm}}, "a8": {Dimension{Value: 52, Unit: Mm}, Dimension{Value: 74, Unit: Mm}}, "a7": {Dimension{Value: 74, Unit: Mm}, Dimension{Value: 105, Unit: Mm}}, "a6": {Dimension{Value: 105, Unit: Mm}, Dimension{Value: 148, Unit: Mm}}, "a5": {Dimension{Value: 148, Unit: Mm}, Dimension{Value: 210, Unit: Mm}}, "a4": A4, "a3": {Dimension{Value: 297, Unit: Mm}, Dimension{Value: 420, Unit: Mm}}, "a2": {Dimension{Value: 420, Unit: Mm}, Dimension{Value: 594, Unit: Mm}}, "a1": {Dimension{Value: 594, Unit: Mm}, Dimension{Value: 841, Unit: Mm}}, "a0": {Dimension{Value: 841, Unit: Mm}, Dimension{Value: 1189, Unit: Mm}}, "b10": {Dimension{Value: 31, Unit: Mm}, Dimension{Value: 44, Unit: Mm}}, "b9": {Dimension{Value: 44, Unit: Mm}, Dimension{Value: 62, Unit: Mm}}, "b8": {Dimension{Value: 62, Unit: Mm}, Dimension{Value: 88, Unit: Mm}}, "b7": {Dimension{Value: 88, Unit: Mm}, Dimension{Value: 125, Unit: Mm}}, "b6": {Dimension{Value: 125, Unit: Mm}, Dimension{Value: 176, Unit: Mm}}, "b5": {Dimension{Value: 176, Unit: Mm}, Dimension{Value: 250, Unit: Mm}}, "b4": {Dimension{Value: 250, Unit: Mm}, Dimension{Value: 353, Unit: Mm}}, "b3": {Dimension{Value: 353, Unit: Mm}, Dimension{Value: 500, Unit: Mm}}, "b2": {Dimension{Value: 500, Unit: Mm}, Dimension{Value: 707, Unit: Mm}}, "b1": {Dimension{Value: 707, Unit: Mm}, Dimension{Value: 1000, Unit: Mm}}, "b0": {Dimension{Value: 1000, Unit: Mm}, Dimension{Value: 1414, Unit: Mm}}, "c10": {Dimension{Value: 28, Unit: Mm}, Dimension{Value: 40, Unit: Mm}}, "c9": {Dimension{Value: 40, Unit: Mm}, Dimension{Value: 57, Unit: Mm}}, "c8": {Dimension{Value: 57, Unit: Mm}, Dimension{Value: 81, Unit: Mm}}, "c7": {Dimension{Value: 81, Unit: Mm}, Dimension{Value: 114, Unit: Mm}}, "c6": {Dimension{Value: 114, Unit: Mm}, Dimension{Value: 162, Unit: Mm}}, "c5": {Dimension{Value: 162, Unit: Mm}, Dimension{Value: 229, Unit: Mm}}, "c4": {Dimension{Value: 229, Unit: Mm}, Dimension{Value: 324, Unit: Mm}}, "c3": {Dimension{Value: 324, Unit: Mm}, Dimension{Value: 458, Unit: Mm}}, "c2": {Dimension{Value: 458, Unit: Mm}, Dimension{Value: 648, Unit: Mm}}, "c1": {Dimension{Value: 648, Unit: Mm}, Dimension{Value: 917, Unit: Mm}}, "c0": {Dimension{Value: 917, Unit: Mm}, Dimension{Value: 1297, Unit: Mm}}, "jis-b10": {Dimension{Value: 32, Unit: Mm}, Dimension{Value: 45, Unit: Mm}}, "jis-b9": {Dimension{Value: 45, Unit: Mm}, Dimension{Value: 64, Unit: Mm}}, "jis-b8": {Dimension{Value: 64, Unit: Mm}, Dimension{Value: 91, Unit: Mm}}, "jis-b7": {Dimension{Value: 91, Unit: Mm}, Dimension{Value: 128, Unit: Mm}}, "jis-b6": {Dimension{Value: 128, Unit: Mm}, Dimension{Value: 182, Unit: Mm}}, "jis-b5": {Dimension{Value: 182, Unit: Mm}, Dimension{Value: 257, Unit: Mm}}, "jis-b4": {Dimension{Value: 257, Unit: Mm}, Dimension{Value: 364, Unit: Mm}}, "jis-b3": {Dimension{Value: 364, Unit: Mm}, Dimension{Value: 515, Unit: Mm}}, "jis-b2": {Dimension{Value: 515, Unit: Mm}, Dimension{Value: 728, Unit: Mm}}, "jis-b1": {Dimension{Value: 728, Unit: Mm}, Dimension{Value: 1030, Unit: Mm}}, "jis-b0": {Dimension{Value: 1030, Unit: Mm}, Dimension{Value: 1456, Unit: Mm}}, "letter": {Dimension{Value: 8.5, Unit: In}, Dimension{Value: 11, Unit: In}}, "legal": {Dimension{Value: 8.5, Unit: In}, Dimension{Value: 14, Unit: In}}, "ledger": {Dimension{Value: 11, Unit: In}, Dimension{Value: 17, Unit: In}}, } A4 = Point{Dimension{Value: 210, Unit: Mm}, Dimension{Value: 297, Unit: Mm}} KnownProperties = NewSetK() // Do not list shorthand properties here as we handle them before inheritance. // // Values inherited but not applicable to print are not included. // // text_decoration is not a really inherited, see // http://www.w3.org/TR/CSS2/text.html#propdef-text-decoration // // link: click events normally bubble up to link ancestors // See http://lists.w3.org/Archives/Public/www-style/2012Jun/0315.html Inherited = NewSetK( PBorderCollapse, PBorderSpacing, PCaptionSide, PColor, PDirection, PEmptyCells, PFontFamily, PFontFeatureSettings, PFontKerning, PFontLanguageOverride, PFontSize, PFontStyle, PFontStretch, PFontVariant, PFontVariantAlternates, PFontVariantCaps, PFontVariantEastAsian, PFontVariantLigatures, PFontVariantNumeric, PFontVariantPosition, PFontVariationSettings, PFontWeight, PHyphens, PHyphenateCharacter, PHyphenateLimitChars, PHyphenateLimitZone, PImageRendering, PImageResolution, PLang, PLetterSpacing, PLineHeight, PLink, PListStyleImage, PListStylePosition, PListStyleType, POrphans, POverflowWrap, PQuotes, PTabSize, PTextAlignAll, PTextAlignLast, PTextIndent, PTextTransform, PVisibility, PWhiteSpace, PWidows, PWordSpacing, PWordBreak, ) // Not applicable to the print media NotPrintMedia = utils.NewSet( "azimuth", "cue", "cue-after", "cue-before", "elevation", "pause", "pause-after", "pause-before", "pitch-range", "pitch", "play-during", "richness", "speak-header", "speak-numeral", "speak-punctuation", "speak", "speech-rate", "stress", "voice-family", "volume", "cursor", "animation", "animation-delay", "animation-direction", "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", ) // http://www.w3.org/TR/CSS21/tables.html#model // See also http://lists.w3.org/Archives/Public/www-style/2012Jun/0066.html // Only non-inherited properties need to be included here. TableWrapperBoxProperties = NewSetK( PBottom, PBreakAfter, PBreakBefore, PBreakInside, PClear, PCounterIncrement, PCounterReset, PCounterSet, PFloat, PLeft, PMarginTop, PMarginBottom, PMarginLeft, PMarginRight, POpacity, POverflow, PPosition, PRight, PTop, PTransform, PTransformOrigin, PVerticalAlign, PZIndex, ) InitialNotComputed = NewSetK( PDisplay, PColumnGap, PBleedTop, PBleedLeft, PBleedBottom, PBleedRight, POutlineWidth, POutlineColor, PColumnRuleWidth, PColumnRuleColor, PBorderTopWidth, PBorderLeftWidth, PBorderBottomWidth, PBorderRightWidth, PBorderTopColor, PBorderLeftColor, PBorderBottomColor, PBorderRightColor, ) )
var Inf = Float(math.Inf(+1))
var InitialValues = Properties{}/* 159 elements not displayed */
InitialValues stores the default values for the CSS properties.
var PropsFromNames = map[string]KnownProp{}/* 159 elements not displayed */
PropsFromNames maps CSS property names to internal enum tags.
Functions ¶
Types ¶
type AttrData ¶
type AttrData struct { Fallback CssProperty Name string TypeOrUnit string }
type BoolString ¶
func (BoolString) IsNone ¶
func (v BoolString) IsNone() bool
type CascadedProperty ¶
type CascadedProperty struct { Default DefaultKind // contains filtered or unexported fields }
CascadedProperty is the second form of a CSS input : var() calls have been resolved and the remaining raw properties have been checked. It is thus either a plain CSS property, or a default value.
func AsCascaded ¶
func AsCascaded(prop CssProperty) CascadedProperty
func (CascadedProperty) AsValidated ¶
func (c CascadedProperty) AsValidated() ValidatedProperty
AsValidated wraps the property into a ValidatedProperty
func (CascadedProperty) IsNone ¶
func (v CascadedProperty) IsNone() bool
func (CascadedProperty) ToCSS ¶
func (c CascadedProperty) ToCSS() CssProperty
ToCSS will panic if c.Default is not 0.
type Centers ¶
type Centers []Center
func (Centers) Repeat ¶
func (bs Centers) Repeat(n int) CssProperty
type ColorsStops ¶
type ColorsStops []ColorStop
type ContentProperties ¶
type ContentProperties []ContentProperty
type ContentProperty ¶
type ContentProperty struct { // SStrings for type STRING, attr or string, counter, counters // Quote for type QUOTE // Url for URI // String for leader() Content InnerContent Type string }
func (ContentProperty) AsCounter ¶
func (c ContentProperty) AsCounter() (counterName string, counterStyle CounterStyleID)
func (ContentProperty) AsCounters ¶
func (c ContentProperty) AsCounters() (counterName, separator string, counterStyle CounterStyleID)
func (ContentProperty) AsLeader ¶
func (c ContentProperty) AsLeader() string
func (ContentProperty) AsQuote ¶
func (c ContentProperty) AsQuote() Quote
func (ContentProperty) AsString ¶
func (c ContentProperty) AsString() (value string)
func (ContentProperty) AsStrings ¶
func (c ContentProperty) AsStrings() []string
func (ContentProperty) AsTargetCounter ¶
func (c ContentProperty) AsTargetCounter() (anchorToken ContentProperty, counterName, counterStyle string)
func (ContentProperty) AsTargetCounters ¶
func (c ContentProperty) AsTargetCounters() (anchorToken ContentProperty, counterName string, separator ContentProperty, counterStyle string)
func (ContentProperty) AsTargetText ¶
func (c ContentProperty) AsTargetText() (anchorToken ContentProperty, textStyle string)
func (ContentProperty) IsNone ¶
func (v ContentProperty) IsNone() bool
type CounterStyleID ¶
type CounterStyleID struct { Type string // one of symbols(), string, or empty for an identifier Name string Symbols Strings }
func (CounterStyleID) IsNone ¶
func (v CounterStyleID) IsNone() bool
type Counters ¶
type Counters struct { Name string Separator string // optional, only valid for counters() Style CounterStyleID }
Counters store a counter() or counters() attribute
type CssProperty ¶
type CssProperty interface {
// contains filtered or unexported methods
}
type Decorations ¶
func (Decorations) IsNone ¶
func (v Decorations) IsNone() bool
func (Decorations) Union ¶ added in v0.0.3
func (dec Decorations) Union(other Decorations) Decorations
Union return the union of [s] and [other]
type DefaultKind ¶
type DefaultKind uint8
const ( Inherit DefaultKind = iota + 1 Initial )
func (DefaultKind) AsCascaded ¶
func (d DefaultKind) AsCascaded() CascadedProperty
AsCascaded wraps the default to a CascadedProperty
type Dimensions ¶
type Dimensions []Dimension
type DirectionType ¶
func (DirectionType) IsNone ¶
func (v DirectionType) IsNone() bool
type ElementStyle ¶
type ElementStyle interface { StyleAccessor // Set is the generic method to set an arbitrary property. // Type accessors should be used when possible. Set(key PropKey, value CssProperty) // Get is the generic method to access an arbitrary property. // Type accessors should be used when possible. Get(key PropKey) CssProperty // Copy returns a deep copy of the style. Copy() ElementStyle ParentStyle() ElementStyle Variables() map[string]ValidatedProperty Specified() SpecifiedAttributes Cache() TextRatioCache }
ElementStyle defines a common interface to access style properties. Implementations will typically compute the property on the fly and cache the result.
type Float ¶
type Float Fl
func MaybeFloatToFloat ¶ added in v0.0.2
func MaybeFloatToFloat(mf MaybeFloat) Float
MaybeFloatToFloat is the same as MaybeFloat.V(), but handles nil values
type FloatString ¶ added in v0.0.3
type GradientSize ¶
func (GradientSize) IsExplicit ¶
func (s GradientSize) IsExplicit() bool
func (GradientSize) IsNone ¶
func (v GradientSize) IsNone() bool
type Image ¶
type Image interface { // InnerContent CssProperty // contains filtered or unexported methods }
Might be an existing image or a gradient
type InnerContent ¶
type InnerContent interface {
// contains filtered or unexported methods
}
guard for possible content properties
type IntNamedString ¶
type IntNamedString struct { NamedString Int int }
func (IntNamedString) IsNone ¶
func (v IntNamedString) IsNone() bool
type IntStrings ¶
type IntStrings []IntString
type KnownProp ¶ added in v0.0.5
type KnownProp uint8
KnownProp efficiently encode a known CSS property
const ( // the following properties are grouped by side, // in the [bottom, left, right, top] order, // so that, if side in an index (0, 1, 2 or 3), // the property is a PBorderBottomColor + side * 5 // DO NOT CHANGE the order, because PBorderBottomColor KnownProp PBorderBottomStyle PBorderBottomWidth PMarginBottom PPaddingBottom PBorderLeftColor PBorderLeftStyle PBorderLeftWidth PMarginLeft PPaddingLeft PBorderRightColor PBorderRightStyle PBorderRightWidth PMarginRight PPaddingRight PBorderTopColor PBorderTopStyle PBorderTopWidth PMarginTop PPaddingTop // min-XXX is at +2, max-XXX is a + 4 PWidth PHeight PMinWidth PMinHeight PMaxWidth PMaxHeight PColor PDirection PDisplay PFloat PLineHeight PPosition PTableLayout PTop PUnicodeBidi PVerticalAlign PVisibility PZIndex PBorderBottomLeftRadius PBorderBottomRightRadius PBorderTopLeftRadius PBorderTopRightRadius POpacity PColumnRuleStyle PColumnRuleWidth PColumnCount PColumnWidth PFontFamily PFontFeatureSettings PFontKerning PFontLanguageOverride PFontSize PFontStretch PFontStyle PFontVariantAlternates PFontVariantCaps PFontVariantEastAsian PFontVariantLigatures PFontVariantNumeric PFontVariantPosition PFontWeight PFontVariationSettings PHyphenateCharacter PHyphenateLimitChars PHyphens PLetterSpacing PTextAlignAll PTextAlignLast PTextIndent PTextTransform PWhiteSpace PWordBreak PWordSpacing PTransform PContinue PMaxLines POverflow POverflowWrap PCounterIncrement PCounterReset PCounterSet PAnchor PLink PLang PBoxDecorationBreak PBookmarkLabel PBookmarkLevel PBookmarkState PContent PStringSet PImageOrientation PPage PAppearance POutlineColor POutlineStyle POutlineWidth PBoxSizing // The following properties are all background related, // in the order expected by expandBackground PBackgroundColor PBackgroundImage PBackgroundRepeat PBackgroundAttachment PBackgroundPosition PBackgroundSize PBackgroundClip PBackgroundOrigin // text-decoration-XXX PTextDecorationLine PTextDecorationColor PTextDecorationStyle PBreakAfter PBreakBefore PBreakInside PAlignContent PAlignItems PAlignSelf PFlexBasis PFlexDirection PFlexGrow PFlexShrink PFlexWrap PJustifyContent POrder PBottom PCaptionSide PClear PClip PEmptyCells PLeft PRight PListStyleImage PListStylePosition PListStyleType PTextOverflow PBlockEllipsis PBorderCollapse PBorderSpacing PTransformOrigin PFontVariant PTabSize PMarginBreak POrphans PWidows PFootnoteDisplay PFootnotePolicy PQuotes PImageResolution PImageRendering PColumnGap PColumnFill PColumnSpan PColumnRuleColor PSize PBleedLeft PBleedRight PBleedTop PBleedBottom PMarks PObjectFit PObjectPosition PHyphenateLimitZone NbProperties )
func (KnownProp) IsTextDecoration ¶ added in v0.0.5
type LinearGradient ¶
type LinearGradient struct { ColorStops ColorsStops Direction DirectionType Repeating bool }
func (LinearGradient) IsNone ¶
func (v LinearGradient) IsNone() bool
type MaybeBool ¶
type MaybeBool interface {
// contains filtered or unexported methods
}
MaybeBool stores a tree state boolean : true, false or nil
type MaybeFloat ¶
type MaybeFloat interface {
V() Float
}
func ResoudPercentage ¶
func ResoudPercentage(value Value, referTo Float) MaybeFloat
Return the percentage of the reference value, or the value unchanged. “referTo“ is the length for 100%. If “referTo“ is not a number, it just replaces percentages.
type NamedProperties ¶
type NamedProperties []NamedProperty
type NamedProperty ¶
type NamedProperty struct { Name PropKey Property ValidatedProperty }
func (NamedProperty) IsNone ¶
func (v NamedProperty) IsNone() bool
type NamedString ¶
func (NamedString) IsNone ¶
func (v NamedString) IsNone() bool
type OptionalRanges ¶
OptionalRanges is either 'auto' or a slice of ranges.
func (OptionalRanges) IsNone ¶
func (v OptionalRanges) IsNone() bool
type Properties ¶
type Properties map[KnownProp]CssProperty
Properties is the general container for validated, cascaded and computed properties. In addition to the generic acces, an attempt to provide a "type safe" way is provided through the GetXXX and SetXXX methods. It relies on the convention than all the keys should be present, and values never be nil. "None" values are then encoded by the zero value of the concrete type.
func (Properties) GetAlignContent ¶
func (s Properties) GetAlignContent() String
func (Properties) GetAlignItems ¶
func (s Properties) GetAlignItems() String
func (Properties) GetAlignSelf ¶
func (s Properties) GetAlignSelf() String
func (Properties) GetAnchor ¶
func (s Properties) GetAnchor() String
func (Properties) GetAppearance ¶ added in v0.0.3
func (s Properties) GetAppearance() String
func (Properties) GetBackgroundAttachment ¶
func (s Properties) GetBackgroundAttachment() Strings
func (Properties) GetBackgroundClip ¶
func (s Properties) GetBackgroundClip() Strings
func (Properties) GetBackgroundColor ¶
func (s Properties) GetBackgroundColor() Color
func (Properties) GetBackgroundImage ¶
func (s Properties) GetBackgroundImage() Images
func (Properties) GetBackgroundOrigin ¶
func (s Properties) GetBackgroundOrigin() Strings
func (Properties) GetBackgroundPosition ¶
func (s Properties) GetBackgroundPosition() Centers
func (Properties) GetBackgroundRepeat ¶
func (s Properties) GetBackgroundRepeat() Repeats
func (Properties) GetBackgroundSize ¶
func (s Properties) GetBackgroundSize() Sizes
func (Properties) GetBleedBottom ¶
func (s Properties) GetBleedBottom() Value
func (Properties) GetBleedLeft ¶
func (s Properties) GetBleedLeft() Value
func (Properties) GetBleedRight ¶
func (s Properties) GetBleedRight() Value
func (Properties) GetBleedTop ¶
func (s Properties) GetBleedTop() Value
func (Properties) GetBlockEllipsis ¶
func (s Properties) GetBlockEllipsis() TaggedString
func (Properties) GetBookmarkLabel ¶
func (s Properties) GetBookmarkLabel() ContentProperties
func (Properties) GetBookmarkLevel ¶
func (s Properties) GetBookmarkLevel() IntString
func (Properties) GetBookmarkState ¶
func (s Properties) GetBookmarkState() String
func (Properties) GetBorderBottomColor ¶
func (s Properties) GetBorderBottomColor() Color
func (Properties) GetBorderBottomLeftRadius ¶
func (s Properties) GetBorderBottomLeftRadius() Point
func (Properties) GetBorderBottomRightRadius ¶
func (s Properties) GetBorderBottomRightRadius() Point
func (Properties) GetBorderBottomStyle ¶
func (s Properties) GetBorderBottomStyle() String
func (Properties) GetBorderBottomWidth ¶
func (s Properties) GetBorderBottomWidth() Value
func (Properties) GetBorderCollapse ¶
func (s Properties) GetBorderCollapse() String
func (Properties) GetBorderLeftColor ¶
func (s Properties) GetBorderLeftColor() Color
func (Properties) GetBorderLeftStyle ¶
func (s Properties) GetBorderLeftStyle() String
func (Properties) GetBorderLeftWidth ¶
func (s Properties) GetBorderLeftWidth() Value
func (Properties) GetBorderRightColor ¶
func (s Properties) GetBorderRightColor() Color
func (Properties) GetBorderRightStyle ¶
func (s Properties) GetBorderRightStyle() String
func (Properties) GetBorderRightWidth ¶
func (s Properties) GetBorderRightWidth() Value
func (Properties) GetBorderSpacing ¶
func (s Properties) GetBorderSpacing() Point
func (Properties) GetBorderTopColor ¶
func (s Properties) GetBorderTopColor() Color
func (Properties) GetBorderTopLeftRadius ¶
func (s Properties) GetBorderTopLeftRadius() Point
func (Properties) GetBorderTopRightRadius ¶
func (s Properties) GetBorderTopRightRadius() Point
func (Properties) GetBorderTopStyle ¶
func (s Properties) GetBorderTopStyle() String
func (Properties) GetBorderTopWidth ¶
func (s Properties) GetBorderTopWidth() Value
func (Properties) GetBottom ¶
func (s Properties) GetBottom() Value
func (Properties) GetBoxDecorationBreak ¶
func (s Properties) GetBoxDecorationBreak() String
func (Properties) GetBoxSizing ¶
func (s Properties) GetBoxSizing() String
func (Properties) GetBreakAfter ¶
func (s Properties) GetBreakAfter() String
func (Properties) GetBreakBefore ¶
func (s Properties) GetBreakBefore() String
func (Properties) GetBreakInside ¶
func (s Properties) GetBreakInside() String
func (Properties) GetCaptionSide ¶
func (s Properties) GetCaptionSide() String
func (Properties) GetClear ¶
func (s Properties) GetClear() String
func (Properties) GetClip ¶
func (s Properties) GetClip() Values
func (Properties) GetColor ¶
func (s Properties) GetColor() Color
func (Properties) GetColumnCount ¶
func (s Properties) GetColumnCount() IntString
func (Properties) GetColumnFill ¶
func (s Properties) GetColumnFill() String
func (Properties) GetColumnGap ¶
func (s Properties) GetColumnGap() Value
func (Properties) GetColumnRuleColor ¶
func (s Properties) GetColumnRuleColor() Color
func (Properties) GetColumnRuleStyle ¶
func (s Properties) GetColumnRuleStyle() String
func (Properties) GetColumnRuleWidth ¶
func (s Properties) GetColumnRuleWidth() Value
func (Properties) GetColumnSpan ¶
func (s Properties) GetColumnSpan() String
func (Properties) GetColumnWidth ¶
func (s Properties) GetColumnWidth() Value
func (Properties) GetContent ¶
func (s Properties) GetContent() SContent
func (Properties) GetContinue ¶
func (s Properties) GetContinue() String
func (Properties) GetCounterIncrement ¶
func (s Properties) GetCounterIncrement() SIntStrings
func (Properties) GetCounterReset ¶
func (s Properties) GetCounterReset() SIntStrings
func (Properties) GetCounterSet ¶
func (s Properties) GetCounterSet() SIntStrings
func (Properties) GetDirection ¶
func (s Properties) GetDirection() String
func (Properties) GetDisplay ¶
func (s Properties) GetDisplay() Display
func (Properties) GetEmptyCells ¶
func (s Properties) GetEmptyCells() String
func (Properties) GetFlexBasis ¶
func (s Properties) GetFlexBasis() Value
func (Properties) GetFlexDirection ¶
func (s Properties) GetFlexDirection() String
func (Properties) GetFlexGrow ¶
func (s Properties) GetFlexGrow() Float
func (Properties) GetFlexShrink ¶
func (s Properties) GetFlexShrink() Float
func (Properties) GetFlexWrap ¶
func (s Properties) GetFlexWrap() String
func (Properties) GetFloat ¶
func (s Properties) GetFloat() String
func (Properties) GetFontFamily ¶
func (s Properties) GetFontFamily() Strings
func (Properties) GetFontFeatureSettings ¶
func (s Properties) GetFontFeatureSettings() SIntStrings
func (Properties) GetFontKerning ¶
func (s Properties) GetFontKerning() String
func (Properties) GetFontLanguageOverride ¶
func (s Properties) GetFontLanguageOverride() String
func (Properties) GetFontSize ¶
func (s Properties) GetFontSize() Value
func (Properties) GetFontStretch ¶
func (s Properties) GetFontStretch() String
func (Properties) GetFontStyle ¶
func (s Properties) GetFontStyle() String
func (Properties) GetFontVariant ¶
func (s Properties) GetFontVariant() String
func (Properties) GetFontVariantAlternates ¶
func (s Properties) GetFontVariantAlternates() String
func (Properties) GetFontVariantCaps ¶
func (s Properties) GetFontVariantCaps() String
func (Properties) GetFontVariantEastAsian ¶
func (s Properties) GetFontVariantEastAsian() SStrings
func (Properties) GetFontVariantLigatures ¶
func (s Properties) GetFontVariantLigatures() SStrings
func (Properties) GetFontVariantNumeric ¶
func (s Properties) GetFontVariantNumeric() SStrings
func (Properties) GetFontVariantPosition ¶
func (s Properties) GetFontVariantPosition() String
func (Properties) GetFontVariationSettings ¶ added in v0.0.3
func (s Properties) GetFontVariationSettings() SFloatStrings
func (Properties) GetFontWeight ¶
func (s Properties) GetFontWeight() IntString
func (Properties) GetFootnoteDisplay ¶ added in v0.0.2
func (s Properties) GetFootnoteDisplay() String
func (Properties) GetFootnotePolicy ¶ added in v0.0.2
func (s Properties) GetFootnotePolicy() String
func (Properties) GetHeight ¶
func (s Properties) GetHeight() Value
func (Properties) GetHyphenateCharacter ¶
func (s Properties) GetHyphenateCharacter() String
func (Properties) GetHyphenateLimitChars ¶
func (s Properties) GetHyphenateLimitChars() Ints3
func (Properties) GetHyphenateLimitZone ¶
func (s Properties) GetHyphenateLimitZone() Value
func (Properties) GetHyphens ¶
func (s Properties) GetHyphens() String
func (Properties) GetImageOrientation ¶ added in v0.0.3
func (s Properties) GetImageOrientation() SBoolFloat
func (Properties) GetImageRendering ¶
func (s Properties) GetImageRendering() String
func (Properties) GetImageResolution ¶
func (s Properties) GetImageResolution() Value
func (Properties) GetJustifyContent ¶
func (s Properties) GetJustifyContent() String
func (Properties) GetLang ¶
func (s Properties) GetLang() NamedString
func (Properties) GetLeft ¶
func (s Properties) GetLeft() Value
func (Properties) GetLetterSpacing ¶
func (s Properties) GetLetterSpacing() Value
func (Properties) GetLineHeight ¶
func (s Properties) GetLineHeight() Value
func (Properties) GetLink ¶
func (s Properties) GetLink() NamedString
func (Properties) GetListStyleImage ¶
func (s Properties) GetListStyleImage() Image
func (Properties) GetListStylePosition ¶
func (s Properties) GetListStylePosition() String
func (Properties) GetListStyleType ¶
func (s Properties) GetListStyleType() CounterStyleID
func (Properties) GetMarginBottom ¶
func (s Properties) GetMarginBottom() Value
func (Properties) GetMarginBreak ¶
func (s Properties) GetMarginBreak() String
func (Properties) GetMarginLeft ¶
func (s Properties) GetMarginLeft() Value
func (Properties) GetMarginRight ¶
func (s Properties) GetMarginRight() Value
func (Properties) GetMarginTop ¶
func (s Properties) GetMarginTop() Value
func (Properties) GetMarks ¶
func (s Properties) GetMarks() Marks
func (Properties) GetMaxHeight ¶
func (s Properties) GetMaxHeight() Value
func (Properties) GetMaxLines ¶
func (s Properties) GetMaxLines() TaggedInt
func (Properties) GetMaxWidth ¶
func (s Properties) GetMaxWidth() Value
func (Properties) GetMinHeight ¶
func (s Properties) GetMinHeight() Value
func (Properties) GetMinWidth ¶
func (s Properties) GetMinWidth() Value
func (Properties) GetObjectFit ¶
func (s Properties) GetObjectFit() String
func (Properties) GetObjectPosition ¶
func (s Properties) GetObjectPosition() Center
func (Properties) GetOpacity ¶
func (s Properties) GetOpacity() Float
func (Properties) GetOrder ¶
func (s Properties) GetOrder() Int
func (Properties) GetOrphans ¶
func (s Properties) GetOrphans() Int
func (Properties) GetOutlineColor ¶
func (s Properties) GetOutlineColor() Color
func (Properties) GetOutlineStyle ¶
func (s Properties) GetOutlineStyle() String
func (Properties) GetOutlineWidth ¶
func (s Properties) GetOutlineWidth() Value
func (Properties) GetOverflow ¶
func (s Properties) GetOverflow() String
func (Properties) GetOverflowWrap ¶
func (s Properties) GetOverflowWrap() String
func (Properties) GetPaddingBottom ¶
func (s Properties) GetPaddingBottom() Value
func (Properties) GetPaddingLeft ¶
func (s Properties) GetPaddingLeft() Value
func (Properties) GetPaddingRight ¶
func (s Properties) GetPaddingRight() Value
func (Properties) GetPaddingTop ¶
func (s Properties) GetPaddingTop() Value
func (Properties) GetPage ¶
func (s Properties) GetPage() Page
func (Properties) GetPosition ¶
func (s Properties) GetPosition() BoolString
func (Properties) GetQuotes ¶
func (s Properties) GetQuotes() Quotes
func (Properties) GetRight ¶
func (s Properties) GetRight() Value
func (Properties) GetSize ¶
func (s Properties) GetSize() Point
func (Properties) GetStringSet ¶
func (s Properties) GetStringSet() StringSet
func (Properties) GetTabSize ¶
func (s Properties) GetTabSize() Value
func (Properties) GetTableLayout ¶
func (s Properties) GetTableLayout() String
func (Properties) GetTextAlignAll ¶
func (s Properties) GetTextAlignAll() String
func (Properties) GetTextAlignLast ¶
func (s Properties) GetTextAlignLast() String
func (Properties) GetTextDecorationColor ¶
func (s Properties) GetTextDecorationColor() Color
func (Properties) GetTextDecorationLine ¶
func (s Properties) GetTextDecorationLine() Decorations
func (Properties) GetTextDecorationStyle ¶
func (s Properties) GetTextDecorationStyle() String
func (Properties) GetTextIndent ¶
func (s Properties) GetTextIndent() Value
func (Properties) GetTextOverflow ¶
func (s Properties) GetTextOverflow() String
func (Properties) GetTextTransform ¶
func (s Properties) GetTextTransform() String
func (Properties) GetTop ¶
func (s Properties) GetTop() Value
func (Properties) GetTransform ¶
func (s Properties) GetTransform() Transforms
func (Properties) GetTransformOrigin ¶
func (s Properties) GetTransformOrigin() Point
func (Properties) GetUnicodeBidi ¶
func (s Properties) GetUnicodeBidi() String
func (Properties) GetVerticalAlign ¶
func (s Properties) GetVerticalAlign() Value
func (Properties) GetVisibility ¶
func (s Properties) GetVisibility() String
func (Properties) GetWhiteSpace ¶
func (s Properties) GetWhiteSpace() String
func (Properties) GetWidows ¶
func (s Properties) GetWidows() Int
func (Properties) GetWidth ¶
func (s Properties) GetWidth() Value
func (Properties) GetWordBreak ¶ added in v0.0.2
func (s Properties) GetWordBreak() String
func (Properties) GetWordSpacing ¶
func (s Properties) GetWordSpacing() Value
func (Properties) GetZIndex ¶
func (s Properties) GetZIndex() IntString
func (Properties) SetAlignContent ¶
func (s Properties) SetAlignContent(v String)
func (Properties) SetAlignItems ¶
func (s Properties) SetAlignItems(v String)
func (Properties) SetAlignSelf ¶
func (s Properties) SetAlignSelf(v String)
func (Properties) SetAnchor ¶
func (s Properties) SetAnchor(v String)
func (Properties) SetAppearance ¶ added in v0.0.3
func (s Properties) SetAppearance(v String)
func (Properties) SetBackgroundAttachment ¶
func (s Properties) SetBackgroundAttachment(v Strings)
func (Properties) SetBackgroundClip ¶
func (s Properties) SetBackgroundClip(v Strings)
func (Properties) SetBackgroundColor ¶
func (s Properties) SetBackgroundColor(v Color)
func (Properties) SetBackgroundImage ¶
func (s Properties) SetBackgroundImage(v Images)
func (Properties) SetBackgroundOrigin ¶
func (s Properties) SetBackgroundOrigin(v Strings)
func (Properties) SetBackgroundPosition ¶
func (s Properties) SetBackgroundPosition(v Centers)
func (Properties) SetBackgroundRepeat ¶
func (s Properties) SetBackgroundRepeat(v Repeats)
func (Properties) SetBackgroundSize ¶
func (s Properties) SetBackgroundSize(v Sizes)
func (Properties) SetBleedBottom ¶
func (s Properties) SetBleedBottom(v Value)
func (Properties) SetBleedLeft ¶
func (s Properties) SetBleedLeft(v Value)
func (Properties) SetBleedRight ¶
func (s Properties) SetBleedRight(v Value)
func (Properties) SetBleedTop ¶
func (s Properties) SetBleedTop(v Value)
func (Properties) SetBlockEllipsis ¶
func (s Properties) SetBlockEllipsis(v TaggedString)
func (Properties) SetBookmarkLabel ¶
func (s Properties) SetBookmarkLabel(v ContentProperties)
func (Properties) SetBookmarkLevel ¶
func (s Properties) SetBookmarkLevel(v IntString)
func (Properties) SetBookmarkState ¶
func (s Properties) SetBookmarkState(v String)
func (Properties) SetBorderBottomColor ¶
func (s Properties) SetBorderBottomColor(v Color)
func (Properties) SetBorderBottomLeftRadius ¶
func (s Properties) SetBorderBottomLeftRadius(v Point)
func (Properties) SetBorderBottomRightRadius ¶
func (s Properties) SetBorderBottomRightRadius(v Point)
func (Properties) SetBorderBottomStyle ¶
func (s Properties) SetBorderBottomStyle(v String)
func (Properties) SetBorderBottomWidth ¶
func (s Properties) SetBorderBottomWidth(v Value)
func (Properties) SetBorderCollapse ¶
func (s Properties) SetBorderCollapse(v String)
func (Properties) SetBorderLeftColor ¶
func (s Properties) SetBorderLeftColor(v Color)
func (Properties) SetBorderLeftStyle ¶
func (s Properties) SetBorderLeftStyle(v String)
func (Properties) SetBorderLeftWidth ¶
func (s Properties) SetBorderLeftWidth(v Value)
func (Properties) SetBorderRightColor ¶
func (s Properties) SetBorderRightColor(v Color)
func (Properties) SetBorderRightStyle ¶
func (s Properties) SetBorderRightStyle(v String)
func (Properties) SetBorderRightWidth ¶
func (s Properties) SetBorderRightWidth(v Value)
func (Properties) SetBorderSpacing ¶
func (s Properties) SetBorderSpacing(v Point)
func (Properties) SetBorderTopColor ¶
func (s Properties) SetBorderTopColor(v Color)
func (Properties) SetBorderTopLeftRadius ¶
func (s Properties) SetBorderTopLeftRadius(v Point)
func (Properties) SetBorderTopRightRadius ¶
func (s Properties) SetBorderTopRightRadius(v Point)
func (Properties) SetBorderTopStyle ¶
func (s Properties) SetBorderTopStyle(v String)
func (Properties) SetBorderTopWidth ¶
func (s Properties) SetBorderTopWidth(v Value)
func (Properties) SetBottom ¶
func (s Properties) SetBottom(v Value)
func (Properties) SetBoxDecorationBreak ¶
func (s Properties) SetBoxDecorationBreak(v String)
func (Properties) SetBoxSizing ¶
func (s Properties) SetBoxSizing(v String)
func (Properties) SetBreakAfter ¶
func (s Properties) SetBreakAfter(v String)
func (Properties) SetBreakBefore ¶
func (s Properties) SetBreakBefore(v String)
func (Properties) SetBreakInside ¶
func (s Properties) SetBreakInside(v String)
func (Properties) SetCaptionSide ¶
func (s Properties) SetCaptionSide(v String)
func (Properties) SetClear ¶
func (s Properties) SetClear(v String)
func (Properties) SetClip ¶
func (s Properties) SetClip(v Values)
func (Properties) SetColor ¶
func (s Properties) SetColor(v Color)
func (Properties) SetColumnCount ¶
func (s Properties) SetColumnCount(v IntString)
func (Properties) SetColumnFill ¶
func (s Properties) SetColumnFill(v String)
func (Properties) SetColumnGap ¶
func (s Properties) SetColumnGap(v Value)
func (Properties) SetColumnRuleColor ¶
func (s Properties) SetColumnRuleColor(v Color)
func (Properties) SetColumnRuleStyle ¶
func (s Properties) SetColumnRuleStyle(v String)
func (Properties) SetColumnRuleWidth ¶
func (s Properties) SetColumnRuleWidth(v Value)
func (Properties) SetColumnSpan ¶
func (s Properties) SetColumnSpan(v String)
func (Properties) SetColumnWidth ¶
func (s Properties) SetColumnWidth(v Value)
func (Properties) SetContent ¶
func (s Properties) SetContent(v SContent)
func (Properties) SetContinue ¶
func (s Properties) SetContinue(v String)
func (Properties) SetCounterIncrement ¶
func (s Properties) SetCounterIncrement(v SIntStrings)
func (Properties) SetCounterReset ¶
func (s Properties) SetCounterReset(v SIntStrings)
func (Properties) SetCounterSet ¶
func (s Properties) SetCounterSet(v SIntStrings)
func (Properties) SetDirection ¶
func (s Properties) SetDirection(v String)
func (Properties) SetDisplay ¶
func (s Properties) SetDisplay(v Display)
func (Properties) SetEmptyCells ¶
func (s Properties) SetEmptyCells(v String)
func (Properties) SetFlexBasis ¶
func (s Properties) SetFlexBasis(v Value)
func (Properties) SetFlexDirection ¶
func (s Properties) SetFlexDirection(v String)
func (Properties) SetFlexGrow ¶
func (s Properties) SetFlexGrow(v Float)
func (Properties) SetFlexShrink ¶
func (s Properties) SetFlexShrink(v Float)
func (Properties) SetFlexWrap ¶
func (s Properties) SetFlexWrap(v String)
func (Properties) SetFloat ¶
func (s Properties) SetFloat(v String)
func (Properties) SetFontFamily ¶
func (s Properties) SetFontFamily(v Strings)
func (Properties) SetFontFeatureSettings ¶
func (s Properties) SetFontFeatureSettings(v SIntStrings)
func (Properties) SetFontKerning ¶
func (s Properties) SetFontKerning(v String)
func (Properties) SetFontLanguageOverride ¶
func (s Properties) SetFontLanguageOverride(v String)
func (Properties) SetFontSize ¶
func (s Properties) SetFontSize(v Value)
func (Properties) SetFontStretch ¶
func (s Properties) SetFontStretch(v String)
func (Properties) SetFontStyle ¶
func (s Properties) SetFontStyle(v String)
func (Properties) SetFontVariant ¶
func (s Properties) SetFontVariant(v String)
func (Properties) SetFontVariantAlternates ¶
func (s Properties) SetFontVariantAlternates(v String)
func (Properties) SetFontVariantCaps ¶
func (s Properties) SetFontVariantCaps(v String)
func (Properties) SetFontVariantEastAsian ¶
func (s Properties) SetFontVariantEastAsian(v SStrings)
func (Properties) SetFontVariantLigatures ¶
func (s Properties) SetFontVariantLigatures(v SStrings)
func (Properties) SetFontVariantNumeric ¶
func (s Properties) SetFontVariantNumeric(v SStrings)
func (Properties) SetFontVariantPosition ¶
func (s Properties) SetFontVariantPosition(v String)
func (Properties) SetFontVariationSettings ¶ added in v0.0.3
func (s Properties) SetFontVariationSettings(v SFloatStrings)
func (Properties) SetFontWeight ¶
func (s Properties) SetFontWeight(v IntString)
func (Properties) SetFootnoteDisplay ¶ added in v0.0.2
func (s Properties) SetFootnoteDisplay(v String)
func (Properties) SetFootnotePolicy ¶ added in v0.0.2
func (s Properties) SetFootnotePolicy(v String)
func (Properties) SetHeight ¶
func (s Properties) SetHeight(v Value)
func (Properties) SetHyphenateCharacter ¶
func (s Properties) SetHyphenateCharacter(v String)
func (Properties) SetHyphenateLimitChars ¶
func (s Properties) SetHyphenateLimitChars(v Ints3)
func (Properties) SetHyphenateLimitZone ¶
func (s Properties) SetHyphenateLimitZone(v Value)
func (Properties) SetHyphens ¶
func (s Properties) SetHyphens(v String)
func (Properties) SetImageOrientation ¶ added in v0.0.3
func (s Properties) SetImageOrientation(v SBoolFloat)
func (Properties) SetImageRendering ¶
func (s Properties) SetImageRendering(v String)
func (Properties) SetImageResolution ¶
func (s Properties) SetImageResolution(v Value)
func (Properties) SetJustifyContent ¶
func (s Properties) SetJustifyContent(v String)
func (Properties) SetLang ¶
func (s Properties) SetLang(v NamedString)
func (Properties) SetLeft ¶
func (s Properties) SetLeft(v Value)
func (Properties) SetLetterSpacing ¶
func (s Properties) SetLetterSpacing(v Value)
func (Properties) SetLineHeight ¶
func (s Properties) SetLineHeight(v Value)
func (Properties) SetLink ¶
func (s Properties) SetLink(v NamedString)
func (Properties) SetListStyleImage ¶
func (s Properties) SetListStyleImage(v Image)
func (Properties) SetListStylePosition ¶
func (s Properties) SetListStylePosition(v String)
func (Properties) SetListStyleType ¶
func (s Properties) SetListStyleType(v CounterStyleID)
func (Properties) SetMarginBottom ¶
func (s Properties) SetMarginBottom(v Value)
func (Properties) SetMarginBreak ¶
func (s Properties) SetMarginBreak(v String)
func (Properties) SetMarginLeft ¶
func (s Properties) SetMarginLeft(v Value)
func (Properties) SetMarginRight ¶
func (s Properties) SetMarginRight(v Value)
func (Properties) SetMarginTop ¶
func (s Properties) SetMarginTop(v Value)
func (Properties) SetMarks ¶
func (s Properties) SetMarks(v Marks)
func (Properties) SetMaxHeight ¶
func (s Properties) SetMaxHeight(v Value)
func (Properties) SetMaxLines ¶
func (s Properties) SetMaxLines(v TaggedInt)
func (Properties) SetMaxWidth ¶
func (s Properties) SetMaxWidth(v Value)
func (Properties) SetMinHeight ¶
func (s Properties) SetMinHeight(v Value)
func (Properties) SetMinWidth ¶
func (s Properties) SetMinWidth(v Value)
func (Properties) SetObjectFit ¶
func (s Properties) SetObjectFit(v String)
func (Properties) SetObjectPosition ¶
func (s Properties) SetObjectPosition(v Center)
func (Properties) SetOpacity ¶
func (s Properties) SetOpacity(v Float)
func (Properties) SetOrder ¶
func (s Properties) SetOrder(v Int)
func (Properties) SetOrphans ¶
func (s Properties) SetOrphans(v Int)
func (Properties) SetOutlineColor ¶
func (s Properties) SetOutlineColor(v Color)
func (Properties) SetOutlineStyle ¶
func (s Properties) SetOutlineStyle(v String)
func (Properties) SetOutlineWidth ¶
func (s Properties) SetOutlineWidth(v Value)
func (Properties) SetOverflow ¶
func (s Properties) SetOverflow(v String)
func (Properties) SetOverflowWrap ¶
func (s Properties) SetOverflowWrap(v String)
func (Properties) SetPaddingBottom ¶
func (s Properties) SetPaddingBottom(v Value)
func (Properties) SetPaddingLeft ¶
func (s Properties) SetPaddingLeft(v Value)
func (Properties) SetPaddingRight ¶
func (s Properties) SetPaddingRight(v Value)
func (Properties) SetPaddingTop ¶
func (s Properties) SetPaddingTop(v Value)
func (Properties) SetPage ¶
func (s Properties) SetPage(v Page)
func (Properties) SetPosition ¶
func (s Properties) SetPosition(v BoolString)
func (Properties) SetQuotes ¶
func (s Properties) SetQuotes(v Quotes)
func (Properties) SetRight ¶
func (s Properties) SetRight(v Value)
func (Properties) SetSize ¶
func (s Properties) SetSize(v Point)
func (Properties) SetStringSet ¶
func (s Properties) SetStringSet(v StringSet)
func (Properties) SetTabSize ¶
func (s Properties) SetTabSize(v Value)
func (Properties) SetTableLayout ¶
func (s Properties) SetTableLayout(v String)
func (Properties) SetTextAlignAll ¶
func (s Properties) SetTextAlignAll(v String)
func (Properties) SetTextAlignLast ¶
func (s Properties) SetTextAlignLast(v String)
func (Properties) SetTextDecorationColor ¶
func (s Properties) SetTextDecorationColor(v Color)
func (Properties) SetTextDecorationLine ¶
func (s Properties) SetTextDecorationLine(v Decorations)
func (Properties) SetTextDecorationStyle ¶
func (s Properties) SetTextDecorationStyle(v String)
func (Properties) SetTextIndent ¶
func (s Properties) SetTextIndent(v Value)
func (Properties) SetTextOverflow ¶
func (s Properties) SetTextOverflow(v String)
func (Properties) SetTextTransform ¶
func (s Properties) SetTextTransform(v String)
func (Properties) SetTop ¶
func (s Properties) SetTop(v Value)
func (Properties) SetTransform ¶
func (s Properties) SetTransform(v Transforms)
func (Properties) SetTransformOrigin ¶
func (s Properties) SetTransformOrigin(v Point)
func (Properties) SetUnicodeBidi ¶
func (s Properties) SetUnicodeBidi(v String)
func (Properties) SetVerticalAlign ¶
func (s Properties) SetVerticalAlign(v Value)
func (Properties) SetVisibility ¶
func (s Properties) SetVisibility(v String)
func (Properties) SetWhiteSpace ¶
func (s Properties) SetWhiteSpace(v String)
func (Properties) SetWidows ¶
func (s Properties) SetWidows(v Int)
func (Properties) SetWidth ¶
func (s Properties) SetWidth(v Value)
func (Properties) SetWordBreak ¶ added in v0.0.2
func (s Properties) SetWordBreak(v String)
func (Properties) SetWordSpacing ¶
func (s Properties) SetWordSpacing(v Value)
func (Properties) SetZIndex ¶
func (s Properties) SetZIndex(v IntString)
func (Properties) UpdateWith ¶
func (p Properties) UpdateWith(other Properties)
UpdateWith merge the entries from `other` to `p`.
type RadialGradient ¶
type RadialGradient struct { ColorStops ColorsStops Shape string Size GradientSize Center Center Repeating bool }
func (RadialGradient) IsNone ¶
func (v RadialGradient) IsNone() bool
type Repeats ¶
type Repeats [][2]string
func (Repeats) Repeat ¶
func (bs Repeats) Repeat(n int) CssProperty
type SBoolFloat ¶ added in v0.0.3
type SContent ¶
type SContent struct { String string Contents ContentProperties }
type SContentProp ¶
type SContentProp struct { ContentProperty ContentProperty String string }
func (SContentProp) IsNone ¶
func (v SContentProp) IsNone() bool
type SContentProps ¶
type SContentProps []SContentProp
type SDimensions ¶
type SDimensions struct { String string Dimensions Dimensions }
func (SDimensions) IsNone ¶
func (v SDimensions) IsNone() bool
type SFloatStrings ¶ added in v0.0.3
type SFloatStrings struct { String string Values []FloatString }
SFloatStrings is either a string or a list of (string, float) pairs
type SIntStrings ¶
type SIntStrings struct { String string Values IntStrings }
func (SIntStrings) IsNone ¶
func (v SIntStrings) IsNone() bool
type SpecifiedAttributes ¶
type SpecifiedAttributes struct { Float String Display Display Position BoolString }
SpecifiedAttributes stores the value of CSS properties as specified.
type Strings ¶
type Strings []string
func (Strings) Repeat ¶
func (bs Strings) Repeat(n int) CssProperty
type StyleAccessor ¶
type StyleAccessor interface { GetAlignContent() String SetAlignContent(v String) GetAlignItems() String SetAlignItems(v String) GetAlignSelf() String SetAlignSelf(v String) GetAnchor() String SetAnchor(v String) GetAppearance() String SetAppearance(v String) GetBackgroundAttachment() Strings SetBackgroundAttachment(v Strings) GetBackgroundClip() Strings SetBackgroundClip(v Strings) GetBackgroundColor() Color SetBackgroundColor(v Color) GetBackgroundImage() Images SetBackgroundImage(v Images) GetBackgroundOrigin() Strings SetBackgroundOrigin(v Strings) GetBackgroundPosition() Centers SetBackgroundPosition(v Centers) GetBackgroundRepeat() Repeats SetBackgroundRepeat(v Repeats) GetBackgroundSize() Sizes SetBackgroundSize(v Sizes) GetBleedBottom() Value SetBleedBottom(v Value) GetBleedLeft() Value SetBleedLeft(v Value) GetBleedRight() Value SetBleedRight(v Value) GetBleedTop() Value SetBleedTop(v Value) GetBlockEllipsis() TaggedString SetBlockEllipsis(v TaggedString) GetBookmarkLabel() ContentProperties SetBookmarkLabel(v ContentProperties) GetBookmarkLevel() IntString SetBookmarkLevel(v IntString) GetBookmarkState() String SetBookmarkState(v String) GetBorderBottomColor() Color SetBorderBottomColor(v Color) GetBorderBottomLeftRadius() Point SetBorderBottomLeftRadius(v Point) GetBorderBottomRightRadius() Point SetBorderBottomRightRadius(v Point) GetBorderBottomStyle() String SetBorderBottomStyle(v String) GetBorderBottomWidth() Value SetBorderBottomWidth(v Value) GetBorderCollapse() String SetBorderCollapse(v String) GetBorderLeftColor() Color SetBorderLeftColor(v Color) GetBorderLeftStyle() String SetBorderLeftStyle(v String) GetBorderLeftWidth() Value SetBorderLeftWidth(v Value) GetBorderRightColor() Color SetBorderRightColor(v Color) GetBorderRightStyle() String SetBorderRightStyle(v String) GetBorderRightWidth() Value SetBorderRightWidth(v Value) GetBorderSpacing() Point SetBorderSpacing(v Point) GetBorderTopColor() Color SetBorderTopColor(v Color) GetBorderTopLeftRadius() Point SetBorderTopLeftRadius(v Point) GetBorderTopRightRadius() Point SetBorderTopRightRadius(v Point) GetBorderTopStyle() String SetBorderTopStyle(v String) GetBorderTopWidth() Value SetBorderTopWidth(v Value) GetBottom() Value SetBottom(v Value) GetBoxDecorationBreak() String SetBoxDecorationBreak(v String) GetBoxSizing() String SetBoxSizing(v String) GetBreakAfter() String SetBreakAfter(v String) GetBreakBefore() String SetBreakBefore(v String) GetBreakInside() String SetBreakInside(v String) GetCaptionSide() String SetCaptionSide(v String) GetClear() String SetClear(v String) GetClip() Values SetClip(v Values) GetColor() Color SetColor(v Color) GetColumnCount() IntString SetColumnCount(v IntString) GetColumnFill() String SetColumnFill(v String) GetColumnGap() Value SetColumnGap(v Value) GetColumnRuleColor() Color SetColumnRuleColor(v Color) GetColumnRuleStyle() String SetColumnRuleStyle(v String) GetColumnRuleWidth() Value SetColumnRuleWidth(v Value) GetColumnSpan() String SetColumnSpan(v String) GetColumnWidth() Value SetColumnWidth(v Value) GetContent() SContent SetContent(v SContent) GetContinue() String SetContinue(v String) GetCounterIncrement() SIntStrings SetCounterIncrement(v SIntStrings) GetCounterReset() SIntStrings SetCounterReset(v SIntStrings) GetCounterSet() SIntStrings SetCounterSet(v SIntStrings) GetDirection() String SetDirection(v String) GetDisplay() Display SetDisplay(v Display) GetEmptyCells() String SetEmptyCells(v String) GetFlexBasis() Value SetFlexBasis(v Value) GetFlexDirection() String SetFlexDirection(v String) GetFlexGrow() Float SetFlexGrow(v Float) GetFlexShrink() Float SetFlexShrink(v Float) GetFlexWrap() String SetFlexWrap(v String) GetFloat() String SetFloat(v String) GetFontFamily() Strings SetFontFamily(v Strings) GetFontFeatureSettings() SIntStrings SetFontFeatureSettings(v SIntStrings) GetFontKerning() String SetFontKerning(v String) GetFontLanguageOverride() String SetFontLanguageOverride(v String) GetFontSize() Value SetFontSize(v Value) GetFontStretch() String SetFontStretch(v String) GetFontStyle() String SetFontStyle(v String) GetFontVariant() String SetFontVariant(v String) GetFontVariantAlternates() String SetFontVariantAlternates(v String) GetFontVariantCaps() String SetFontVariantCaps(v String) GetFontVariantEastAsian() SStrings SetFontVariantEastAsian(v SStrings) GetFontVariantLigatures() SStrings SetFontVariantLigatures(v SStrings) GetFontVariantNumeric() SStrings SetFontVariantNumeric(v SStrings) GetFontVariantPosition() String SetFontVariantPosition(v String) GetFontVariationSettings() SFloatStrings SetFontVariationSettings(v SFloatStrings) GetFontWeight() IntString SetFontWeight(v IntString) GetFootnoteDisplay() String SetFootnoteDisplay(v String) GetFootnotePolicy() String SetFootnotePolicy(v String) GetHeight() Value SetHeight(v Value) GetHyphenateCharacter() String SetHyphenateCharacter(v String) GetHyphenateLimitChars() Ints3 SetHyphenateLimitChars(v Ints3) GetHyphenateLimitZone() Value SetHyphenateLimitZone(v Value) GetHyphens() String SetHyphens(v String) GetImageOrientation() SBoolFloat SetImageOrientation(v SBoolFloat) GetImageRendering() String SetImageRendering(v String) GetImageResolution() Value SetImageResolution(v Value) GetJustifyContent() String SetJustifyContent(v String) GetLang() NamedString SetLang(v NamedString) GetLeft() Value SetLeft(v Value) GetLetterSpacing() Value SetLetterSpacing(v Value) GetLineHeight() Value SetLineHeight(v Value) GetLink() NamedString SetLink(v NamedString) GetListStyleImage() Image SetListStyleImage(v Image) GetListStylePosition() String SetListStylePosition(v String) GetListStyleType() CounterStyleID SetListStyleType(v CounterStyleID) GetMarginBottom() Value SetMarginBottom(v Value) GetMarginBreak() String SetMarginBreak(v String) GetMarginLeft() Value SetMarginLeft(v Value) GetMarginRight() Value SetMarginRight(v Value) GetMarginTop() Value SetMarginTop(v Value) GetMarks() Marks SetMarks(v Marks) GetMaxHeight() Value SetMaxHeight(v Value) GetMaxLines() TaggedInt SetMaxLines(v TaggedInt) GetMaxWidth() Value SetMaxWidth(v Value) GetMinHeight() Value SetMinHeight(v Value) GetMinWidth() Value SetMinWidth(v Value) GetObjectFit() String SetObjectFit(v String) GetObjectPosition() Center SetObjectPosition(v Center) GetOpacity() Float SetOpacity(v Float) GetOrder() Int SetOrder(v Int) GetOrphans() Int SetOrphans(v Int) GetOutlineColor() Color SetOutlineColor(v Color) GetOutlineStyle() String SetOutlineStyle(v String) GetOutlineWidth() Value SetOutlineWidth(v Value) GetOverflow() String SetOverflow(v String) GetOverflowWrap() String SetOverflowWrap(v String) GetPaddingBottom() Value SetPaddingBottom(v Value) GetPaddingLeft() Value SetPaddingLeft(v Value) GetPaddingRight() Value SetPaddingRight(v Value) GetPaddingTop() Value SetPaddingTop(v Value) GetPage() Page SetPage(v Page) GetPosition() BoolString SetPosition(v BoolString) GetQuotes() Quotes SetQuotes(v Quotes) GetRight() Value SetRight(v Value) GetSize() Point SetSize(v Point) GetStringSet() StringSet SetStringSet(v StringSet) GetTabSize() Value SetTabSize(v Value) GetTableLayout() String SetTableLayout(v String) GetTextAlignAll() String SetTextAlignAll(v String) GetTextAlignLast() String SetTextAlignLast(v String) GetTextDecorationColor() Color SetTextDecorationColor(v Color) GetTextDecorationLine() Decorations SetTextDecorationLine(v Decorations) GetTextDecorationStyle() String SetTextDecorationStyle(v String) GetTextIndent() Value SetTextIndent(v Value) GetTextOverflow() String SetTextOverflow(v String) GetTextTransform() String SetTextTransform(v String) GetTop() Value SetTop(v Value) GetTransform() Transforms SetTransform(v Transforms) GetTransformOrigin() Point SetTransformOrigin(v Point) GetUnicodeBidi() String SetUnicodeBidi(v String) GetVerticalAlign() Value SetVerticalAlign(v Value) GetVisibility() String SetVisibility(v String) GetWhiteSpace() String SetWhiteSpace(v String) GetWidows() Int SetWidows(v Int) GetWidth() Value SetWidth(v Value) GetWordBreak() String SetWordBreak(v String) GetWordSpacing() Value SetWordSpacing(v Value) GetZIndex() IntString SetZIndex(v IntString) }
type Tag ¶ added in v0.0.2
type Tag uint8
Tag is a flag indicating special values, such as "none" or "auto".
const ( Auto Tag // "auto" None // "none" )
type TaggedString ¶ added in v0.0.2
type TextRatioCache ¶ added in v0.0.3
type TextRatioCache struct {
// contains filtered or unexported fields
}
TextRatioCache stores the 1ex/font_size or 1ch/font_size ratios, for each font.
func NewTextRatioCache ¶ added in v0.0.3
func NewTextRatioCache() TextRatioCache
type Transforms ¶
type Transforms []SDimensions
type ValidatedProperty ¶
type ValidatedProperty struct { SpecialProperty specialProperty // contains filtered or unexported fields }
ValidatedProperty is the most general CSS input for a property. It covers the following cases:
- a plain CSS value, including "initial" or "inherited" special cases (CssProperty)
- a var() call (VarData)
- an input not yet validated, used as definition of variable (RawTokens)
func AsValidated ¶
func AsValidated(spe specialProperty) ValidatedProperty
func (ValidatedProperty) IsNone ¶
func (c ValidatedProperty) IsNone() bool
func (ValidatedProperty) ToCascaded ¶
func (c ValidatedProperty) ToCascaded() CascadedProperty
ToCascaded will panic if c.SpecialProperty is not nil.
type Value ¶
func MaybeFloatToValue ¶
func MaybeFloatToValue(mf MaybeFloat) Value
func (Value) ToMaybeFloat ¶
func (v Value) ToMaybeFloat() MaybeFloat