Skip to main content

PQSS is a dynamic language for qss, like scss for css.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pqss-0.0.8.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pqss-0.0.8-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file pqss-0.0.8.tar.gz.

File metadata

  • Download URL: pqss-0.0.8.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pqss-0.0.8.tar.gz
Algorithm Hash digest
SHA256 bd481aca30aea9a190ef770e3ed19ed45543f20e2aa1944a07a28c1ea6c6d97b
MD5 252b231b174f64abb466a420fb09be5b
BLAKE2b-256 c97e13e84f171abb48830e96b96e241d6d8d8985856c26d76d79d853af759b42

See more details on using hashes here.

File details

Details for the file pqss-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: pqss-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pqss-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c00df27fd6db0dd0fe03d2d4e2d85f86540d91eed6015290945e504594c22785
MD5 f59c5a312146da562b41836bbf841247
BLAKE2b-256 8556eb9f0e9f43e363c1974bfb01b1b3ef0058afdc67d6d0c1590880df7f1fc7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page