Giter VIP home page Giter VIP logo

Comments (5)

eneroth avatar eneroth commented on May 18, 2024

Nice!

They should be unique within the namespace, so how about using keywords? The less string processing the better :-)

What about naming conventions? Should it be :alice-blue (Clojure naming convention" or :aliceblue?

from garden.

danneu avatar danneu commented on May 18, 2024

Map lookup is pretty trivial, and either way Garden has to convert :blue, "blue", and 'blue into a commonform key. But yeah they probably might as well be keywords.

Since those colors map to literal CSS values, it would be confusing if people had to guess whether it's :sea-shell or :seashell when they already know what the browser expects.

from garden.

eneroth avatar eneroth commented on May 18, 2024

Oh yes, I realize this is much more of a form thing than a performance thing. Keywords could have some fringe benefits though, being that they are functions in relation to maps.

I think you're right with regards to the naming. Being a DSL for CSS, it's better to keep naming aligned with CSS.

from garden.

noprompt avatar noprompt commented on May 18, 2024

So this is one of those things I definitely thought about while working on the color namespace. The reason I left it out was because I wasn't sure how best to handle the situation.

Perhaps these colors could be defined in the color namespace and the map could reference them. A few things might need to be altered to get something like (+ :red :blue) working though.

In general the color namespace definitely needs some love. At the moment it's mostly a strait port of Sass' color module and I feel like we can do much better. @weavejester has done some work in the space with crumpets and I feel like his work is closer to how the namespace should look.

Overall I would like to see this added. Let's continue to brainstorm as this is definitely something we should have.

from garden.

noprompt avatar noprompt commented on May 18, 2024

Partial solution now in master (color/from-name "red").

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.