-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more options as false
by default
#3
Comments
I've seen many converters and all of them fail in automatically providing an RTL variant that is usable with the same html markup (bi-lingual web sites/apps). Up to now, the default options worked so great for me in many projects, and I believe they work for bootstrap too (see this branch), clone it and run the docs locally. and see for your self! Its auto flipped using rtlcss and without touching the html (thanks to
Its unlikely to write a CSS rule having no horizontal significance and name it Since CSS is written in English, I think i18n friendly doesn't apply here. Although rtlcss is highly customizable and you can inject your own logic but I find it useful in case you want to add |
Without knowing the HTML, flipping the class names based on relatively fragile information can be a problem. I don't think we have a use case for it yet at Twitter. What we rely on is using the equivalent of the |
Can you provide a single example where my approach would fail ?
Can you clarify with an example ?
I'm using my flipped bootstrap and there is nothing broken! I would appreciate it if you can provide an example. I feel one of us is missing something here! |
Any existing code base with urls or classes that contain the strings you're swapping. If it wasn't authored with that expectation, there will be unintentional changes. e.g., maybe there's no image with the new path, or no intent to replace the image, or no intent to rename the class because it will be unchanged in the HTML. There's a pretty good chance it would break things for our RTL stylesheets. Not saying no one will ever use the feature, but it should be off by default IMO.
.icon-chevronLeft:before { content: "\f00" /*rtl:\f10*/; } |
I got your point, but still it goes both ways, and I think its a low probability. The replacement is not that aggressive, by default word boundaries are respected. In your example Actually, Icon rules in general are the reason behind I believe a successful flipping requires good understanding of the tool options, The author must compare and validate the generated CSS, Then apply necessary directives to ensure the output is as excpected. |
@necolas v2.0 is out with more options as |
This plugin is quite aggressive in what in changes in selectors and urls. I think almost all the options should be
false
by default, especiallyswapLeftRightInUrl
,swapLtrRtlInUrl
,swapWestEastInUrl
, andautoRename
because you have to intentionally agree to those conventions for it to work for you. I don't think we'd have use forautoRename
at Twitter; that one seems particularly tied to one way of writing CSS.It might be nice to merge the url options into a single one that takes a map of strings to swap (i18n friendly too, as people can define their own non-english words if necessary).
The text was updated successfully, but these errors were encountered: