Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

Adding Styleguide Entry helper.#28

Open
rjfranco wants to merge 4 commits intodewski:masterfrom
rjfranco:styleguide-entry-helper
Open

Adding Styleguide Entry helper.#28
rjfranco wants to merge 4 commits intodewski:masterfrom
rjfranco:styleguide-entry-helper

Conversation

@rjfranco
Copy link
Copy Markdown

In cases where there is CSS / SCSS documentation that does not directly correlate to an element, it would be nice to have a helper to simply output the text of the documentation like:

  = styleguide_entry '1.1'

…cumentation that does not directly correlate to an element.
Comment thread app/helpers/kss/application_helper.rb Outdated
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this ArgumentError since it'll be raised if it's not present when styleguide_entry is called.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely true

@rjfranco
Copy link
Copy Markdown
Author

I've made the changes you suggested, it also adds a requirement for ostruct (and I wasn't really sure where to add that). Let me know how that looks!

@rjfranco
Copy link
Copy Markdown
Author

rjfranco commented Nov 8, 2013

It looks like section.section returns a NoMethodError in cases where a section is not found, and you can't set section on @section instances in the helper. I agree creating a struct feels like a bit much, but not sure what other route to take?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants