Giter Club home page Giter Club logo

Comments (3)

trevorparscal avatar trevorparscal commented on June 14, 2024

Why not just use /* @NoFlip */ above the selector?

from node-cssjanus.

dralshehri avatar dralshehri commented on June 14, 2024

You're right but I'm thinking about a better solution.

Forked already and working on adding that feature and more including less and sass support, and better testing, in addition to fixing some small bugs like that related to !important declaration in border-radius and others...

Wait for a PR in March 😉

from node-cssjanus.

Krinkle avatar Krinkle commented on June 14, 2024

From the initial description it sounds like you're under the impression that pull-left would be flipped, but not pull-right. However, selectors are preserved in CSSJanus regardless of which directionality they are about.

As such, @noflip seems appropiate.

Changing directionality within the selectors seems undesirable as this would require a matching change in HTML content - which we want to avoid, by design.

If you do wish these kinds of rules to be flipped, the content to be affected, and the class names to make sense, I'd recommend renaming the classes to something more semantic by using directionality-neutral terms like "start" or "end".

This also matches how other CSS properties work internally. Such as the native default for text-align (which is start, not left), with a matching value of end for the opposite direction. See also the flex-start and flex-end values for the justify-content property from the CSS Flexbox features. These features work in different directions (left-to-right and right-to-left, but also top-to-bottom).

from node-cssjanus.

Related Issues (20)

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.