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

Documenting Dependencies #115

Open
loominade opened this issue Feb 5, 2016 · 0 comments
Open

Documenting Dependencies #115

loominade opened this issue Feb 5, 2016 · 0 comments

Comments

@loominade
Copy link

A useful feature could be a Dependencies section.

Here a mockup:

// Buttons
// 
// A cool submit button.
//
// Markup: <input type="submit" />
//
// Styleguide: forms.button

[type="submit"]
  line-height: 1.2em

// Textfield
//
// A cool textfield.
// 
// Markup: <input type="text" />
//
// Styleguide: form.text

[type="text"]
  margin: 0 1em

// Small form
//
// A very small search form.
//
// Markup:
// <form class="small-form">
//  <div>
//     <input type="text" />
//     <input type="submit" />
//   </div>
// </form>
//
// Styleguide: form.small-form
//
// Dependencies:
// * form.text
// * form.button

.small-form > div
  display: flex

An HTML styleguide then could list links to all dependent components:

Small Form

A very small search form.

Example:

small-form-mockup
<form class="small-form">
 <div>
    <input type="text" />
    <input type="submit" />
  </div>
</form>

Dependencies:

Or even warn if a component is missing:

Dependencies:

  • Button
  • form.text Warning: dependency missing!

Also the dependent sections could link to sections which are dependent from it:

Button

A cool submit button.

Example:

button-mockup
<input type="submit" />

Required by:

This could help to keep track of the code. When one changes the Button Component he might be interested to check if the Small Form Component was unintentionally affected by the change.

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