-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allowing string input (with `Kss::Parser.new(string)`) allows dynamic use cases in live web applications Example: ```ruby buttons =<<-'EOS' /* Your standard form button. :hover - Highlights when hovering. :disabled - Dims the button when disabled. Styleguide 1.1 */ button { padding: 5px 15px; line-height: normal; font-family: "Helvetica Neue", Helvetica; font-size: 12px; font-weight: bold; color: #666; text-shadow: 0 1px rgba(255, 255, 255, 0.9); border-radius: 3px; border: 1px solid #ddd; border-bottom-color: #bbb; background: #f5f5f5; filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='$start', endColorstr='$end'); background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e5e5e5)); background: -moz-linear-gradient(top, #f5f5f5, #e5e5e5); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); cursor: pointer; } button:disabled { opacity: 0.5; } EOS @styleguide = Kss::Parser.new(buttons) ``` We can then imagine a web app for prototyping designs or html components that would provide live kss documentation & demo rendering without relying on static files.
- Loading branch information
Showing
3 changed files
with
91 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters