styledocco icon indicating copy to clipboard operation
styledocco copied to clipboard

Show rendered element without code example

Open eskimoblood opened this issue 11 years ago • 4 comments

When I'm adding an code example without the fence the .styledocco-example container is missing and so this style effects my rendered example:

styledocco-sidebar, .styledocco-docs > :not(.styledocco-example) {
    box-sizing: content-box;
    margin: 15px 20px;
    color: #334;
    line-height: 1.618;
    font-family: sans-serif;
    -webkit-font-smoothing: subpixel-antialiased;
}

eskimoblood avatar Jul 04 '12 16:07 eskimoblood

Seems I've got the docs wrong. So all html I've write outside ``` or without intend will be rendered as plain html?

Anyway, it would be nice if I could render the an example in the preview container but without the code. Its useful when you wanna show the same element but with different content where the code just clutter the documentation.

eskimoblood avatar Jul 05 '12 07:07 eskimoblood

Hi, I noted your feature request and changed the title to reflect that. Thanks.

jacobrask avatar Jul 08 '12 08:07 jacobrask

Do you have any suggestions on the syntax to use for this feature?

I considered hacking the code fences to specify some custom non-existing language:

```preview
this would only be rendered and the code not shown
```

That's trivial to implement, but hackish.

jacobrask avatar Jul 20 '12 10:07 jacobrask

My initial thought was that, ``` renders with code, and indention renders without code. Not sure if that makes much sense.

eskimoblood avatar Jul 20 '12 10:07 eskimoblood