Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double hyphens are invalid HTML comments #116

Open
shannonmoeller opened this issue Jan 12, 2017 · 1 comment
Open

Double hyphens are invalid HTML comments #116

shannonmoeller opened this issue Jan 12, 2017 · 1 comment

Comments

@shannonmoeller
Copy link

shannonmoeller commented Jan 12, 2017

Double hyphens are disallowed in HTML/XML comments. Therefore, the recommended format for documenting element styles is invalid markup:

<!--

...

### Styling

`<paper-button>` provides the following custom properties and mixins
for styling:

Custom property | Description | Default
----------------|-------------|----------
`--paper-button-ink-color` | Background color of the ripple | Based on the button's color
`--paper-button` | Mixin applied to the button | `{}`

...

-->

Expected outcome

There should be a way of documenting dom-module styles using valid code.

Actual outcome

It's possible to move the documentation into the <script> tag and use c-style comments, with one catch: the inability to namespace element definitions. Doing so breaks the comment association in Hydrolysis.

image

Personal Ideal Change

The ability to document element styles in c-style comments within the element's <style> and <script> tags. This way developers have a choice of putting all of the element documentation into the <script> tag or to break up the documentation into the flow of the code where the HTML documentation is in the HTML, style documentation in the CSS, and API documentation in the JS.

One possible solution would be to support a @polymerElement tag similar to the @polymerBehavior tag.

@shannonmoeller
Copy link
Author

I haven't tested to see whether the namespacing issue has been resolved in polymer-analyzer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant