Easily create front-end style guides with Markdown and Sass/SCSS.
This release solves several warnings especially released to recent Sprockets and Rails versions.
This release fixed all open bugs for 2.0.0. If no further bugs will be found, this should be equal to the final 2.0.0 release. If you find a bug, feel free to open an issue.
@scss !global
for @scss scope: global
@style
or directly styled the style guide via CSS, have a look at https://github.com/livingstyleguide/livingstyleguide/commit/9a5e1e8f34e0a4949c107ae7831599ca7f7ce975
@require
respects the current path for loading Ruby files\
(for example if you want to
document LSG itself)lighten($my-color)
from now onThe before and after commands in which you can introduce other commands, HTML or text.
@before:
<div> this-is a before example </div>
@after:
<div> this-is an after example </div>
In this version the command @search-box is included inside of the document’s before section
The toggle-code button it is added via the @toggle-code command and it allows you to show or hide the code blocks that appear under the code examples. It is included inside of the document’s before section.
Rename filters to commands which reflects their usage and will allow filtering later.
The style of code is unified (changing the single quotes for double quotes), and the obsolete files of the V1 were removed.
Add helper for rendering templates, when you want to use an ERB template, You won’t need to use:
ERB.new(File.read("#{File.dirname(__FILE__)}/../templates/<name_file>")).result(binding)
Anymore, now it will be enough with:
LivingStyleGuide.template("<file_name>", binding)
Reorganize JavaScript scripts and use new javascript instance variable to hold them into the LivingStyleGuide::Document.
All JavaScript scripts now live under templates/scripts as *.js.erb files.
Now running the tests will be faster and easier, avoiding warnings while executing them.
Add a linter for SCSS and integrate with Hound CI.
In this new version all the test are green.
This alpha version includes two more contributions by LSG’s Rails Girls Summer of Code team, Fanxhe: Now you can copy code from the examples and search the style guide.
Inline search in the style guide via @search-box
(RGSoC)
allow commands inside of command blocks:
@header
@haml
.my-header My Header
@default type: xyz
now also applies for code examples
@default type: haml
```
.this-is an Haml example
```
@header
.my-header My Header
Ugly scrollbars on code are hidden by default now
Code examples also got a copy button (RGSoC)
Added viewport for mobile view
Fixed escaping of IDs in CSS
This is an alpha version:
As the documentation is not done yet, most of the features in the following list will link to the test cases.
The planned features for v2 can also be found in this dummy project—including the v1 structure for comparison: https://github.com/livingstyleguide/livingstyleguide-concept
Feedback is welcome! Please follow @LSGorg for updates. Tweet about it using #LSG2!
@import coding-style.lsg
) of other files (LivingStyleGuide documents, HTML, Haml, …)@import config.lsg
) (requested by @ronaldlokers and others in #57)<section>
with unique ID (as ID the current file name will be used if available). This helps scoping CSS and allows linking.functions()
, #hex
, and colorconstants
besides $variables
(requested by @scottdavis in https://github.com/livingstyleguide/livingstyleguide-concept/issues/1)*** ... ***
)This alpha version includes the first contribution by LSG’s Rails Girls Summer of Code team, Fanxhe. Now, clicking on color swatches copies the variable name and alt+clicking copies the hex-code.
lsg--
from now on (was
livingstyleguide--
)@css
, @sass
and @scss
Details and documentation on those new features can be found in the Readme file.
@css
:
@css
for adding plain CSS or importing a CSS file (@css my-styles.css
)@scss
for adding SCSS or importing a SCSS file (@css my-styles.scss
)@sass
for adding Sass or importing a Sass file (@css my-styles.sass
)$livingstyleguide--variable-name
to $lsg--variable-name
.livingstyleguide--class
to .lsg--class
Ruby Versions:
This is an alpha version:
As the documentation is not done yet, most of the features in the following list will link to the test cases.
The planned features for v2 can also be found in this dummy project—including the v1 structure for comparison: https://github.com/livingstyleguide/livingstyleguide-concept
Feedback is welcome! Please follow @LSGorg for updates. Tweet about it using #LSG2!
@import coding-style.lsg
) of other files (LivingStyleGuide documents, HTML, Haml, …)@import config.lsg
) (requested by @ronaldlokers and others in #57)<section>
with unique ID (as ID the current file name will be used if available). This helps scoping CSS and allows linking.functions()
, #hex
, and colorconstants
besides $variables
(requested by @scottdavis in https://github.com/livingstyleguide/livingstyleguide-concept/issues/1)*** ... ***
)