Request details

Use CSS properties / classes to specify object appearance

Add unique CSS properties to object properties.
Things like Margins, Padding and un-even borders are not common for design apps, but it would be great to define them per object in XD, honor them in the design mode, and export them as part of the object css,

702 votes
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)

We’ll send you updates on this idea

Yoav Chen shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

35 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Mark commented  ·   ·  Flag as inappropriate

    I'd also like to see Spread in the shadows property...especially negative spread!! 😊

  • Menghui Li commented  ·   ·  Flag as inappropriate

    I am willing to code my object style in CSS. As long as the components can work as classes.

  • Menghui Li commented  ·   ·  Flag as inappropriate

    Also please make text box works like a <div>, with border, padding, margin everything.
    Then I'll never need to draw the same button a hundred times.

  • Peter Scott commented  ·   ·  Flag as inappropriate

    From a design perspective, this would be a huge improvement, especially if you had the ability to update on the fly various XD files relating to the same project. Also, updating fonts across the same files would also be handy - but I guess in future this could be done via CC Libraries

  • Cubelodyte commented  ·   ·  Flag as inappropriate

    Note to Adobe:
    I see this request has been "under review" for over 2 years. Here's a little something that might help you push it over the edge.

    Given that an enormous number of feature requests revolve around the ability to make styling adjustments to objects that mirror what's possible in CSS on a page, taking on this request would allow you to clear dozens of related requests in one stroke.

  • Chuck Howard commented  ·   ·  Flag as inappropriate

    so we already have the "Fix position when scrolling" but it would be cool to be able to assign absolute or relative values to responsive items

  • Matza commented  ·   ·  Flag as inappropriate

    And it would be great to connect XD to a framework like bootstrap, vuetify … So instead of drawing a button in the style and size the framework provides just type in the css
    <v-btn depressed small color="primary">Buttontext</v-btn> (vuetify-Framework)
    and the button appears!!!

  • Edu Couchez commented  ·   ·  Flag as inappropriate

    Absolutely agree... In fact, I imagine it like a surgical removing of Dreamweaver's HTML rendering engine, and implant it to XD. Even more... I'd add SASS/LESS pre-processor capabilities to create classes and CSS hierarchy based on art board names/id. I mean, start mock up design right with real styles that could be exported to the front end development pipeline (and viceversa... update styles if somebody adds a change in any external IDE.

  • Sophie commented  ·   ·  Flag as inappropriate

    After discussion with our front developers , what would be useful for us is:
    1. The creation of an export file with variables: colors, fonts ...
    2. Generate image sprit of the entire project or be able to do it alone
    3. Consider including bootstrap classes, if a code export is done

  • Zack commented  ·   ·  Flag as inappropriate

    Just made a tool which can export css via SVG files, we can export our artboards to SVGs (embed) format via XD, and drag the SVGs to this link, then we can get the functionality just like Zeplin!

    https://zaaack.github.io/inker/

  • Raylin Aquino commented  ·   ·  Flag as inappropriate

    Please add it up, because I have to use Zeplin for export my css, assets measurements, etc, It's a headache

  • Armando Scuro commented  ·   ·  Flag as inappropriate

    while I as a designer find no need for this at the moment, developers whom I have shared specs link with had some issues translating my web design to code due to absence of padding/margins.
    Moreover, adding padding to clickable elements is needed when I want an item to be have a more clickable space

  • Scot Clark commented  ·   ·  Flag as inappropriate

    With the recent connectivity to Zeplins direct integration, there is one glaring problem with the extraction of CSS. Class names. If you have a block of copy the class name that appears in the snippet window is the entire block of copy as the Class name. When it should be something semantic like class="body_copy". I have a short lorem ipsum in a layout for testing and this is the class name that shows up in Zeplin.

    .Excepteur-sint-occaecat-cupidatat-non-proident-sunt-in-culpa-qui-officia-deserunt-mollit-anim-id-est-eopksio-laborum-Sed-ut-perspiciatis-unde-omnis-istpoe-natus-error-sit-voluptatem-accusantium-doloremque-eopsloi-laudantium-totam-rem-aperiam-eaque-ipsa { }

    I would like to define the class name in association with my Character or Paragraph Styles or with an Adobe Library. How bout we make that happen real quick like?

  • Anuar Bolatov commented  ·   ·  Flag as inappropriate

    That's an awesome idea. Would be cool if we could use nesting and add variables, basically Sass :)

← Previous 1

Feedback and Knowledge Base