Giter Site home page Giter Site logo

Comments (1)

abusizhishen avatar abusizhishen commented on June 14, 2024

Maybe this is just my perception as a web developer, but CSS seems to be the most ubiquitious design system. I know the default output format for D2 is SVG, so taking over some names from SVG attributes makes sense, but I think having aliases to CSS attributes would reduce the need to consult the docs as frequently for many people.

Suggested aliases:

current name alias
stroke border-color
stroke-width border-width
stroke-dash border-style
fill background-color
fill-pattern background-pattern (doesn't exist in CSS)
font font-family
font-color color
bold font-weight: bold
italic font-style: italic
underline text-decoration: underline
Some mappings are not perfect, e.g. bold/italic/underline. Maintaining this might not be worth the effort. I consider this a minor UX improvement.

thanks a lot, i have trouble in change container color, now it resolved

from d2.

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.