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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
pqss-0.0.8-py3-none-any.whl
(26.2 kB
view hashes)