cssutil

package
v0.0.0-...-ad46cc6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MPL-2.0 Imports: 8 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCSSVariables

func AddCSSVariables(vars map[string]string)

AddCSSVariables adds the variables from the given map into the global variables map. This function must be called before ApplyGlobalCSS is called for it to have an effect.

To use a variable, use the {$variable} syntax.

func AddClass

func AddClass(w gtk.Widgetter, classes ...string)

AddClass adds classes.

func Applier

func Applier(class, css string) func(gtk.Widgetter)

Applier returns a constructor that applies a class to the given widgetter. It also writes the CSS to the global CSS.

func Apply

func Apply(widget gtk.Widgetter, css string)

Apply applies the given CSS into the given widget's style context.

func ApplyGlobalCSS

func ApplyGlobalCSS()

ApplyGlobalCSS applies the current global CSS to the default display.

func ApplyUserCSS

func ApplyUserCSS(path string)

ApplyUserCSS applies the user CSS at the given path.

func Applyf

func Applyf(widget gtk.Widgetter, f string, v ...interface{})

Applyf is a convenient function that wraps Sprintf and Apply.

func WriteCSS

func WriteCSS(css string) struct{}

WriteCSS adds the given string to the global CSS. It's primarily meant to be used during global variable initialization. If WriteCSS is called after ApplyGlobalCSS, then a panic is thrown.

Types

This section is empty.

Jump to

Keyboard shortcuts

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