Giter VIP home page Giter VIP logo

flipcss's People

Contributors

lastorset avatar oyvindeh avatar oyvindur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flipcss's Issues

doesnt flip when there is a dot in style value

amazing stuff by the way

just thought id highlight a bug...

this "padding: 0 2em 0 3em" will flip to this "padding: 0 3em 0 2em" perfectly fine.

However...
this "padding: 0 2.5em 0 3.5em" will not flip

seems that adding a "." to the padding value stops it from working

Right/Left is flipped even in URL

Hi, I think I found a bug. If you run this code:

flipcss

You will get flipped right/left in url adresses. But you couldn't be sure that users of this library have RTL images of every image.

I think this should be optional or unsupported feature.

"Left" and "right" keywords matched when substrings

The "left" and "right" keywords are always matched. This is useful when they are part of for example a filename ("arrow-left.png"). However, it is not so usefull when you have a class name containing one of them (e.g. ".copyright").

Suggestion: Check if "left"/"right" is part of a word, or separated somehow. Separators could be dots, hyphens, underscores, whitespace, etc. Swap if there is a separator, but leave if there is not.

Clean-only option for command line

Used as a library, rtl/ltr-only rules can be cleaned without flipping. This is currently not possible from command line. This should be added.

Refactor tests

Tests should be refactored to not rely on fixtures (except for the functional tests).

Reason: If a test fails, it is difficult to find out exactly what makes it break. Close inspection of the input, output and expected output is needed. By adding one test for each case to be tested, you can spot what makes it break immediately.

No way how to swap pseudo elements from API

Hi, you've added support for swapping pseudo elements in #8 issue, but there is no way how to set this option to true because current API signature is

flip(String css, Boolean warnings)

Support RTL>LTR

The library should support RTL>LTR conversion, in addition to LTR>RTL.

Currently, "direction: rtl" is always added when calling flip(), breaking support for RTL>LTR. This can be fixed by adding a parameter to flip(), telling the direction and then adding direction rule to body based on that. If no direction is given, it should still flip.

As there is already an optional boolean parameter about warnings, the best solution is probably to accept an options JSON object to flip(), like so:

options = { warnings: true, direction: "ltr"}; # both warnings and direction are optional flip(options)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.