From 5a4a306255430afa370b626de1c9c46f3f99ada3 Mon Sep 17 00:00:00 2001 From: Burer Date: Wed, 27 Aug 2025 09:58:20 +0300 Subject: [PATCH] feat/flask: change scss compiler to Python lib --- app.py | 8 ++++++-- static/style.scss | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 6206459..f952954 100644 --- a/app.py +++ b/app.py @@ -1,7 +1,9 @@ -from os import path, listdir, system +from os import path, listdir from datetime import date from configparser import ConfigParser +import sass + from flask import ( Flask, redirect, @@ -19,7 +21,9 @@ from flask import ( app = Flask(__name__) if app.debug: - system("sass static/style.scss static/style.css") + css = sass.compile(filename="static/style.scss") + with open("static/style.css", "w", encoding="utf-8") as f: + f.write(css) # ---------- LOCALES FUNCTIONS ----------------------------------------------- diff --git a/static/style.scss b/static/style.scss index 8ff4c6e..a5ccac0 100644 --- a/static/style.scss +++ b/static/style.scss @@ -127,7 +127,7 @@ body { background: rgba(254, 255, 255, 1); border: 1px solid #c0b9c491; border-radius: 4px; - box-shadow: rgb(28 26 40 / 12%) 0px 4px 4px -2px; + box-shadow: rgba(28, 26, 40, 0.12) 0 4px 4px -2px; margin: 2em auto; max-width: 910px; padding: 2em; @@ -416,7 +416,7 @@ iframe { #banner { max-width: calc(100% - 2px); margin: 1px 0 1em; - outline: 1px solid rgb(227 227 227);; + outline: 1px solid rgb(227, 227, 227); table td { &:first-child,