- Optimizes Rails integration
- Compatibility with latest Sprockets versions (#203)
- Internal:
- Less warnings when running tests
- Uses Ruby 2.3 for testing by default
- Upgraded Rubocop
- Equals 2.0.0.pre.4 :)
- Adds a shortcut
@scss !global
for@scss scope: global
- Fixed/improved Sass imports (#191)
- Refactored classes and variables
- Removed IE hack
- Fixes duplicate imports (#198)
- Fixes duplicate colors Sass error (#196)
- Internal:
- Cleaned up the code base
- CSS/Sass code can be added to the global scope from now on
- Internal:
- Color swatches have been refactored for reduced error-proneness
- Color swatches accept nested functions like
lighten($my-color)
from now on - Doesn’t autofocus the search box (avoids scrolling up when refreshing the page)
- Optimized default theme
- Optimized defaults for colors and sizes
- Removed Alt + click for copying colors as it raised problems for Linux users (now: click on either the value or the variable/function to copy; this also avoids having English text which would require localization)
@require
respects the current path for loading Ruby files- Commands can be escaped with trailing
\
(for example if you want to document LSG itself) - Color swatches show the source only when the source already is a color (instead of a Sass variable/function)
- Rename filters to commands which reflects their usage and will allow filtering later
- General refactor: Unify coding style and remove obsolete v1 files
- Add helper for rendering templates
- Reorganize JavaScript scripts and use new JavaScript instance variable to hold them into the
LivingStyleGuide::Document
(RGSoC) - Add
@before
and@after
commands for injecting content (HTML, plain text and commands, etc) before and after the main document container with tests (RGSoC) - Add button to show and hide code blocks via new
@toggle-code
command injected in the document’s before section with tests (RGSoC) - Relocate
@search-box
in the document’s before section and add missing tests for it (RGSoC) - Avoid warnings while running the tests
- Add a linter for SCSS and integrate with Hound CI
- Inline search in the style guide via
@search-box
(RGSoC) - allow commands inside of command blocks (e.g. setting
@haml
inside of@header
) @default type: xyz
now also applies for code examples- 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
- Copy color variables and HEX codes (RGSoC)
- Better IDs generated by file name and headline
- CSS class names and Sass variables are prefixed with
lsg--
from now on (waslivingstyleguide--
) - Split up CSS commands into
@css
,@sass
and@scss
- Head/header/footer will be rendered only once (especially in Middleman)
- Fixed load paths when called a file via command line in a sub
directory (e. g.
livingstyleguide compile path/to/my-file.lsg
) - Fixed loading paths within code blocks
@syntax
to set the syntax highlighter’s language if needed@data
now also accepts arrays and renders the template Array.length times.- Fixed an error with Tilt, Haml and Ruby 2.2
@use
imports template as source (without execution)@default option: value
and@default @command; option: value
to set default options for filters@data
supports YAML data- Ruby < 2.0 not officially supported anymore
@head
,@header
, and@footer
commands for injecting HTML@css
also supports Sass’ indented syntax by setting@css preprocessor: sass
@javascript-before
and@javascript-after
commands to link or insert JavaScript into the document
- Use Tilt to render examples and allow all templating engines supperted by Tilt by
@type enginename
- Markdown files (*.md) are rendered as Markdown (was rendered as LSG file)
@type
to change type of document within the document- Normal code blocks (without example, just syntax highlighted) work from now on
- Commands can have blocks without braces or indented code from now on (add a colon at the end of the command to use this)
- Commands can have options (like JSON/Ruby hashes)
@set
can set multiple options- Adding custom filters has been refactored to:
LivingStyleGuide.command :name do |array_of_arguments, options_hash, block_string|
@font-example
works with multiple fonts separated by comma- Commas and quotation marks can be escaped in arguments/options (, " ')
- Added
@style
commands to customize the style guide’s own style
- Added
@require
to load any Ruby file or Gem - Renamed
@scss
command to@css
- Use
@css my-styles.scss
instead of@import my-styles.scss
for Sass/CSS files - Refactored
***
highlights in code to not conflict with the syntax highlighter; now it’s possible to place them anywher without breaking the code - Compass support within Sass code
- Avoid HTML escaping/rewriting/parsing by Markdown
- Fixed parsing of indented filters at the end of the file
- Fixed Sprockets dependencies for non-LSG files
- Added
@title
filter to set the title of the HTML document
- Refactored Sass rendering: Better support for helpers and load paths for Rails/Sprockets/Middleman/Compass
@import
uses relative paths (to current *.lsg file) from now on- Sass dependencies are considered for cache invalidation in Sprockets
- ERB templates are rendered as expected
- Upgraded @javascript filter to v2
- Upgraded @coffee-script/@coffee filter to v2
- Upgraded the command line interface to use v2
- Added ID to examples to allow CSS scoping
- Fixed HTML (non-Haml) examples
- Upgraded code highlights to v2
- Removed obsolete v1 code and tests
- New filter syntax everywhere (as it used to be within examples: Now everywhere in the file and the root document)
- Importing (
@import coding-style.lsg
) of other files (LivingStyleGuide documents, HTML, Haml, …) - Imported files can be rendered with local data defined as JSON
- Importing supports globbing of files
- #57: Having multiple LivingStyleGuide documents by sharing the configuration and loading it via
@import config.lsg
) - All imported files and all code examples will be grouped in a
<section>
with unique ID (as ID the current file name will be used if available). This helps scoping CSS and allows linking. - #97: No need to import/parse/render the whole Sass project (only color variables may be needed)
- Sprockets dependencies (except imports within Sass)
- Colors do support Sass
functions()
,#hex
, andcolorconstants
besides$variables
- SCSS code can be added everywhere when needed (within examples, it will be automatically scoped to this example)
- #188: Sprockets compatibility
- Internal:
- Added Ruby 2.3.0 to Travis CI
- Fixed Travis CI bundler issue
- #185: Better responsiveness for style guides
- #184: Resolved issue where compiling via CLI would be stuck in a while loop if no GemFile or .git directory exists.
- #175: Allow variables with underscore
- #161: Updated RedCarpet version
- Fixed rare UTF-8 problems
- Fixed NoMethodError when using image-url
- Internal:
- Refactored variable generation
- CLI shows version
- CLI supports reading from STDIN
- CLI supports writing to STDOUT
- CLI supports output file
- Import Markdown once, even when Sass is imported twice
- The command line interface also supports *.lsg files (without having .html in the filename)
- CLI works without having Bundler installed
- Compass is not required anymore (but still works well)
- Deprecated
list-variables()
in SassScript for v2.0.0 - Fixed wrong/duplicate imports when importing Compass files
- Internal:
- Removed importer => insprect Sass tree
- Removed variables lookup => inspect Sass tree
- Refactored code and file structure
- Automatically find project root by Git root, Gemfile, or Rails root
- Allow JavaScript code in
javascript-before
andjavascript-after
- Configurable
text-align
forbase
andheadline
- Fixed styling of
<ul>
/<ol>
- Support for variables that contain numbers in their name
- Simulate
inspect(...)
for Sass < 3.3
- Compatibility with Padrino
- Fixed an error caused when maps are used
- Anchors are close to headlines when centered from now on
- Escape fonts in examples
- Internal:
- Use Sass 3.3 and Compass 1.0.0 for automated tests
- Less Compass dependencies (not required in Sass anymore)
- More stable style guide design
- Fixed an issue where the command line interface used the input filename as the output filename
- Fixed an error causes by Compass’
brightness()
function in 1.0.0 alpha versions - Fixed asset URL handling with Middleman and Sprockets
- Internal:
- Integrated the website into the repository
- Added the changelog to the website
- Automated website deployment after a new version of the gem is released
- Fixed dependencies for broken gems
- New design and API for colors
- Show anchors next to headlines
- JSON for config files
- Updated styling of the style guide
- Cache control for Sprockets
- API to provide filters in examples
- Dropped
haml-example
,layout-example
,javascript-example
andhaml-layout-example
; moved into filters - A set of pre-defined filters
- Default filters (e. g. all templates should use Haml)
- CoffeeScript examples
- Better support for load paths in Rails
- Fix for colors
- New YAML based configuration (see this gist)
- Option to set the HTML title
- Custom footer and header HTML (example)
- Linking of JavaScript files (like jQuery, application.js, …) into the style guide (example)
- Custom styles can be set within YAML configuration (example)
- Added Rails support
- Removed globbing
- Set .html.lsg as default file extension
- Implemented command line interface
- More stable CSS
- Fixed highlighting in Haml code examples
- Use the Haml syntax highlighter
- Added support for Haml code in examples (
haml-example
,haml-layout-example
)
- Added
display
properties to avoid conflicts with resets
- Added anchors (ids) to headlines