Comments (3)
Why not just use /* @NoFlip */ above the selector?
from node-cssjanus.
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.
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)
- Any way to deal with negative `text-indent`? HOT 2
- Avoid flipping "ltr" or "left" in a data URI HOT 1
- Support flipping mutiple values under a text-shadow or border-shadow rule HOT 2
- Release v1.3.0 HOT 1
- Getting Error "TypeError: cssjanus.transform is not a function" HOT 1
- Translate RegExp's are too relaxed which can result in skipping replacements HOT 1
- How to use this package with "create-react-app" HOT 1
- Request: VS Code extension HOT 1
- Flip transform: scaleX(-1) HOT 2
- end event listener registration error HOT 2
- does not flip when a semicolon is not present at the end of a shorthand rule HOT 3
- Does not flip shorthand properties with expressions in them HOT 3
- The demo is broken HOT 1
- /* @noflip */ doesn't work. HOT 3
- CSSJanus changes right to left in selectors when using the general sibling combinator
- Just wanted to sat thank you HOT 1
- Inconsistent flipping behavior breaks custom CSS properties HOT 1
- Tilde (~) subsequent-sibling combinator causes 'left' in class names to switch to 'right' HOT 2
- License has generic copyright HOT 2
- Flipping for `background` mistakes percentages in color functions for background-position HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-cssjanus.