Header menu logo Sutil

Styling Module

Support CSS styling

Functions and values

Function or value Description

addGlobalStyleSheet doc styleSheet

Full Usage: addGlobalStyleSheet doc styleSheet

Parameters:
Returns: unit -> unit
doc : Document
styleSheet : StyleSheetDefinitions
Returns: unit -> unit

addStyleAttr el name value

Full Usage: addStyleAttr el name value

Parameters:
el : HTMLElement
name : string
value : string

adoptStyleSheet styleSheet

Full Usage: adoptStyleSheet styleSheet

Parameters:
Returns: SutilElement
styleSheet : StyleSheetDefinitions
Returns: SutilElement

emitStyleAttr keyValues

Full Usage: emitStyleAttr keyValues

Parameters:
    keyValues : (string * string) array

Returns: string
keyValues : (string * string) array
Returns: string

entryToText classMap styleName _arg1

Full Usage: entryToText classMap styleName _arg1

Parameters:
Returns: string
classMap : Map<string, StyleRule>
styleName : string
_arg1 : StyleSheetDefinition
Returns: string

filterStyleAttr name style

Full Usage: filterStyleAttr name style

Parameters:
    name : string
    style : string

Returns: string
name : string
style : string
Returns: string

getClassMap styleSheet

Full Usage: getClassMap styleSheet

Parameters:
Returns: Map<string, StyleRule>
styleSheet : StyleSheetDefinition list
Returns: Map<string, StyleRule>

getStyleAttr el

Full Usage: getStyleAttr el

Parameters:
Returns: string
el : HTMLElement
Returns: string

includeRule name

Full Usage: includeRule name

Parameters:
    name : string

Returns: string * obj
name : string
Returns: string * obj

isGlobal s

Full Usage: isGlobal s

Parameters:
    s : string

Returns: bool
s : string
Returns: bool

isPseudo s

Full Usage: isPseudo s

Parameters:
    s : string

Returns: bool
s : string
Returns: bool

keyframe startAt style

Full Usage: keyframe startAt style

Parameters:
    startAt : int
    style : (string * obj) list

Returns: KeyFrame

Define a CSS keyframe as part of a keyframes sequence See also: Styling.keyframes

startAt : int
style : (string * obj) list
Returns: KeyFrame

keyframes name frames

Full Usage: keyframes name frames

Parameters:
Returns: StyleSheetDefinition

Define a CSS keyframes sequence

name : string
frames : KeyFrame list
Returns: StyleSheetDefinition
Example

    keyframes "dashdraw" [
         keyframe 0 [
             Css.custom("stroke-dashoffset", "10")
         ]
     ]

mapPseudo f s

Full Usage: mapPseudo f s

Parameters:
    f : string -> string
    s : string

Returns: string
f : string -> string
s : string
Returns: string

mediaRuleToText classMap styleName rule

Full Usage: mediaRuleToText classMap styleName rule

Parameters:
Returns: string
classMap : Map<string, StyleRule>
styleName : string
rule : MediaRule
Returns: string

newStyleElement doc

Full Usage: newStyleElement doc

Parameters:
Returns: HTMLElement
doc : Document
Returns: HTMLElement

parseStyleAttr style

Full Usage: parseStyleAttr style

Parameters:
    style : string

Returns: (string * string)[]
style : string
Returns: (string * string)[]

removeStyleAttr el name

Full Usage: removeStyleAttr el name

Parameters:
el : HTMLElement
name : string

rule selector style

Full Usage: rule selector style

Parameters:
    selector : string
    style : (string * obj) list

Returns: StyleSheetDefinition

Define a CSS styling rule

selector : string
style : (string * obj) list
Returns: StyleSheetDefinition

specifySelector styleName selectors

Full Usage: specifySelector styleName selectors

Parameters:
    styleName : string
    selectors : string

Returns: string
styleName : string
selectors : string
Returns: string

splitMapJoin delim f s

Full Usage: splitMapJoin delim f s

Parameters:
    delim : char
    f : string -> string
    s : string

Returns: string
delim : char
f : string -> string
s : string
Returns: string

withCustomRules rules element

Full Usage: withCustomRules rules element

Parameters:
Returns: SutilElement

Support for the custom rules "sutil-add-class". They're clever but also difficult to understand. See their usage in Sutil.Bulma

rules : StyleSheetDefinitions
element : SutilElement
Returns: SutilElement

withStyle styleSheet element

Full Usage: withStyle styleSheet element

Parameters:
Returns: SutilElement
styleSheet : StyleSheetDefinitions
element : SutilElement
Returns: SutilElement

Type extensions

Type extension Description

this.adoptedStyleSheets ()

Full Usage: this.adoptedStyleSheets ()

Parameters:
    () : unit

Returns: CSSStyleSheet array

returns this DocumentOrShadow adopted stylesheets or sets them. https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets

Extended Type: Node

() : unit
Returns: CSSStyleSheet array

this.adoptedStyleSheets

Full Usage: this.adoptedStyleSheets

Returns: CSSStyleSheet array
Modifiers: abstract

returns this DocumentOrShadow adopted stylesheets or sets them. https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets

Extended Type: Node

Returns: CSSStyleSheet array

this.adoptedStyleSheets v

Full Usage: this.adoptedStyleSheets v

Parameters:

returns this DocumentOrShadow adopted stylesheets or sets them. https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets

Extended Type: Node

v : CSSStyleSheet array

this.adoptedStyleSheets ()

Full Usage: this.adoptedStyleSheets ()

Modifiers: abstract

returns this DocumentOrShadow adopted stylesheets or sets them. https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets

Extended Type: Node

this.getRootNode ()

Full Usage: this.getRootNode ()

Parameters:
    () : unit

Returns: Node

Extended Type: Node

() : unit
Returns: Node

Type something to start searching.