Giter VIP home page Giter VIP logo

Comments (7)

noprompt avatar noprompt commented on May 17, 2024

No. The reason I had it commented out was to prevent warnings with (require '[garden.units :refer :all]) and honestly I just forgot to uncomment it. It's probably perfectly fine to uncomment it since I would (hopefully) assume people know how to write Clojure. :-)

While on the subject, the rem unit is not supported in some older browsers such as IE8 which is still widely used AFAIK. I'm wondering if Garden should be involved in helping with that at all? That is, perhaps allowing the user to specify the default rem value in px and have the compiler emit px instead of rem for that value. It seems tedious to have to worry about fallbacks. What do you think?

from garden.

noprompt avatar noprompt commented on May 17, 2024

@jeluard I'm adding you to collaborators list so you don't have to maintain a separate fork. :-)

from garden.

jeluard avatar jeluard commented on May 17, 2024

Thanks! I promise I won't do bad things :) Now I will probably go ahead and make this simple change after some tests.

from garden.

noprompt avatar noprompt commented on May 17, 2024

Don't worry man, I trust you know what you're doing! Just keep me in the loop. 👍

from garden.

jeluard avatar jeluard commented on May 17, 2024

Having sane fallback whenever possible seems like a good idea. Is there some weird trick in this case? Or are you thinking always replacing rem by px?

ClojureScript support (assuming generation is done browser side) definitively allows that kind of things as you can directly check if a property is supported (maybe trickier to check for units support).

from garden.

noprompt avatar noprompt commented on May 17, 2024

Actually, it appears that may be a bad idea. Converting rem transparently to px will definitely result in issues where the width of something should be dynamic as in border-width. You can see an example of what I'm talking about here. If you change the display so the output is on the left and then resize it horizontally you can see the border width actually shrinks/grows. You can also see there is some JavaScript code in the example which demonstrates how one might detect the support of a unit.

from garden.

jeluard avatar jeluard commented on May 17, 2024

Thanks for the link!

from garden.

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.