:tocdepth: 3 :py:mod:`gws.lib.style.parser` ============================== .. py:module:: gws.lib.style.parser .. autoapi-nested-parse:: Style parser. **Source code:** :source:`gws.lib.style.parser` Module Contents --------------- .. py:class:: Options(*args, **kwargs) Bases: :py:obj:`gws.Data` Options about an icon object .. py:attribute:: imageDirs :type: list[str] Paths to directories in which parsing is allowed .. py:attribute:: strict :type: bool Indicates whether Exceptions should be raised. .. py:attribute:: trusted :type: bool Indicates whether icon is created by us or someone else. .. py:function:: parse_dict(d: dict, opts: Options) -> dict Adds a dictionary describing style features to a default dictionary. :param d: A dictionary with new features. :param opts: Dictionary options. :returns: New dictionary of features. :raises ``Exception``: If an invalid css property or value is used. .. py:function:: parse_text(text: str, opts: Options) -> dict Parses a text of features to a dict containing the new features. :param text: Options String formatted like ``'a:b;c:d;...'`` :param opts: Text options. :returns: New dictionary of features.