Skip to content

Document variables #2

@idpaterson

Description

@idpaterson

We're not crazy enough to document every variable in our SASS, but it would be very useful to be able to document what we consider to be the most important variables that other stylesheets can override. We're working on swappable themes, so a few important variables are used heavily.

Not sure on the syntax. I'm generally not a fan of having to provide information that could be derived from the code being documented, but it seems necessary based on the current implementation. I don't think that I would personally use the @default tag since it's very likely to get out of sync with the actual code, so that might not be necessary until the project is able to parse the code associated with each comment to derive that type of info.

// Most colors in the stylesheet are derived from this color.
// @var {Color} $the-color
// @default maroon
$the-color: maroon !default;

// The red value that all colors should use, because that's a useful thing to track...
// @var {Number} $red-value
// @default $the-color
$red-value: red($the-color) !default;

// Specifies whether or not the page can advertise peanut butter.
// @var {Bool} $wants-peanut-butter
// @default true
$wants-peanut-butter: true !default;

// @category ClientATheme

// This client has an allergy.
// @var {Bool} $wants-peanut-butter
$wants-peanut-butter: false;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions