Coder Social home page Coder Social logo

r2rb's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

r2rb's Issues

Invalid CSS generated when using !important rules

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;}

Invalid background-position value created

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?

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.