Documentation
¶
Index ¶
- Constants
- func Angle(angle float64) css.Rules
- func Margin(first units.Unit, more ...units.Unit) css.Rule
- func OnHover(styles ...Style) seed.Option
- func Padding(first units.Unit, more ...units.Unit) css.Rule
- func Rounded(first units.Unit, more ...units.Unit) css.Rule
- func Scale(factor float64) css.Rules
- func Translation(x, y units.Unit) css.Rules
- func Visible() css.Rule
- type BorderStyle
- type Condition
- func (con Condition) AddTo(c seed.Seed)
- func (con Condition) And(options ...seed.Option) seed.Option
- func (con Condition) Huge(styles ...Style) Condition
- func (con Condition) Landscape(styles ...Style) Condition
- func (con Condition) Large(styles ...Style) Condition
- func (con Condition) Medium(styles ...Style) Condition
- func (con Condition) Portrait(styles ...Style) Condition
- func (con Condition) Small(styles ...Style) Condition
- func (con Condition) Tiny(styles ...Style) Condition
- type Gradient
- type Shadow
- type Style
- func Border(s BorderStyle) Style
- func BorderColor(c color.Color) Style
- func BorderWidth(w units.Unit) Style
- func Borderless() Style
- func BottomLeftRounding(u units.Unit) Style
- func BottomRightRounding(u units.Unit) Style
- func Clipped() Style
- func Color(c color.Color) Style
- func Height(w units.Unit) Style
- func Hidden() Style
- func Layer(layer int) Style
- func MarginBottom(u units.Unit) Style
- func MarginLeft(u units.Unit) Style
- func MarginRight(u units.Unit) Style
- func MarginTop(u units.Unit) Style
- func MaxHeight(w units.Unit) Style
- func MaxWidth(w units.Unit) Style
- func MinHeight(w units.Unit) Style
- func MinWidth(w units.Unit) Style
- func OffsetBottom(u units.Unit) Style
- func OffsetLeft(u units.Unit) Style
- func OffsetRight(u units.Unit) Style
- func OffsetTop(u units.Unit) Style
- func Opacity(v float64) Style
- func Overlay(attachto ...side) Style
- func PaddingBottom(u units.Unit) Style
- func PaddingLeft(u units.Unit) Style
- func PaddingRight(u units.Unit) Style
- func PaddingTop(u units.Unit) Style
- func Scrollable() Style
- func Size(w, h units.Unit) Style
- func Sticky(attachto ...side) Style
- func TopLeftRounding(u units.Unit) Style
- func TopRightRounding(u units.Unit) Style
- func Width(w units.Unit) Style
Constants ¶
const ( Top side = iota Bottom Left Right )
Direction constants.
Variables ¶
This section is empty.
Functions ¶
func Margin ¶
Margin sets the outer-spacing of this seed. If more than one argument is provided different sides are padded. eg.
Margin(all) Margin(x, y) Margin(x, top, bottom) Margin(left, right, top, bottom)
if more than 4 arguments are given, all but the first four are ignored.
func Padding ¶
Padding sets the inner-spacing of this seed. If more than one argument is provided different sides are padded. eg.
Padding(all) Padding(x, y) Padding(x, top, bottom) Padding(left, right, top, bottom)
if more than 4 arguments are given, all but the first four are ignored.
func Rounded ¶
Rounded sets how round this seed is, by rounding it's corners. If more than one argument is provided different corners are rounded differently. eg.
Rounded(top, bottom) Rounded(top, bottom_left, bottom_right) Rounded(top_left, top_right, bottom_left, bottom_right)
if more than 4 arguments are given, all but the first four are ignored.
func Translation ¶
Translation sets the translation of this seed.
Types ¶
type BorderStyle ¶
type BorderStyle int
BorderStyle determines how a border is rendered.
const ( Solid BorderStyle = iota Dashed )
BorderStyles
type Condition ¶
type Condition struct {
// contains filtered or unexported fields
}
Condition backs the If variable and can apply conditional styles.
var If Condition
If allows conditional styles.
type Gradient ¶
type Gradient struct {
From, To color.Color
Colors []color.Color
Ratios []float64
Direction complex128
Repeating, Radial, Circle bool
Size complex128
Closest bool
Side bool
}
Gradient is a color gradient from one color to another.
type Shadow ¶
Shadow Defines a shadow that should be applied to the Element, with offset X and Y, Blur and of the specified color.
type Style ¶
Style is a setter that wraps css styling.
func BorderColor ¶
BorderColor sets the border color of the seed.
func BottomLeftRounding ¶
BottomLeftRounding sets the bottom-left rounding of this seed.
func BottomRightRounding ¶
BottomRightRounding sets the bottom-right rounding of this seed.
func Clipped ¶
func Clipped() Style
Clipped sets this seed to clip any children that cross the border.
func MarginBottom ¶
MarginBottom sets the bottom outer-spacing of this seed.
func MarginLeft ¶
MarginLeft sets the outer-spacing to the left of this seed.
func MarginRight ¶
MarginRight sets the outer-spacing to the right of this seed.
func OffsetBottom ¶
OffsetBottom sets the bottom offset of this seed.
func OffsetLeft ¶
OffsetLeft sets the offset to the left of this seed.
func OffsetRight ¶
OffsetRight sets the offset to the right of this seed.
func Overlay ¶
func Overlay(attachto ...side) Style
Overlay positions this seed overlayed on its parent.
func PaddingBottom ¶
PaddingBottom sets the bottom inner-spacing of this seed.
func PaddingLeft ¶
PaddingLeft sets the inner-spacing to the left of this seed.
func PaddingRight ¶
PaddingRight sets the inner-spacing to the right of this seed.
func PaddingTop ¶
PaddingTop sets the top inner-spacing of this seed.
func Scrollable ¶
func Scrollable() Style
Scrollable sets this to seed to be scrollable if it's height overflows. If the container is getting cut off, ensure that a parent seed as MinHeight set to 0.
func Sticky ¶
func Sticky(attachto ...side) Style
Sticky keeps this seed on the screen when scrolling.
func TopLeftRounding ¶
TopLeftRounding sets the top-left rounding of this seed.
func TopRightRounding ¶
TopRightRounding sets the top-right rounding of this seed.