transforms

package
v0.0.0-...-1efd103 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyLink int

AnyLink controls transform options for :any-link selectors. introduced in CSS Selectors Level 4. See: https://www.w3.org/TR/selectors-4/#the-any-link-pseudo

const (
	// AnyLinkPassthrough passes :any-link down without changes. It is the default.
	AnyLinkPassthrough AnyLink = iota
	// AnyLinkTransform transforms :any-link selectors into selectors for both :visited and :link.
	AnyLinkTransform
)

type CalcReduction

type CalcReduction int

CalcReduction controls transform options for reducing math functions. calc(), min(), max(), and clamp() are supported. See: https://drafts.csswg.org/css-values-4/#calc-func.

const (
	// CalcReductionPassthrough passes through any math functions. It is the default.
	CalcReductionPassthrough CalcReduction = iota
	// CalcReductionReduce will attempt to reduce all math functions. If the call cannot be fully reduced, it
	// will be left.
	CalcReductionReduce
)

type CustomMediaQueries

type CustomMediaQueries int

CustomMediaQueries controls transform options for @custom-media usage, specified in CSS Media Queries Level 5. See: https://www.w3.org/TR/mediaqueries-5/#custom-mq.

const (
	// CustomMediaQueriesPassthrough passes custom media query definitions and usages through. It is the default.
	CustomMediaQueriesPassthrough CustomMediaQueries = iota
	// CustomMediaQueriesTransform will transform custom media queries when used in @media rules.
	CustomMediaQueriesTransform
)

type CustomProperties

type CustomProperties int

CustomProperties controls transform options for custom properteries (--var) and the var() function from CSS Variables Level 1. See: https://www.w3.org/TR/css-variables-1/.

const (
	// CustomPropertiesPassthrough passes variable declarations and var() down without changes. It is the default.
	CustomPropertiesPassthrough CustomProperties = iota
	// CustomPropertiesTransformRoot will transform properties defiend in :root selectors. Custom property definitions
	// under any other selectors will be ignored and passed through.
	CustomPropertiesTransformRoot
)

type ImportRules

type ImportRules int

ImportRules controls transform behavior for @imports.

const (
	// ImportRulesPassthrough passes @imports down without changes. It is the default.
	ImportRulesPassthrough ImportRules = iota
	// ImportRulesFollow passes @imports down without changes. It also follows import specifiers
	// and adds them to the compilation output.
	ImportRulesFollow ImportRules = iota
	// ImportRulesInline inlines imported content where an @import statement is seen. In this
	// version, it ignores @supports rules and meedia queries.
	ImportRulesInline
)

type MediaFeatureRanges

type MediaFeatureRanges int

MediaFeatureRanges controls transform options for feature ranges, introduced in CSS Media Queries Level 4. See: https://www.w3.org/TR/mediaqueries-4/#mq-range-context.

const (
	// MediaFeatureRangesPassthrough passes @imports down without changes. It is the default.
	MediaFeatureRangesPassthrough MediaFeatureRanges = iota
	// MediaFeatureRangesTransform transforms ranges into best-effort min- and max- values. When
	// > and < are used, we follow the guidance from https://www.w3.org/TR/mediaqueries-5/#mq-min-max and
	// use min/max with a change in .001 precision.
	MediaFeatureRangesTransform
)

type Options

Options sets options about what transforms to run. By default, no transforms are run.

Jump to

Keyboard shortcuts

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