parts

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package parts is what base's components share to style their parts.

Index

Constants

View Source
const FirstFrame = 50 * time.Millisecond

FirstFrame is how long a popup or a toast waits for its first display frame before it counts as past it without one.

View Source
const HandleBand core.Points = 3

HandleBand is the width of the band that takes a drag to resize.

Variables

View Source
var Cover = core.Style{Position: core.Absolute, Top: core.Pt(0), Left: core.Pt(0), Width: core.Pct(100), Height: core.Pct(100)}

Cover is an overlay over its whole root view; overlays are as large as their content otherwise.

View Source
var Fill = core.Style{Position: core.Absolute, Top: core.Pt(0), Right: core.Pt(0), Bottom: core.Pt(0), Left: core.Pt(0)}

Fill lays a view over the whole of its parent.

Functions

func Important

func Important(class string) string

Important returns class with every utility Important (opacity-0 is opacity-0!), as NSH's toast root does.

func JoinClasses

func JoinClasses(a, b string) string

JoinClasses returns a's classes then b's, which win over a's.

Types

type Part

type Part struct {
	Class string
	Style core.Style
	Fn    func() core.Style
}

Part is the class and styles the app gives one of a component's parts.

func Of

func Of(class string, style core.Style, fn func() core.Style) Part

Of is the Part of class, style and fn.

func (Part) Set

func (p Part) Set() bool

Set reports whether the app styles the part.

Jump to

Keyboard shortcuts

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