mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
Document the JavaScript API
This commit is contained in:
parent
2b8bf01b7a
commit
997c3a7ecd
@ -301,16 +301,12 @@ module SassHelpers
|
||||
#
|
||||
# This takes a Markdown block that should provide more information about the
|
||||
# implementation differences or the old behavior.
|
||||
def impl_status(dart: nil, libsass: nil, ruby: nil)
|
||||
raise ArgumentError.new("Missing argument dart.") if dart.nil?
|
||||
raise ArgumentError.new("Missing argument libsass.") if libsass.nil?
|
||||
raise ArgumentError.new("Missing argument ruby.") if ruby.nil?
|
||||
|
||||
contents = [
|
||||
_impl_status_row('Dart Sass', dart),
|
||||
_impl_status_row('LibSass', libsass),
|
||||
_impl_status_row('Ruby Sass', ruby),
|
||||
]
|
||||
def impl_status(dart: nil, libsass: nil, ruby: nil, node: nil)
|
||||
contents = []
|
||||
contents << _impl_status_row('Dart Sass', dart) if dart
|
||||
contents << _impl_status_row('LibSass', libsass) if libsass
|
||||
contents << _impl_status_row('Node Sass', node) if node
|
||||
contents << _impl_status_row('Ruby Sass', ruby) if ruby
|
||||
|
||||
if block_given?
|
||||
contents.unshift(content_tag(:caption, [
|
||||
|
@ -148,13 +148,7 @@ Compiled themes/light.scss to public/css/light.css.
|
||||
|
||||
### Source Maps
|
||||
|
||||
Source maps are files that tell browsers or other tools that consume CSS how
|
||||
that CSS corresponds to the Sass files from which it was generated. They make it
|
||||
possible to see and even edit your Sass files in browsers. See instructions for
|
||||
using source maps in [Chrome][] and [Firefox][].
|
||||
|
||||
[Chrome]: https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps
|
||||
[Firefox]: https://developer.mozilla.org/en-US/docs/Tools/Style_Editor#Source_map_support
|
||||
<%= partial 'documentation/snippets/source-maps' %>
|
||||
|
||||
Dart Sass generates source maps by default for every CSS file it emits.
|
||||
|
||||
|
@ -369,7 +369,7 @@ h1 {
|
||||
|
||||
This flag (also available as `--line-numbers`, abbreviated as `-l`) causes Sass
|
||||
to emit comments for every style rule that indicate where each style rule was
|
||||
defined in the source stylehseet.
|
||||
defined in the source stylesheet.
|
||||
|
||||
```shellsession
|
||||
$ sass --line-numbers style.scss
|
||||
|
1226
source/documentation/js-api.html.md.erb
Normal file
1226
source/documentation/js-api.html.md.erb
Normal file
File diff suppressed because it is too large
Load Diff
7
source/documentation/snippets/_source-maps.html.md
Normal file
7
source/documentation/snippets/_source-maps.html.md
Normal file
@ -0,0 +1,7 @@
|
||||
Source maps are files that tell browsers or other tools that consume CSS how
|
||||
that CSS corresponds to the Sass files from which it was generated. They make it
|
||||
possible to see and even edit your Sass files in browsers. See instructions for
|
||||
using source maps in [Chrome][] and [Firefox][].
|
||||
|
||||
[Chrome]: https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps
|
||||
[Firefox]: https://developer.mozilla.org/en-US/docs/Tools/Style_Editor#Source_map_support
|
@ -54,4 +54,4 @@
|
||||
* [Command-Line Interface](/documentation/cli)
|
||||
* [Dart Sass](/documentation/cli/dart-sass)
|
||||
* [Ruby Sass](/documentation/cli/ruby-sass)
|
||||
* [JavaScript API](/documentation/js-api) (?)
|
||||
* [JavaScript API](/documentation/js-api)
|
||||
|
Loading…
Reference in New Issue
Block a user