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_sqss(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.0.tar.gz (8.2 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.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pqss-0.0.0.tar.gz
  • Upload date:
  • Size: 8.2 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.0.tar.gz
Algorithm Hash digest
SHA256 f8e24b229480eb86eb23f89a13191de48b71946328cb743c0eb49ae617d9d628
MD5 bfce4d3ba4af70c969149fe73fd566d6
BLAKE2b-256 a514d5063fbf6034f7245358875da307d66b7e6a3bedf4b9833bb18e5935f00e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pqss-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12662972bf199f38ed9eca0e1656def62ce451beb5fb7c33219acdf42e5cb8b5
MD5 7882517894f443fe9985caeb415d7757
BLAKE2b-256 6eb6abc3524b5082df5246d80186fffa6b83f78cf153ff92432666531a42b388

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