Documentation
¶
Index ¶
Constants ¶
View Source
const ExplicitUnit = "px"
Variables ¶
View Source
var ( Colors = DefaultConfig.Colors Order = DefaultConfig.Order MediaQueries = DefaultConfig.MediaQueries States = DefaultConfig.States ShadowLevels = DefaultConfig.ShadowLevels Scale = DefaultConfig.Scale AlphaScales = DefaultConfig.AlphaScales )
View Source
var DefaultConfig = Config{ Colors: map[string]Color{ "white": Hex("#FFFFFF"), "black": Hex("#000000"), "gray": Hex("#808080"), "red": Hex("#FF0000"), "deeppink": Hex("#FF1493"), "orangered": Hex("#FF4500"), "gold": Hex("#FFD900"), "darkviolet": Hex("#9400D3"), "lime": Hex("#00FF00"), "deepskyblue": Hex("#00BFFF"), "peace": Hex("#8866FF"), "blue": Hex("#4242FF"), "primary": Hex("#4242FF"), "warning": Hex("#FF6824"), "positive": Hex("#8824FF"), "danger": Hex("#FF4242"), "success": Hex("#02D842"), "info": Hex("#2288FF"), "default": Hex("#E2E8F6"), "special": Hex("#240224"), "dark": Hex("#121212"), "elegant": Hex("#242424"), "stylish": Hex("#242442"), "unique": Hex("#022442"), "profession": Hex("#16161B"), "light": Hex("#F2F4F6"), "ghost": Hex("#F8F8FF"), "lavender": Hex("#E6E6FA"), "kitwork": Hex("#f82244"), "brand": Hex("#f82244"), }, Order: []string{"white", "black", "gray", "red", "deeppink", "orangered", "gold", "darkviolet", "lime", "deepskyblue", "peace", "blue", "primary", "warning", "positive", "danger", "success", "info", "special", "dark", "elegant", "stylish", "unique", "profession", "light", "ghost", "lavender", "default", "kitwork", "brand"}, MediaQueries: map[string]string{ "mobile": "@media (max-width: 600px)", "tablet": "@media (max-width: 900px)", "laptop": "@media (max-width: 1200px)", "desktop": "@media (min-width: 1280px)", }, States: map[string]string{ "hover": "hover", "group-hover": ".group:hover &", "focus": "focus", "active": "active", "disabled": "disabled", "visited": "visited", "first": "first-child", "last": "last-child", }, ShadowLevels: map[string]string{ "small": "0 1px 2px rgba(0,0,0,0.1)", "medium": "0 4px 6px rgba(0,0,0,0.1)", "large": "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)", "giant": "0 20px 25px rgba(0,0,0,0.15)", "wide": "0 25px 50px -12px rgba(0, 0, 0, 0.25)", "glow": "0 0 40px rgba(248, 34, 68, 0.15)", "glow-brand": "0 0 30px rgba(248, 34, 68, 0.4)", "industrial": "0 10px 30px -10px rgba(0,0,0,0.5)", "system": "0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 40px -12px rgba(0,0,0,0.8)", "core": "0 0 0 1px rgba(248, 34, 68, 0.1), 0 20px 40px -12px rgba(248, 34, 68, 0.1)", "great": "0 30px 60px -12px rgba(0,0,0,0.6)", "none": "none", }, Scale: []int{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 30, 32, 36, 40, 48, 50, 56, 60, 64, 72, 80, 96, 100, 120, 128, 140, 160, 180, 200, 240, 320, 360, 400, 480, }, AlphaScales: []int{2, 5, 8, 10, 20, 30, 40, 50, 60, 80}, Opacities: []int{0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100}, ZIndices: []int{0, 10, 20, 30, 40, 50, 100, 999, 9999}, }
View Source
var Registry = []Pattern{
{`^(background)-(gradient|grid|haze)-(brand|white|dark)$`, "special-bg"},
{`^(blur)-(small|medium|large|none)$`, "blur"},
{`^(shadow)-(small|medium|large|giant|wide|industrial|glow|great|system|core|glow-brand|none)$`, "shadow"},
{`^(text-clip|glow-brand)$`, "text-effect"},
{`^(animate)-(pulse|spin|bounce|none)$`, "animate"},
{`^(margin|padding|gap)-(x|y)-([0-9%.-]+[a-z]*|none|auto)$`, "spacing-axis"},
{`^(margin|padding)-(top|bottom|left|right)-([0-9%.-]+[a-z]*|none|auto)$`, "spacing-dir"},
{`^(margin|padding|gap|top|bottom|left|right)-([0-9%.-]+[a-z]*|none|auto)$`, "spacing-single"},
{`^(width|height|max-width|min-width|max-height|min-height)-([a-z0-9%.-]+|full|screen|auto|fit|min|max)$`, "sizing"},
{`^(aspect)-(video|square|auto)$`, "aspect"},
{`^(border|outline)-(top|bottom|left|right)-([0-9%.-]+[a-z]*|none)$`, "border-side"},
{`^(border|outline)-([0-9%.-]+[a-z]*|none)$`, "border-all"},
{`^(border)-(solid|dashed|dotted|double|none)$`, "border-style"},
{`^(rounded)-(top|bottom|left|right)-([0-9%.-]+[a-z]*)$`, "rounded-side"},
{`^(rounded)-([0-9%.-]+[a-z]*|full|none)$`, "rounded-all"},
{`^(background|bg|color|text)-([a-zA-Z]+)(?:-([0-9]+))?$`, "color-plain"},
{`^(border)-(top|bottom|left|right)-([a-zA-Z]+)(?:-([0-9]+))?$`, "border-color-side"},
{`^(border)-([a-zA-Z]+)(?:-([0-9]+))?$`, "border-color"},
{`^(font)-(outfit|mono|bold|medium|light|semibold|black|900|500)$`, "font-family-weight"},
{`^(text|font-size)-([0-9]+[a-z]*)$`, "font-size"},
{`^(italic|uppercase|lowercase|capitalize|underline|line-through|no-underline)$`, "text-transform"},
{`^(text)-(center|left|right|justify)$`, "text-align"},
{`^(tracking|letter-spacing)-([0-9%.-]+[a-z]*)$`, "letter-spacing"},
{`^(line-height)-([0-9%.-]+[a-z]*)$`, "line-height"},
{`^(white-space)-(nowrap|pre|pre-wrap|pre-line|normal)$`, "white-space"},
{`^(break)-(all|words|normal)$`, "word-break"},
{`^(display)-(flex|grid|block|inline-block|none|inline-flex|table|hidden)$`, "display"},
{`^(flex)-(row|column|wrap|nowrap|grow|1|auto|none)$`, "flex-prop"},
{`^(justify|items|content)-(start|end|center|between|around|evenly|baseline|stretch)$`, "flex-align"},
{`^(self)-(auto|start|end|center|stretch)$`, "self-align"},
{`^(order)-(first|last|none|[0-9]+)$`, "order"},
{`^(grid-columns)-(\d+|none)$`, "grid-cols"},
{`^(grid-rows)-(\d+|none)$`, "grid-rows"},
{`^(grid-span)-(\d+|full)$`, "grid-span"},
{`^(grid-column)-(start|end)-(\d+|auto)$`, "grid-pos"},
{`^(position)-(relative|absolute|fixed|sticky|static)$`, "position"},
{`^(z-index)-([a-z0-9-]+)$`, "z-index"},
{`^(opacity)-(\d+)$`, "opacity"},
{`^(cursor)-(pointer|default|not-allowed|text|move|help)$`, "cursor"},
{`^(pointer-events)-(none|auto)$`, "pointer-events"},
{`^(select)-(none|text|all|auto)$`, "user-select"},
{`^(appearance)-(none|auto)$`, "appearance"},
{`^(resize)-(none|x|y|both)$`, "resize"},
{`^(transition)-(all|none|colors|opacity|transform)$`, "transition"},
{`^(duration)-([0-9]+)$`, "duration"},
{`^(delay)-([0-9]+)$`, "delay"},
{`^(ease)-(linear|in|out|in-out)$`, "ease"},
{`^(translate)-(x|y)-([0-9%.-]+[a-z]*)$`, "translate"},
{`^(scale)-([0-9.]+)$`, "scale"},
{`^(scale)-(x|y)-([0-9.]+)$`, "scale-axis"},
{`^(rotate)-([0-9.-]+)$`, "rotate"},
{`^(origin)-(center|top|bottom|left|right)$`, "origin"},
{`^(overflow)-(hidden|auto|scroll|visible|hidden-x|hidden-y|auto-x|auto-y)$`, "overflow"},
{`^(object)-(contain|cover|fill|none|scale-down)$`, "object-fit"},
{`^container$`, "container"},
{`^(m|p|gap)-(x|y|t|b|l|r)-(\d+|auto|px|\[.+?\])$`, "tw-spacing-axis"},
{`^(m|p|gap)-(\d+|auto|px|\[.+?\])$`, "tw-spacing-all"},
{`^-?(m)-(x|y|t|b|l|r)-(\d+|px|\[.+?\])$`, "tw-spacing-axis-neg"},
{`^-?(m)-(\d+|px|\[.+?\])$`, "tw-spacing-all-neg"},
{`^(w|h|max-w|min-w|max-h|min-h)-(\d+|full|screen|auto|fit|min|max|\[.+?\]|[a-z0-9-]+)$`, "tw-sizing"},
{`^(bg|text|border|ring|outline)-([a-z]+)-(\d+)(?:/(\d+|\[.+?\]))?$`, "tw-color-shade"},
{`^(bg|text|border|ring|outline)-(white|black|transparent|current|brand)(?:/(\d+|\[.+?\]))?$`, "tw-color-base"},
{`^(bg|text|border)-\[(#.+?)\]$`, "tw-color-arbitrary"},
{`^(rounded)-?(t|b|l|r|tl|tr|bl|br)?-?(sm|md|lg|xl|2xl|3xl|full|none|\[.+?\])?$`, "tw-rounded"},
{`^(text)-(\d*xs|sm|base|md|lg|\d*xl|\[.+?\])$`, "tw-text-size"},
{`^(blur)-?(sm|md|lg|xl|2xl|3xl|none|\[.+?\])?$`, "tw-blur"},
{`^(opacity)-(\d+|\[.+?\])$`, "tw-opacity"},
{`^(grid-cols)-(\d+|none|\[.+?\])$`, "tw-grid-cols"},
{`^(col-span)-(\d+|full)$`, "tw-col-span"},
{`^(flex)-(row|col|wrap|nowrap|1|auto|initial|none)$`, "tw-flex"},
{`^(justify|items|content|self)-(start|end|center|between|around|evenly|stretch|baseline)$`, "tw-align"},
{`^(block|inline-block|inline|flex|inline-flex|grid|inline-grid|hidden|table)$`, "tw-display"},
{`^(static|fixed|absolute|relative|sticky)$`, "tw-position"},
{`^(top|right|bottom|left|inset|inset-x|inset-y)-(\d+|auto|full|px|\[.+?\])$`, "tw-inset"},
{`^-?(top|right|bottom|left|inset|inset-x|inset-y)-(\d+|px|\[.+?\])$`, "tw-inset-neg"},
{`^(z)-(\d+|auto|\[.+?\])$`, "tw-zindex"},
{`^-?(z)-(\d+|\[.+?\])$`, "tw-zindex-neg"},
{`^(shadow)(?:-(sm|md|lg|xl|2xl|inner|none))?$`, "tw-shadow"},
{`^(overflow|overflow-x|overflow-y)-(auto|hidden|clip|visible|scroll)$`, "tw-overflow"},
{`^(cursor)-(auto|default|pointer|wait|text|move|help|not-allowed)$`, "tw-cursor"},
{`^(transition)(?:-(all|colors|opacity|shadow|transform|none))?$`, "tw-transition"},
{`^(duration)-(\d+|\[.+?\])$`, "tw-duration"},
{`^(ease)-(linear|in|out|in-out|\[.+?\])$`, "tw-ease"},
{`^(border)(?:-(t|b|l|r|x|y))?(?:-(\d+|\[.+?\]))?$`, "tw-border"},
{`^(font)-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)$`, "tw-font-weight"},
{`^(text)-(left|center|right|justify|start|end)$`, "tw-text-align"},
{`^(italic|not-italic|uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$`, "tw-text-decor"},
}
THE COMPLETE SOVEREIGN REGISTRY
Functions ¶
func GenerateFramework ¶
func GenerateFramework() string
func GenerateJIT ¶
func ResolveCore ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.