Skip to content

LYT0628/pqss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PQSS

PQSS is a dynamic language for qss, like scss for css. For more details, see official site: Sqss | Dynamic Lagrange for qss.

Installation

  pip install pqss

or download with Conda

    conda install pqss

Compile code in Commandline:

pqss -f style.pqss -o style.qss

or in python:

import pqss

if __name__ == "__main__":
    source = """
        $a : 5; 
        MyClass { 
            width: $a;
            height: $a;
        }
    """
    qss = pqss.compile_pqss(source)
    print(qss)

Tutorial

Comment

// comment

or multiline

/*
 * This is comment for sqss
*/

Variable

$a : 5; 
QOushButton { 
    width: $a;
    height: $a; 
}

Embed Ruleset

QMainWindow { 
    width: 600;
    height: 481; 
    Widget {
        background-color: gray;
    }
}

Parent Reference

QOushButton { 
    width: 20;
    height: 20;
    &: hover{
        background-color: gray;
    } 
}

Embed Property

QPushButton{
    borlder{
        width: 5;
        color: red;
        top{
            width: 3;
            color: yellow;
        }
    }
}

Mixin

@mixin fn {
    background: gray;
}
QOushButton { 
    @include fn;
}

with arguments:

@mixin fn($va0, $var1) {
    background: $var0;
    color: $var1;
}
QOushButton { 
    @include fn(gray, white);
}

Extend

QPushButton { 
    width: 25px;
    height: 25px;
    color: white;
}
DisabledButton {
    @extend QPushButton
    background-color: red;
}

Placeholder Selector

%error { 
    width: 25px;
    height: 25px;
    color: white;
}
DisabledButton {
    @extend %error
    background-color: red;
}

Import

@import "./main.sqss"

Other Resources:

Report Bug

Get Involved

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages