Skip to content

Commit

Permalink
update 1.1
Browse files Browse the repository at this point in the history
updated README.md
formatted code
added new license file (MIT License)
  • Loading branch information
penobit committed Jul 12, 2021
1 parent 37b93af commit 90542ea
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 22 deletions.
19 changes: 0 additions & 19 deletions LICENSE

This file was deleted.

9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# MIT License

Copyright (c) 2020 Penobit <info@penobit.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
62 changes: 60 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,60 @@
# CSSFlip
====================
# CSS Flip

[![Build Status](https://travis-ci.org/Penobit/css-flip.svg?branch=master)](https://travis-ci.org/Penobit/css-flip) [![Latest Stable Version](https://img.shields.io/packagist/v/Penobit/css-flip.svg)](https://packagist.org/packages/penobit/css-flip) [![Total Downloads](https://img.shields.io/packagist/dt/Penobit/css-flip.svg)](https://packagist.org/packages/penobit/css-flip) [![Downloads Month](https://img.shields.io/packagist/dm/Penobit/css-flip.svg)](https://packagist.org/packages/penobit/css-flip) [![Petreon donation](https://img.shields.io/badge/patreon-donate-orange.svg)](https://www.patreon.com/penobit) [![PayPal donation](https://img.shields.io/badge/paypal-donate-blue.svg)](https://paypal.me/penobit)

Flip css/scss direction from ltr to rtl or rtl to ltr with single line php code!

---

- [Installation](#installation)
- [Usage](#usage)
## Installation

Install this package via [Composer](https://getcomposer.org/).

```
composer require penobit/css-flip
```

You can also download latest release from Github and include `src/CSSFlip.php` manually but i recommend using composer to stay up to date and easier install and usage

## Usage

Create CSSFlip object

```php
use Penobit\CSSFlip\CSSFlip;

$cssFlip = new CSSFlip();
$cssCode = <<<CSS
body{
direction: ltr;
}
div{
text-align:left;
margin-left: 20px;
margin-right: 2rem;
}
span{
padding: 10px 15px 20px 25px;
}
CSS;

$flippedCssCode = $cssFlip->transform($cssCode);

/*
# Output of above code will be
body{
direction: rtl;
}
div{
text-align:right;
margin-right: 20px;
margin-left: 2rem;
}
span{
padding: 10px 15px 20px 25px;
padding: 10px 25px 20px 15px;
}
*/
```
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.1

0 comments on commit 90542ea

Please sign in to comment.