gws.lib.style.core

Source code: gws.lib.style.core

Module Contents

class gws.lib.style.core.Config(*args, **kwargs)

Bases: gws.Config

Feature style

cssSelector: str | None

CSS selector

text: str | None

raw style content

values: dict | None

style values

gws.lib.style.core.from_config(cfg: gws.Config, opts: gws.lib.style.parser.Options = None) Object

Creates a css style object from a configuration.

Parameters:
  • cfg – A configuration.

  • opts – Configuration options.

Returns:

A css style object.

gws.lib.style.core.from_dict(d: dict, opts: gws.lib.style.parser.Options = None) Object

Creates a css style object from a dictionary.

Parameters:
  • d – A dictionary.

  • opts – Dictionary options.

Returns:

A css style object.

gws.lib.style.core.from_props(props: gws.Props, opts: gws.lib.style.parser.Options = None) Object

Creates a css style object from properties.

Parameters:
  • props – Properties.

  • opts – Property Options.

Returns:

A css style object.

class gws.lib.style.core.Object(selector, text, values)

Bases: gws.Style

CSS Style object.

props(user)
class gws.lib.style.core.Props(*args, **kwargs)

Bases: gws.Props

Object properties.

cssSelector: str | None

CSS selector

values: dict | None

Style values