Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muayyad-alsadi/RtlCss
Right-to-left override CSS Generator
https://github.com/muayyad-alsadi/RtlCss
Last synced: about 2 months ago
JSON representation
Right-to-left override CSS Generator
- Host: GitHub
- URL: https://github.com/muayyad-alsadi/RtlCss
- Owner: muayyad-alsadi
- License: apache-2.0
- Created: 2014-08-26T14:00:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-30T00:10:01.000Z (over 8 years ago)
- Last Synced: 2024-10-18T00:56:06.929Z (about 2 months ago)
- Language: Python
- Size: 16.6 KB
- Stars: 7
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jordan - RtlCss - Right-to-left override CSS Generator (Frontend)
README
# Right-to-left override CSS Generator
Copyright (c) 2014 Vision Advanced Systems
## Background
Unlike [my other script!](https://github.com/muayyad-alsadi/bootstrap-rtl/blob/c34e3ceac05bc7b134bde5a8ae4bfad7e7b59831/gen-rtl.sh)
which generates a replacement css file to be used instead of the original one. This script generate a CSS
that is to be included beside/after the original one because it only override RTL specific styles.## How it works
given a CSS file like this
```
#main {background:white;text-align:left;}
.fancy-side {float:right;width:50%;}
.pretty-box {left:4px;width:50%;position:absolute;margin-right:20px;}
```the output would be something like
```
#main {text-align:right;}
.fancy-side {float:left;}
.pretty-box {right:4px;left:auto;margin-left:20px;margin-right:0}
```## Usage
```
RtlCss.py file1.css file2.min.css
```given `file1.css` it will generate `file1.rtl.css`
given `file2.min.css` it will generate `file2.rtl.css` (notice that it ommit `min`)