theme

package
v0.0.0-...-3adac96 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDeclarationInSelectorIfNotPresentAlready

func AddDeclarationInSelectorIfNotPresentAlready(cssString string, selector string, declaration Declaration) (newCSS string, added bool, err error)

Add declaration in selector if not present already. If added, then added is true.

func CheckDeclarationInSelector

func CheckDeclarationInSelector(cssString string, selector string, declarationProperty string) (bool, error)

CheckDeclarationInSelector checks if the declaration is in the selector of provided css

func MigrateMediaQueryToClassBased

func MigrateMediaQueryToClassBased(r io.Reader) (result []byte, err error)

MigrateMediaQueryToClassBased migrates media query dark theme to class-based dark theme.

Types

type Declaration

type Declaration struct {
	Property string
	Value    string
}

func (*Declaration) Stringify

func (d *Declaration) Stringify(buf *bytes.Buffer, indent Indentation)

type Indentation

type Indentation string

func (Indentation) Next

func (i Indentation) Next() Indentation

type Ruleset

type Ruleset struct {
	Selector     string
	Declarations []*Declaration
}

func (*Ruleset) Stringify

func (r *Ruleset) Stringify(buf *bytes.Buffer, indent Indentation)

Jump to

Keyboard shortcuts

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