Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lightningcss

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightningcss

Python bindings for lightningcss.

  • 0.2.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

PyPI - Project Version PyPI - Python Version GitHub - Project License

python-lightningcss

python-lightningcss offers PyO3 bindings to the lightningcss library. Presently only a subset of functionality is exposed, intended for integration into a Python-centric web application rather than a JavaScript-based workflow. If the latter is needed, consider using the official npm lightningcss module, parcel, or webpack instead.

Installation

python-lightningcss includes wheels which can be installed for most platforms using pip: pip install lightningcss.

Alternatively, python-lightningcss may be installed directly from source: pip install git+https://github.com/pydsigner/python-lightningcss. This will require that the Rust toolchain be installed.

Usage

import lightningcss

parser_flags = lightningcss.calc_parser_flags(nesting=True)
input_css = """
a {
    padding-left: 0;
    padding-right: 0;
    padding-top: 5px;
    padding-bottom: 5px;
}
"""
output_css = lightningcss.process_stylesheet(input_css, filename="abc.css", browsers_list=['defaults'])

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc