GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - hosseinalipour/rtl-converter

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

RTL Converter

Simple way to Convert any stylesheet to RTL version

Installation

npm install rtl-converter

Motivation

Many manual converted RTL frameworks have been used and proved not to be quite flawless, for example, I couldn't find any Bootstrap RTL version that displays radio buttons correctly. This project tries to make the process flawless and automatic.

Output

Given the following stylesheet

.class {
  margin-left: 10px;
  text-align: left;
  background-color: #fff;
}

This will output
.class {
  background-color: #fff;
}

.rtl .class {
  margin-right: 10px;
}

.ltr .class {
  margin-left: 10px;
}

Usage

const rtlConverter = require('rtl-converter');
let RTLCss = rtlConverter(strCss);

to add RTL support, add class="rtl" to html tag,add direction set to rtl, for ltr you have to the the opposite.

RTL

...
<style> html {direction: rtl} </style>
</head>
<html class="rtl">
...

LTR

...
<style> html {direction: ltr} </style>
</head>
<html class="ltr">
...

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.