mzsanford / r2rb Goto Github PK
View Code? Open in Web Editor NEWA Ruby port of @ded's R2 project
Home Page: http://mzsanford.com/blog/r2rb-mirroring-css-direction
License: Other
A Ruby port of @ded's R2 project
Home Page: http://mzsanford.com/blog/r2rb-mirroring-css-direction
License: Other
So I have a Rails app with bootstrap and bootstrap customization (theme). What I want is to flip the direction for all the styles of application.css.scss
. Can I use this gem for this use case?
The following CSS is incorrectly converted, since the !important
rule needs to stay at the end:
R2.r2("div { border-radius: 2 !important}")
=> "div{border-radius:!important 2;}"
The upstream nodejs version of r2 doesn't have this same issue. It has some code to explicitly handle !important
, but I don't profess to understand how that works!
$ echo 'div { border-radius: 2 !important;}' | yarn run r2
div{border-radius:2 !important;}
I've been working on RTL support on OpenStreetMap, and I was puzzled to see a case on their About page where one sprite-icon is visible, but the others are not (you can see this if your browser is set to prefer Arabic).
The visible sprite has the CSS set background-position: -45px -160px
The invisible sprites have CSS values set to background-position: right 0px -80px
which is not accepted by Firefox or Chrome. I think that background-position: right {x} top {y}
would be valid. The one visible sprite has a negative x-value, so your regex isn't noticing it.
In my case I am looking at sprites, so I would rather not have them shifted left/right. I'll ask OSM to use 0 instead of 0px
for now, but what would be a good long-term solution for other people using sprites?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.