Skip to main content

Sass/SCSS compile host using Dart Sass

Project description

Embedded Sass Host for Python.

Overview

This is Python project to compile Sass/SCSS using Dart Sass <https://sass-lang.com/dart-sass/> that is primary implementation of Sass using Dart runtime.

Simple usage

Install:

pip install sass-embedded

Source:

@use "sass:list";
@use "sass:color";

$font-stack: Helvetica, Arial;
$primary-color: #333;

body {
  $font-stack: list.append($font-stack, sans-serif);
  font: $font-stack;
}

a {
  color: $primary-color;

  &:hover{
    color: color.scale($primary-color, $lightness: 20%);
  }
}

@debug $font-stack;

Run:

from pathlib import Path
from sass_embedded import compile_file

compile_file(Path("style.scss"))

Output:

body {
  font: Helvetica, Arial, sans-serif;
}

a {
  color: #333;
}
a:hover {
  color: rgb(91.8, 91.8, 91.8);
}

Motivation

I develop sphinx-revealjs that is Python Project to generate HTML presentation from reStructuredText or Markdown.

Reveal.js uses Sass to create presentation themes, and this uses sass:color module since v5.2.0. But sphinxcontrib-sass does not compile themes, because this module is not supported by LibSass.

To resolve it, I am developing optional extension optimized sphinx-revealjs. Concurrently I will develop generic project for multiple usecases.

This is the side of “generic project”.

Project goal

Final goal is to have features as same as other “Sass Embedded” libraries.

But I will split some steps for it.

First goal

Works as compile Sass/SCSS with subprocess-based actions.

  • Provide single entrypoint to compile sources using Dart Sass native executable.

  • Generate Dart Sass bundled bdist files every platforms.

Second goal

Works as “Sass Embedded Host for Python”.

Third goal

Works as alternative to libsass-python.

  • Support all api of libsass-python using Dart Sass native executable.

Support

This project supports only Python 3.9+.

License

I plan for Apache License 2.0.

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

sass_embedded-0.1.4.tar.gz (93.0 kB view details)

Uploaded Source

Built Distributions

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

sass_embedded-0.1.4-py3-none-win_arm64.whl (4.3 MB view details)

Uploaded Python 3Windows ARM64

sass_embedded-0.1.4-py3-none-win_amd64.whl (4.4 MB view details)

Uploaded Python 3Windows x86-64

sass_embedded-0.1.4-py3-none-manylinux_2_17_x86_64.whl (4.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

sass_embedded-0.1.4-py3-none-manylinux_2_17_aarch64.whl (4.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

sass_embedded-0.1.4-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file sass_embedded-0.1.4.tar.gz.

File metadata

  • Download URL: sass_embedded-0.1.4.tar.gz
  • Upload date:
  • Size: 93.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sass_embedded-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f6668fb562ccfe5cd52251ff078feab58f0b82b0089309314e1baf668039b313
MD5 977137d846701630c2145bcb140eb264
BLAKE2b-256 8d92b51bc9cb86042631581fd68e8769530e80b9a939db6763ae34e87babb53c

See more details on using hashes here.

Provenance

The following attestation bundles were made for sass_embedded-0.1.4.tar.gz:

Publisher: release.yaml on attakei/sass-embedded-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sass_embedded-0.1.4-py3-none-win_arm64.whl.

File metadata

File hashes

Hashes for sass_embedded-0.1.4-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 f8760722d02ca9ccaf89b763be28625503e8a97a2d18ff5af7b0822390fdeeeb
MD5 320a933842bdaae40b3ae14e1a3fc135
BLAKE2b-256 4f6fe65c4215fa110223d32ba2d226fec2e8ff876c81480d61ad6513c9419a64

See more details on using hashes here.

Provenance

The following attestation bundles were made for sass_embedded-0.1.4-py3-none-win_arm64.whl:

Publisher: release.yaml on attakei/sass-embedded-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sass_embedded-0.1.4-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for sass_embedded-0.1.4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 00457c329a9f15e9419785d1064638022bd2e50460fd165d8b284ad3ef4a6b9f
MD5 21face4d8277464d1393e92f215a93e1
BLAKE2b-256 ae812c4d9d566c8af76cb33c16e6db2a78d7f88364a48bdd1bca3e4b4cab188e

See more details on using hashes here.

Provenance

The following attestation bundles were made for sass_embedded-0.1.4-py3-none-win_amd64.whl:

Publisher: release.yaml on attakei/sass-embedded-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sass_embedded-0.1.4-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for sass_embedded-0.1.4-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ae2cfcb5b5ff2554b71b443ce8371234e05056a209914d0ab231c4f44a72c83f
MD5 c8501e8a9841aa3af7adee3d08c9e2a5
BLAKE2b-256 f91d8f71b8126b8b259efcdc11f724fa616a549a2bce6c475fa6ff4657502b16

See more details on using hashes here.

Provenance

The following attestation bundles were made for sass_embedded-0.1.4-py3-none-manylinux_2_17_x86_64.whl:

Publisher: release.yaml on attakei/sass-embedded-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sass_embedded-0.1.4-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for sass_embedded-0.1.4-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 ab3bc54e26171d4a08cf54ef2f591572babab0fc762fd28f00d4a1f74521196a
MD5 0496dfb69ea9735099f1567c2ee66688
BLAKE2b-256 494826216b849468edd3ad76fed43a3530fdf0d47488c2f0ba81b6403938e147

See more details on using hashes here.

Provenance

The following attestation bundles were made for sass_embedded-0.1.4-py3-none-manylinux_2_17_aarch64.whl:

Publisher: release.yaml on attakei/sass-embedded-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sass_embedded-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: sass_embedded-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sass_embedded-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 50b64bb4dafa5a01ccec1ccce7d27fb9b4c60c03f128c790decbc907852c6b21
MD5 d860da99d3cdd4b3fa82eb2fd48f7612
BLAKE2b-256 2b106e3efe74c0b776ccd0053cf9385079f91c6ba77d80b3dd336037270f05c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for sass_embedded-0.1.4-py3-none-any.whl:

Publisher: release.yaml on attakei/sass-embedded-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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