Skip to main content

Convert CSS physical properties to logical

Project description

physical2logical

Convert CSS physical properties to logical.

Converts margins, padding, and borders to logical values, allowing RTL and vertical languages to show correctly.

Install

pip install physical2logical

Usage

usage: css2logical [-h] [-r | --recursive | --no-recursive] [-u | --update | --no-update] [-a | --analyze | --no-analyze] [-f FILENAME]  [-l LOG] [-p PATTERN] source

Convert CSS physical properties to logical

positional arguments:
  source                Path to source directory or one file. Required

optional arguments:
  -h, --help            show this help message and exit
  -r, --recursive, --no-recursive
                        Recursive process of all files from source directory. (default: True)
  -u, --update, --no-update
                        Update files. (default: False)
  -a, --analyze, --no-analyze
                        Dry Run - Create a report with all changes (without actual source file changes). (default: False)
  -f FILENAME, --filename FILENAME
                        Path to file where to save reports (used only with -a | --analyze flag). (default: "./report.html")
  -l LOG, --log LOG     Log Level: All: 0, Debug: 10, Info: 20, Warning: 30, Error: 40 (default: 0)
  -p PATTERN, --pattern PATTERN
                        Comma separated list of glob patterns (default: '*.scss, *.css')

Based on https://gist.github.com/nyurik/d438cb56a9059a0660ce4176ef94576f

Report

report.png

Example

css2logical -u ./src/scss/

logs.png

physical2logical-all-files.png

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

physical2logical-2.3.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

physical2logical-2.3.1-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file physical2logical-2.3.1.tar.gz.

File metadata

  • Download URL: physical2logical-2.3.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

File hashes

Hashes for physical2logical-2.3.1.tar.gz
Algorithm Hash digest
SHA256 bb7285c8b795c97e22275bc19d441fca140b8ce6f77b21a5b02747e0d57d538c
MD5 8bc47feca165702667064d4d15303029
BLAKE2b-256 e8032e4eccdb9c52ba975cfc03ba63c933f889f687845317eb2e3b4897845544

See more details on using hashes here.

File details

Details for the file physical2logical-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: physical2logical-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

File hashes

Hashes for physical2logical-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d76223cd1caf7f0edaa0f8735e55104bcd8e8459d9b0bcd203e24227be99fcdc
MD5 4b3d9de5e486e11f7c60b326b839e817
BLAKE2b-256 306a5a346415cec376bda7369badb25d28fe12659b0f9f7014062435b63445c1

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