Skip to content

Styles Syntaxs ‐ Lumi

Fame edited this page Jan 27, 2024 · 1 revision

Styles - syntax

In GLC styles file, the information is organized as a JSON data.

Syntax base:

{
...
"target" {
"proriety-1" : "stringValue",
"proriety-2" : 10,
...
"target-child" {
...
}
}
}

Special characters:

In the style process, is important to know the type of element you're targeting. In CSS scripts, the programmer can use keywords like div to referenciate a DIV html tag, a # ti referenciate a element ID or a . to referenciate a class.
This concept also is used by GLC's style language, but with a little modifications:

<ul>
    <li>
        The <span class="codeLine">@</span> Character have to be used before the identifier
        to reference a HTML tag. <br/>
        Ex.: <span class="codeLine">"@div"</span> will reference all DIV tags in the document.
    </li>
    <br/>
    <li>
        The <span class="codeLine">#</span> Character have to be used before the identifier
        to reference a ID of a tag. <br/>
        Ex.: <span class="codeLine">"#MyUniqueId"</span> will reference the element with id
        "MyUniqueId".
    </li>
    <br/>
    <li>
        The <span class="codeLine">.</span> Character have to be used before the identifier
        to reference a CLASS of a tag. <br/>
        Ex.: <span class="codeLine">".SomeClass"</span> will reference all the elements with
        "SomeClass" as one of it classes.
    </li>
    <br/>
    <li>
        Any parameter witout a identifier character will be headed as an parameter. <br/>
        Ex.: <span class="codeLine">"background-color" : "black"</span> will apply the color
        black to the element that it's encapsulated.
    </li>
</ul>
Clone this wiki locally