helpers

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BorderParser

func BorderParser(border string) int

func BuildFontsTags

func BuildFontsTags(w io.StringWriter, content string, inlineStyles []string, fontDeclarations []*FontDeclaration) error

func BuildMediaQueriesTags

func BuildMediaQueriesTags(w io.StringWriter, breakpoint string, mediaQueries *parser.Attributes, options MediaQueriesOptions) error

func BuildPreview

func BuildPreview(w io.StringWriter, content string) error

func BuildStyleFromComponents

func BuildStyleFromComponents(
	w io.StringWriter,
	breakpoint string,
	componentsHeadStyles []func(breakpoint string) string,
	headStyles map[string]func(breakpoint string) string,
) error

func BuildStyleFromTags

func BuildStyleFromTags(w io.StringWriter, breakpoint string, styles []string) error

func ConditionalTagEnd

func ConditionalTagEnd(w io.StringWriter, negation bool) (int, error)

func ConditionalTagStart

func ConditionalTagStart(w io.StringWriter, negation bool) (int, error)

func FormatAttributes

func FormatAttributes(attributes *orderedmap.OrderedMap[string, string], allowedAttributes map[string]string) *orderedmap.OrderedMap[string, string]

func GenRandomHexString

func GenRandomHexString(length int) string

func MakeLowerBreakpoint

func MakeLowerBreakpoint(breakpoint string) string

func MergeOutlookConditionals

func MergeOutlookConditionals(content string) string

OPTIMIZE ME: — check if previous conditionnal is `<!--[if mso | I`]>` too

func MinifyOutlookConditionals

func MinifyOutlookConditionals(content string) string

func MsoConditionalTagStart

func MsoConditionalTagStart(w io.StringWriter, negation bool) (int, error)

func ParseFloatLoose

func ParseFloatLoose(s string) (float64, error)

func ParseIntLoose

func ParseIntLoose(s string) (int, error)

func ShorthandParser

func ShorthandParser(cssValue string, direction string) int

func SuffixCssClasses

func SuffixCssClasses(classes, suffix string) string

func TrimNumber

func TrimNumber(s string) string

func WidthParser

func WidthParser(width string, parseFloatToInt bool) (float64, string)

Types

type FontDeclaration

type FontDeclaration struct {
	Name string
	Href string
}

type MediaQueriesOptions

type MediaQueriesOptions struct {
	ForceOWADesktop bool
	PrinterSupport  bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL