sass 3.4.9 → 3.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +3 -1
- data/CODE_OF_CONDUCT.md +10 -0
- data/CONTRIBUTING.md +148 -0
- data/MIT-LICENSE +1 -1
- data/README.md +42 -28
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/VERSION_NAME +1 -1
- data/extra/sass-spec-ref.sh +40 -0
- data/extra/update_watch.rb +1 -1
- data/lib/sass/cache_stores/filesystem.rb +7 -7
- data/lib/sass/cache_stores/memory.rb +4 -5
- data/lib/sass/callbacks.rb +2 -2
- data/lib/sass/css.rb +12 -12
- data/lib/sass/deprecation.rb +55 -0
- data/lib/sass/engine.rb +109 -55
- data/lib/sass/environment.rb +35 -7
- data/lib/sass/error.rb +14 -14
- data/lib/sass/exec/base.rb +4 -15
- data/lib/sass/exec/sass_convert.rb +20 -6
- data/lib/sass/exec/sass_scss.rb +20 -28
- data/lib/sass/features.rb +3 -2
- data/lib/sass/importers/base.rb +1 -1
- data/lib/sass/importers/deprecated_path.rb +51 -0
- data/lib/sass/importers/filesystem.rb +12 -8
- data/lib/sass/importers.rb +1 -0
- data/lib/sass/logger/base.rb +19 -2
- data/lib/sass/logger/delayed.rb +50 -0
- data/lib/sass/logger.rb +8 -3
- data/lib/sass/plugin/compiler.rb +50 -69
- data/lib/sass/plugin/configuration.rb +39 -23
- data/lib/sass/plugin/merb.rb +2 -2
- data/lib/sass/plugin/rack.rb +3 -3
- data/lib/sass/plugin/rails.rb +1 -1
- data/lib/sass/plugin/staleness_checker.rb +3 -3
- data/lib/sass/plugin.rb +3 -2
- data/lib/sass/railtie.rb +1 -1
- data/lib/sass/script/css_parser.rb +6 -4
- data/lib/sass/script/functions.rb +411 -137
- data/lib/sass/script/lexer.rb +99 -34
- data/lib/sass/script/parser.rb +465 -102
- data/lib/sass/script/tree/funcall.rb +43 -35
- data/lib/sass/script/tree/interpolation.rb +109 -7
- data/lib/sass/script/tree/list_literal.rb +52 -10
- data/lib/sass/script/tree/literal.rb +4 -0
- data/lib/sass/script/tree/map_literal.rb +2 -2
- data/lib/sass/script/tree/node.rb +13 -3
- data/lib/sass/script/tree/operation.rb +43 -9
- data/lib/sass/script/tree/string_interpolation.rb +58 -37
- data/lib/sass/script/tree/variable.rb +1 -1
- data/lib/sass/script/value/arg_list.rb +1 -1
- data/lib/sass/script/value/base.rb +27 -9
- data/lib/sass/script/value/callable.rb +25 -0
- data/lib/sass/script/value/color.rb +50 -26
- data/lib/sass/script/value/function.rb +19 -0
- data/lib/sass/script/value/helpers.rb +49 -13
- data/lib/sass/script/value/list.rb +35 -14
- data/lib/sass/script/value/map.rb +3 -3
- data/lib/sass/script/value/number.rb +52 -18
- data/lib/sass/script/value/string.rb +46 -5
- data/lib/sass/script/value.rb +2 -0
- data/lib/sass/script.rb +3 -3
- data/lib/sass/scss/css_parser.rb +21 -2
- data/lib/sass/scss/parser.rb +233 -101
- data/lib/sass/scss/rx.rb +12 -19
- data/lib/sass/scss/static_parser.rb +38 -55
- data/lib/sass/scss.rb +0 -2
- data/lib/sass/selector/abstract_sequence.rb +15 -12
- data/lib/sass/selector/comma_sequence.rb +24 -6
- data/lib/sass/selector/pseudo.rb +23 -6
- data/lib/sass/selector/sequence.rb +68 -25
- data/lib/sass/selector/simple.rb +19 -12
- data/lib/sass/selector/simple_sequence.rb +21 -17
- data/lib/sass/selector.rb +11 -10
- data/lib/sass/shared.rb +1 -1
- data/lib/sass/source/map.rb +7 -9
- data/lib/sass/source/position.rb +4 -4
- data/lib/sass/stack.rb +23 -3
- data/lib/sass/supports.rb +8 -10
- data/lib/sass/tree/charset_node.rb +1 -1
- data/lib/sass/tree/comment_node.rb +1 -1
- data/lib/sass/tree/css_import_node.rb +9 -1
- data/lib/sass/tree/function_node.rb +8 -3
- data/lib/sass/tree/import_node.rb +6 -5
- data/lib/sass/tree/node.rb +5 -3
- data/lib/sass/tree/prop_node.rb +49 -58
- data/lib/sass/tree/rule_node.rb +17 -9
- data/lib/sass/tree/visitors/check_nesting.rb +19 -23
- data/lib/sass/tree/visitors/convert.rb +42 -26
- data/lib/sass/tree/visitors/cssize.rb +4 -15
- data/lib/sass/tree/visitors/deep_copy.rb +2 -2
- data/lib/sass/tree/visitors/extend.rb +10 -14
- data/lib/sass/tree/visitors/perform.rb +41 -16
- data/lib/sass/tree/visitors/set_options.rb +2 -2
- data/lib/sass/tree/visitors/to_css.rb +104 -49
- data/lib/sass/util/multibyte_string_scanner.rb +127 -133
- data/lib/sass/util/normalized_map.rb +1 -9
- data/lib/sass/util/subset_map.rb +1 -2
- data/lib/sass/util.rb +109 -348
- data/lib/sass/version.rb +2 -6
- data/lib/sass.rb +3 -3
- metadata +74 -214
- data/CONTRIBUTING +0 -3
- data/Rakefile +0 -370
- data/lib/sass/scss/script_lexer.rb +0 -15
- data/lib/sass/scss/script_parser.rb +0 -25
- data/lib/sass/util/cross_platform_random.rb +0 -19
- data/lib/sass/util/ordered_hash.rb +0 -192
- data/test/sass/cache_test.rb +0 -131
- data/test/sass/callbacks_test.rb +0 -61
- data/test/sass/compiler_test.rb +0 -236
- data/test/sass/conversion_test.rb +0 -2069
- data/test/sass/css2sass_test.rb +0 -477
- data/test/sass/data/hsl-rgb.txt +0 -319
- data/test/sass/encoding_test.rb +0 -219
- data/test/sass/engine_test.rb +0 -3301
- data/test/sass/exec_test.rb +0 -86
- data/test/sass/extend_test.rb +0 -1687
- data/test/sass/fixtures/test_staleness_check_across_importers.css +0 -1
- data/test/sass/fixtures/test_staleness_check_across_importers.scss +0 -1
- data/test/sass/functions_test.rb +0 -1954
- data/test/sass/importer_test.rb +0 -421
- data/test/sass/logger_test.rb +0 -58
- data/test/sass/mock_importer.rb +0 -49
- data/test/sass/more_results/more1.css +0 -9
- data/test/sass/more_results/more1_with_line_comments.css +0 -26
- data/test/sass/more_results/more_import.css +0 -29
- data/test/sass/more_templates/_more_partial.sass +0 -2
- data/test/sass/more_templates/more1.sass +0 -23
- data/test/sass/more_templates/more_import.sass +0 -11
- data/test/sass/plugin_test.rb +0 -556
- data/test/sass/results/alt.css +0 -4
- data/test/sass/results/basic.css +0 -9
- data/test/sass/results/cached_import_option.css +0 -3
- data/test/sass/results/compact.css +0 -5
- data/test/sass/results/complex.css +0 -86
- data/test/sass/results/compressed.css +0 -1
- data/test/sass/results/expanded.css +0 -19
- data/test/sass/results/filename_fn.css +0 -3
- data/test/sass/results/if.css +0 -3
- data/test/sass/results/import.css +0 -31
- data/test/sass/results/import_charset.css +0 -5
- data/test/sass/results/import_charset_1_8.css +0 -5
- data/test/sass/results/import_charset_ibm866.css +0 -5
- data/test/sass/results/import_content.css +0 -1
- data/test/sass/results/line_numbers.css +0 -49
- data/test/sass/results/mixins.css +0 -95
- data/test/sass/results/multiline.css +0 -24
- data/test/sass/results/nested.css +0 -22
- data/test/sass/results/options.css +0 -1
- data/test/sass/results/parent_ref.css +0 -13
- data/test/sass/results/script.css +0 -16
- data/test/sass/results/scss_import.css +0 -31
- data/test/sass/results/scss_importee.css +0 -2
- data/test/sass/results/subdir/nested_subdir/nested_subdir.css +0 -1
- data/test/sass/results/subdir/subdir.css +0 -3
- data/test/sass/results/units.css +0 -11
- data/test/sass/results/warn.css +0 -0
- data/test/sass/results/warn_imported.css +0 -0
- data/test/sass/script_conversion_test.rb +0 -333
- data/test/sass/script_test.rb +0 -1170
- data/test/sass/scss/css_test.rb +0 -1256
- data/test/sass/scss/rx_test.rb +0 -156
- data/test/sass/scss/scss_test.rb +0 -4008
- data/test/sass/scss/test_helper.rb +0 -37
- data/test/sass/source_map_test.rb +0 -977
- data/test/sass/superselector_test.rb +0 -210
- data/test/sass/templates/_cached_import_option_partial.scss +0 -1
- data/test/sass/templates/_double_import_loop2.sass +0 -1
- data/test/sass/templates/_filename_fn_import.scss +0 -11
- data/test/sass/templates/_imported_charset_ibm866.sass +0 -4
- data/test/sass/templates/_imported_charset_utf8.sass +0 -4
- data/test/sass/templates/_imported_content.sass +0 -3
- data/test/sass/templates/_partial.sass +0 -2
- data/test/sass/templates/_same_name_different_partiality.scss +0 -1
- data/test/sass/templates/alt.sass +0 -16
- data/test/sass/templates/basic.sass +0 -23
- data/test/sass/templates/bork1.sass +0 -2
- data/test/sass/templates/bork2.sass +0 -2
- data/test/sass/templates/bork3.sass +0 -2
- data/test/sass/templates/bork4.sass +0 -2
- data/test/sass/templates/bork5.sass +0 -3
- data/test/sass/templates/cached_import_option.scss +0 -3
- data/test/sass/templates/compact.sass +0 -17
- data/test/sass/templates/complex.sass +0 -305
- data/test/sass/templates/compressed.sass +0 -15
- data/test/sass/templates/double_import_loop1.sass +0 -1
- data/test/sass/templates/expanded.sass +0 -17
- data/test/sass/templates/filename_fn.scss +0 -18
- data/test/sass/templates/if.sass +0 -11
- data/test/sass/templates/import.sass +0 -12
- data/test/sass/templates/import_charset.sass +0 -9
- data/test/sass/templates/import_charset_1_8.sass +0 -6
- data/test/sass/templates/import_charset_ibm866.sass +0 -11
- data/test/sass/templates/import_content.sass +0 -4
- data/test/sass/templates/importee.less +0 -2
- data/test/sass/templates/importee.sass +0 -19
- data/test/sass/templates/line_numbers.sass +0 -13
- data/test/sass/templates/mixin_bork.sass +0 -5
- data/test/sass/templates/mixins.sass +0 -76
- data/test/sass/templates/multiline.sass +0 -20
- data/test/sass/templates/nested.sass +0 -25
- data/test/sass/templates/nested_bork1.sass +0 -2
- data/test/sass/templates/nested_bork2.sass +0 -2
- data/test/sass/templates/nested_bork3.sass +0 -2
- data/test/sass/templates/nested_bork4.sass +0 -2
- data/test/sass/templates/nested_import.sass +0 -2
- data/test/sass/templates/nested_mixin_bork.sass +0 -6
- data/test/sass/templates/options.sass +0 -2
- data/test/sass/templates/parent_ref.sass +0 -25
- data/test/sass/templates/same_name_different_ext.sass +0 -2
- data/test/sass/templates/same_name_different_ext.scss +0 -1
- data/test/sass/templates/same_name_different_partiality.scss +0 -1
- data/test/sass/templates/script.sass +0 -101
- data/test/sass/templates/scss_import.scss +0 -12
- data/test/sass/templates/scss_importee.scss +0 -1
- data/test/sass/templates/single_import_loop.sass +0 -1
- data/test/sass/templates/subdir/import_up1.scss +0 -1
- data/test/sass/templates/subdir/import_up2.scss +0 -1
- data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +0 -2
- data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +0 -3
- data/test/sass/templates/subdir/subdir.sass +0 -6
- data/test/sass/templates/units.sass +0 -11
- data/test/sass/templates/warn.sass +0 -3
- data/test/sass/templates/warn_imported.sass +0 -4
- data/test/sass/test_helper.rb +0 -8
- data/test/sass/util/multibyte_string_scanner_test.rb +0 -147
- data/test/sass/util/normalized_map_test.rb +0 -51
- data/test/sass/util/subset_map_test.rb +0 -91
- data/test/sass/util_test.rb +0 -471
- data/test/sass/value_helpers_test.rb +0 -179
- data/test/test_helper.rb +0 -109
- data/vendor/listen/CHANGELOG.md +0 -1
- data/vendor/listen/CONTRIBUTING.md +0 -38
- data/vendor/listen/Gemfile +0 -20
- data/vendor/listen/Guardfile +0 -8
- data/vendor/listen/LICENSE +0 -20
- data/vendor/listen/README.md +0 -349
- data/vendor/listen/Rakefile +0 -5
- data/vendor/listen/Vagrantfile +0 -96
- data/vendor/listen/lib/listen/adapter.rb +0 -327
- data/vendor/listen/lib/listen/adapters/bsd.rb +0 -75
- data/vendor/listen/lib/listen/adapters/darwin.rb +0 -48
- data/vendor/listen/lib/listen/adapters/linux.rb +0 -81
- data/vendor/listen/lib/listen/adapters/polling.rb +0 -58
- data/vendor/listen/lib/listen/adapters/windows.rb +0 -91
- data/vendor/listen/lib/listen/directory_record.rb +0 -406
- data/vendor/listen/lib/listen/listener.rb +0 -323
- data/vendor/listen/lib/listen/turnstile.rb +0 -32
- data/vendor/listen/lib/listen/version.rb +0 -3
- data/vendor/listen/lib/listen.rb +0 -54
- data/vendor/listen/listen.gemspec +0 -28
- data/vendor/listen/spec/listen/adapter_spec.rb +0 -149
- data/vendor/listen/spec/listen/adapters/bsd_spec.rb +0 -36
- data/vendor/listen/spec/listen/adapters/darwin_spec.rb +0 -37
- data/vendor/listen/spec/listen/adapters/linux_spec.rb +0 -47
- data/vendor/listen/spec/listen/adapters/polling_spec.rb +0 -68
- data/vendor/listen/spec/listen/adapters/windows_spec.rb +0 -30
- data/vendor/listen/spec/listen/directory_record_spec.rb +0 -1250
- data/vendor/listen/spec/listen/listener_spec.rb +0 -258
- data/vendor/listen/spec/listen/turnstile_spec.rb +0 -56
- data/vendor/listen/spec/listen_spec.rb +0 -67
- data/vendor/listen/spec/spec_helper.rb +0 -25
- data/vendor/listen/spec/support/adapter_helper.rb +0 -666
- data/vendor/listen/spec/support/directory_record_helper.rb +0 -57
- data/vendor/listen/spec/support/fixtures_helper.rb +0 -29
- data/vendor/listen/spec/support/listeners_helper.rb +0 -179
- data/vendor/listen/spec/support/platform_helper.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6442c161b5fc7709753d4bdc2a134f340af6d908
|
4
|
+
data.tar.gz: '0946cacd17612b438ce689b86cce9fa6a90bc208'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87b7eb8440a85957deaf8b83549d60fdb86f8c5f865aab9db67bee7ba8cd5c0985f05018c9a7ff18e1ea514aa2beb8dbca238257f76e6db14b9f6b1793bf4388
|
7
|
+
data.tar.gz: 5c786b64db488ba61d018257943aeb1ab9365c2e7069201ae0a5759fdbe6576f36d57a885ea690824d15d398d2c8c656fb21be0460ca5f6b088f2e10cfd1edee
|
data/.yardopts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
--readme README.md
|
2
2
|
--markup markdown
|
3
|
-
--markup-provider
|
3
|
+
--markup-provider redcarpet
|
4
4
|
--default-return ""
|
5
5
|
--title "Sass Documentation"
|
6
6
|
--query 'object.type != :classvariable'
|
@@ -9,3 +9,5 @@
|
|
9
9
|
--protected
|
10
10
|
--no-private
|
11
11
|
--no-highlight
|
12
|
+
--tag comment
|
13
|
+
--hide-tag comment
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
Sass is more than a technology; Sass is driven by the community of individuals
|
2
|
+
that power its development and use every day. As a community, we want to embrace
|
3
|
+
the very differences that have made our collaboration so powerful, and work
|
4
|
+
together to provide the best environment for learning, growing, and sharing of
|
5
|
+
ideas. It is imperative that we keep Sass a fun, welcoming, challenging, and
|
6
|
+
fair place to play.
|
7
|
+
|
8
|
+
[The full community guidelines can be found on the Sass website.][link]
|
9
|
+
|
10
|
+
[link]: https://sass-lang.com/community-guidelines
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
Contributions are welcomed. Please see the following site for guidelines:
|
2
|
+
|
3
|
+
[https://sass-lang.com/community#Contribute](https://sass-lang.com/community#Contribute)
|
4
|
+
|
5
|
+
* [Branches](#main-development-branches)
|
6
|
+
* [Feature Branches](#feature-branches)
|
7
|
+
* [Experimental Branches](#experimental-branches)
|
8
|
+
* [Old Stable Branches](#old-stable-branches)
|
9
|
+
* [Versioning](#versioning)
|
10
|
+
* [Making Breaking Changes](#making-breaking-changes)
|
11
|
+
* [Exceptional Breakages](#exceptional-breakages)
|
12
|
+
|
13
|
+
## Branches
|
14
|
+
|
15
|
+
The Sass repository has three primary development branches, each of which tracks
|
16
|
+
a different line of releases (see [versioning](#versioning) below). Each branch
|
17
|
+
is regularly merged into the one below: `stable` into `next`, `next` into
|
18
|
+
`master`.
|
19
|
+
|
20
|
+
* The `stable` branch is the default—it's what GitHub shows if you go to
|
21
|
+
[sass/ruby-sass](https://github.com/sass/ruby-sass), and it's the default place for pull
|
22
|
+
requests to go. This branch is where we work on the next patch release. Bug
|
23
|
+
fixes and documentation improvements belong here, but not new features.
|
24
|
+
|
25
|
+
* The `next` branch is where we work on the next minor release. It's where most
|
26
|
+
new features go, as long as they're not breaking changes. Very occasionally
|
27
|
+
breaking changes will go here as well—see
|
28
|
+
[exceptional breakages](#exceptional-breakages) below for details.
|
29
|
+
|
30
|
+
* The `master` branch is where we work on the next major release. It's where
|
31
|
+
breaking changes go. We also occasionally decide that a non-breaking feature
|
32
|
+
is big enough to warrant saving until the next major release, in which case it
|
33
|
+
will also be developed here.
|
34
|
+
|
35
|
+
Ideally, pull requests would be made against the appropriate
|
36
|
+
branch, but don't worry about it too much; if you make a request against the
|
37
|
+
wrong branch, the maintainer will take responsibility for rebasing it before
|
38
|
+
merging.
|
39
|
+
|
40
|
+
### Testing
|
41
|
+
|
42
|
+
Tests for changes to the Sass language go in
|
43
|
+
[sass-spec](https://github.com/sass/sass-spec) so that other
|
44
|
+
implementations (E.g. libSass) can be tested against the same test
|
45
|
+
suite. The sass-spec repo follows a "trunk development" model in that
|
46
|
+
the tests there test against different version of the Sass language (as
|
47
|
+
opposed to having branches that track different Sass versions). When
|
48
|
+
contributing changes to Sass, update the Gemfile to use sass-spec from a
|
49
|
+
branch or fork that has the new tests. When the feature lands in Sass,
|
50
|
+
the committer will also merge the corresponding sass-spec changes.
|
51
|
+
|
52
|
+
The [documentation of
|
53
|
+
sass-spec](https://github.com/sass/sass-spec/blob/master/README.md)
|
54
|
+
explains how to run sass-spec and contribute changes. In development,
|
55
|
+
Change the Gemfile(s) to use the `:path` option against the sass-spec gem
|
56
|
+
to link your local checkout of sass and sass-spec together in one or
|
57
|
+
both directions.
|
58
|
+
|
59
|
+
Changes to Sass internals or Ruby Sass specific features (E.g.
|
60
|
+
the `sass-convert` tool) should always have tests in the Sass `test`
|
61
|
+
directory following the conventions you see there.
|
62
|
+
|
63
|
+
### Feature Branches
|
64
|
+
|
65
|
+
Sometimes it won't be possible to merge a new feature into `next` or `master`
|
66
|
+
immediately. It may require longer-term work before it's complete, or we may not
|
67
|
+
want to release it as part of any alpha releases of the branch in question.
|
68
|
+
Branches like this are labeled `feature.#{name}` and stay on GitHub until
|
69
|
+
they're ready to be merged.
|
70
|
+
|
71
|
+
### Experimental Branches
|
72
|
+
|
73
|
+
Not all features pan out, and not all code is a good fit for merging into the
|
74
|
+
main codebase. Usually when this happens the code is just discarded, but every
|
75
|
+
so often it's interesting or promising enough that it's worth keeping around.
|
76
|
+
This is what experimental branches (labeled `experimental.#{name}`) are for.
|
77
|
+
While they're not currently in use, they contain code that might be useful in
|
78
|
+
the future.
|
79
|
+
|
80
|
+
### Old Stable Branches
|
81
|
+
|
82
|
+
Usually Sass doesn't have the development time to do long-term maintenance of
|
83
|
+
old release. But occasionally, very rarely, it becomes necessary. In cases like
|
84
|
+
that, a branch named `stable_#{version}` will be created, starting from the last
|
85
|
+
tag in that version series.
|
86
|
+
|
87
|
+
## Versioning
|
88
|
+
|
89
|
+
Starting with version 3.5.0, Sass uses [semantic versioning](http://semver.org/)
|
90
|
+
to indicate the evolution of its language semantics as much as possible. This
|
91
|
+
means that patch releases (such as 3.5.3) contain only bug fixes, minor releases
|
92
|
+
(such as 3.6.0) contain backwards-compatible features, and only major releases
|
93
|
+
(such as 4.0.0) are allowed to have backwards-incompatible behavior. There are
|
94
|
+
[exceptions](#exceptional-breakages), but we try to follow this rule as closely
|
95
|
+
as possible.
|
96
|
+
|
97
|
+
Note, however, that the semantic versioning applies only to the language's
|
98
|
+
semantics, not to the Ruby APIs. Although we try hard to keep widely-used APIs
|
99
|
+
like [`Sass::Engine`][Sass::Engine] stable, we don't have a strong distinction
|
100
|
+
between public and private APIs and we need to be able to freely refactor our
|
101
|
+
code.
|
102
|
+
|
103
|
+
[Sass::Engine]: https://sass-lang.com/documentation/Sass/Engine.html
|
104
|
+
|
105
|
+
### Making Breaking Changes
|
106
|
+
|
107
|
+
Sometimes the old way of doing something just isn't going to work anymore, and
|
108
|
+
the new way just can't be made backwards-compatible. In that case, a breaking
|
109
|
+
change is necessary. These changes are rarely pleasant, but they contribute to
|
110
|
+
making the language better in the long term.
|
111
|
+
|
112
|
+
Our breaking change process tries to make such changes as clear to users and as
|
113
|
+
easy to adapt to as possible. We want to ensure that there's a clear path
|
114
|
+
forward for users using functionality that will no longer exist, and that they
|
115
|
+
are able to understand what's changing and what they need to do. We've developed
|
116
|
+
the following process for this:
|
117
|
+
|
118
|
+
1. Deprecate the old behavior [in `stable`](#branches). At minimum, deprecating
|
119
|
+
some behavior involves printing a warning when that behavior is used
|
120
|
+
explaining that it's going to go away in the future. Ideally, this message
|
121
|
+
will also include code that will do the same thing in a non-deprecated way.
|
122
|
+
If there's a thorough prose explanation of the change available online, the
|
123
|
+
message should link to that as well.
|
124
|
+
|
125
|
+
2. If possible, make `sass-convert` (also in `stable`) convert the deprecated
|
126
|
+
behavior into a non-deprecated form. This allows users to run `sass-convert
|
127
|
+
-R -i` to automatically update their stylesheets.
|
128
|
+
|
129
|
+
3. Implement the new behavior in `master`. The sooner this happens, the better:
|
130
|
+
it may be unclear exactly what needs to be deprecated until the new
|
131
|
+
implementation exists.
|
132
|
+
|
133
|
+
4. Release an alpha version of `master` that includes the new behavior. This
|
134
|
+
allows users who are dissatisfied with the workaround to use the new
|
135
|
+
behavior early. Normally a maintainer will take care of this.
|
136
|
+
|
137
|
+
### Exceptional Breakages
|
138
|
+
|
139
|
+
Because Sass's syntax and semantics are closely tied to those of CSS, there are
|
140
|
+
occasionally times when CSS syntax is introduced that overlaps with
|
141
|
+
previously-valid Sass. In this case in particular, we may introduce a breaking
|
142
|
+
change in a minor version to get back to CSS compatibility as soon as possible.
|
143
|
+
|
144
|
+
Exceptional breakages still require the full deprecation process; the only
|
145
|
+
change is that the new behavior is implemented in `next` rather than `master`.
|
146
|
+
Because there are no minor releases between the deprecation and the removal of
|
147
|
+
the old behavior, the deprecation warning should be introduced soon as it
|
148
|
+
becomes clear that an exceptional breakage is necessary.
|
data/MIT-LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2006-
|
1
|
+
Copyright (c) 2006-2016 Hampton Catlin, Natalie Weizenbaum, and Chris Eppstein
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -1,14 +1,22 @@
|
|
1
|
-
|
1
|
+
## Ruby Sass Has Reached End-of-Life
|
2
2
|
|
3
|
-
|
3
|
+
Ruby Sass should no longer be used, and will no longer be receiving any updates.
|
4
|
+
See [the Sass blog][], and consider switching to the [`sassc` gem].
|
5
|
+
|
6
|
+
[the Sass blog]: https://sass-lang.com/blog/posts/7828841
|
7
|
+
[`sassc` gem]: https://rubygems.org/gems/sassc
|
8
|
+
|
9
|
+
# Sass [![Travis Build Status](https://travis-ci.org/sass/ruby-sass.svg?branch=next)](https://travis-ci.org/sass/ruby-sass) [![Gem Version](https://badge.fury.io/rb/sass.svg)](http://badge.fury.io/rb/sass) [![Inline docs](http://inch-ci.org/github/sass/sass.svg)](http://inch-ci.org/github/sass/sass)
|
10
|
+
|
11
|
+
**Sass makes CSS fun again**. Sass is an extension of CSS,
|
4
12
|
adding nested rules, variables, mixins, selector inheritance, and more.
|
5
13
|
It's translated to well-formatted, standard CSS
|
6
14
|
using the command line tool or a web-framework plugin.
|
7
15
|
|
8
16
|
Sass has two syntaxes. The new main syntax (as of Sass 3)
|
9
17
|
is known as "SCSS" (for "Sassy CSS"),
|
10
|
-
and is a superset of
|
11
|
-
This means that every valid
|
18
|
+
and is a superset of CSS's syntax.
|
19
|
+
This means that every valid CSS stylesheet is valid SCSS as well.
|
12
20
|
SCSS files use the extension `.scss`.
|
13
21
|
|
14
22
|
The second, older syntax is known as the indented syntax (or just "Sass").
|
@@ -44,7 +52,7 @@ In Rails 3, add `gem "sass"` to your Gemfile instead.
|
|
44
52
|
where they'll be automatically compiled
|
45
53
|
to corresponding CSS files in `public/stylesheets` when needed
|
46
54
|
(the Sass template directory is customizable...
|
47
|
-
see [the Sass reference](
|
55
|
+
see [the Sass reference](https://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#template_location-option) for details).
|
48
56
|
|
49
57
|
Sass can also be used with any Rack-enabled web framework.
|
50
58
|
To do so, just add
|
@@ -59,7 +67,7 @@ Then any Sass files in `public/stylesheets/sass`
|
|
59
67
|
will be compiled into CSS files in `public/stylesheets` on every request.
|
60
68
|
|
61
69
|
To use Sass programmatically,
|
62
|
-
check out the [YARD documentation](
|
70
|
+
check out the [YARD documentation](https://sass-lang.com/documentation/file.SASS_REFERENCE.html#using_sass).
|
63
71
|
|
64
72
|
## Formatting
|
65
73
|
|
@@ -73,10 +81,10 @@ and get small stylesheets up and running quickly,
|
|
73
81
|
particularly with the help of
|
74
82
|
[the Compass style library](http://compass-style.org).
|
75
83
|
|
76
|
-
[vars]:
|
77
|
-
[nested]:
|
78
|
-
[mixins]:
|
79
|
-
[imports]:
|
84
|
+
[vars]: https://sass-lang.com/documentation/file.SASS_REFERENCE.html#variables_
|
85
|
+
[nested]: https://sass-lang.com/documentation/file.SASS_REFERENCE.html#nested_rules
|
86
|
+
[mixins]: https://sass-lang.com/documentation/file.SASS_REFERENCE.html#mixins
|
87
|
+
[imports]: https://sass-lang.com/documentation/file.SASS_REFERENCE.html#import
|
80
88
|
|
81
89
|
Sass has two syntaxes.
|
82
90
|
The one presented here, known as "SCSS" (for "Sassy CSS"),
|
@@ -85,7 +93,7 @@ The other (older) syntax, known as the indented syntax or just "Sass",
|
|
85
93
|
is whitespace-sensitive and indentation-based.
|
86
94
|
For more information, see the [reference documentation][syntax].
|
87
95
|
|
88
|
-
[syntax]:
|
96
|
+
[syntax]: https://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax
|
89
97
|
|
90
98
|
To run the following examples and see the CSS they produce,
|
91
99
|
put them in a file called `test.scss` and run `sass test.scss`.
|
@@ -160,7 +168,7 @@ You can even give them arguments.
|
|
160
168
|
```
|
161
169
|
|
162
170
|
A comprehensive list of features is available
|
163
|
-
in the [Sass reference](
|
171
|
+
in the [Sass reference](https://sass-lang.com/documentation/file.SASS_REFERENCE.html).
|
164
172
|
|
165
173
|
## Executables
|
166
174
|
|
@@ -184,7 +192,7 @@ See `sass-convert --help` for further information and options.
|
|
184
192
|
To run the Sass executables from a source checkout instead of from rubygems:
|
185
193
|
|
186
194
|
```
|
187
|
-
$ cd
|
195
|
+
$ cd sass
|
188
196
|
$ bundle
|
189
197
|
$ bundle exec sass ...
|
190
198
|
$ bundle exec scss ...
|
@@ -199,23 +207,29 @@ and now occasionally consults on the language issues. Hampton lives in San
|
|
199
207
|
Francisco, California and works as VP of Technology
|
200
208
|
at [Moovweb](http://www.moovweb.com/).
|
201
209
|
|
202
|
-
[Natalie Weizenbaum](
|
203
|
-
Sass. Her hard work has kept the project alive by endlessly
|
204
|
-
posts, fixing bugs, refactoring, finding speed improvements,
|
205
|
-
documentation, implementing new features, and
|
206
|
-
|
207
|
-
|
210
|
+
[Natalie Weizenbaum](https://twitter.com/nex3) is the primary developer and
|
211
|
+
architect of Sass. Her hard work has kept the project alive by endlessly
|
212
|
+
answering forum posts, fixing bugs, refactoring, finding speed improvements,
|
213
|
+
writing documentation, implementing new features, and designing the language.
|
214
|
+
Natalie lives in Seattle, Washington and works on [Dart](http://dartlang.org)
|
215
|
+
application libraries at Google.
|
208
216
|
|
209
|
-
[Chris Eppstein](http://
|
210
|
-
Sass and the creator of Compass, the first Sass-based framework
|
217
|
+
[Chris Eppstein](http://twitter.com/chriseppstein) is a core contributor to
|
218
|
+
Sass and the creator of [Compass](http://compass-style.org/), the first Sass-based framework, and
|
219
|
+
[Eyeglass](http://github.com/sass-eyeglass/eyeglass), a node-sass plugin ecosystem for NPM. Chris focuses
|
211
220
|
on making Sass more powerful, easy to use, and on ways to speed its adoption
|
212
221
|
through the web development community. Chris lives in San Jose, California with
|
213
|
-
his wife and
|
214
|
-
[LinkedIn.com](http://linkedin.com), where
|
215
|
-
maintain Sass
|
222
|
+
his wife and two children. He is an Engineer for
|
223
|
+
[LinkedIn.com](http://linkedin.com), where his primary responsibility is to
|
224
|
+
maintain Sass and many other Sass-related open source projects.
|
225
|
+
|
226
|
+
If you use this software, we'd be truly honored if you'd make a
|
227
|
+
tax-deductible donation to a non-profit organization and then
|
228
|
+
[let us know on twitter](http://twitter.com/SassCSS), so that we can
|
229
|
+
thank you. Here's a few that we endorse:
|
216
230
|
|
217
|
-
|
218
|
-
|
231
|
+
* [Trans Justice Funding Project](http://www.transjusticefundingproject.org/)
|
232
|
+
* [United Mitochondrial Disease Foundation](http://umdf.org/compass)
|
233
|
+
* [Girl Develop It](https://www.girldevelopit.com/donate)
|
219
234
|
|
220
|
-
|
221
|
-
Okay, fine, I guess that means compliments aren't __required__.
|
235
|
+
Sass is licensed under the MIT License.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.4
|
1
|
+
3.7.4
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
04 April 2019 00:49:58 UTC
|
data/VERSION_NAME
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Bleeding Edge
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/bin/bash -e
|
2
|
+
# Copyright 2016 Google Inc. Use of this source code is governed by an MIT-style
|
3
|
+
# license that can be found in the LICENSE file or at
|
4
|
+
# https://opensource.org/licenses/MIT.
|
5
|
+
|
6
|
+
# Echoes the sass-spec Git ref that should be checked out for the current Travis
|
7
|
+
# run. If we're running specs for a pull request which refers to a sass-spec
|
8
|
+
# pull request, we'll run against the latter rather than sass-spec master.
|
9
|
+
|
10
|
+
default=master
|
11
|
+
|
12
|
+
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
13
|
+
>&2 echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST."
|
14
|
+
>&2 echo "Ref: $default."
|
15
|
+
echo "$default"
|
16
|
+
exit 0
|
17
|
+
fi
|
18
|
+
|
19
|
+
>&2 echo "Fetching pull request $TRAVIS_PULL_REQUEST..."
|
20
|
+
|
21
|
+
url=https://api.github.com/repos/sass/ruby-sass/pulls/$TRAVIS_PULL_REQUEST
|
22
|
+
if [ -z "$GITHUB_AUTH" ]; then
|
23
|
+
>&2 echo "Fetching pull request info without authentication"
|
24
|
+
JSON=$(curl -L -sS $url)
|
25
|
+
else
|
26
|
+
>&2 echo "Fetching pull request info as sassbot"
|
27
|
+
JSON=$(curl -u "sassbot:$GITHUB_AUTH" -L -sS $url)
|
28
|
+
fi
|
29
|
+
>&2 echo "$JSON"
|
30
|
+
|
31
|
+
RE_SPEC_PR="sass\/sass-spec(#|\/pull\/)([0-9]+)"
|
32
|
+
|
33
|
+
if [[ $JSON =~ $RE_SPEC_PR ]]; then
|
34
|
+
ref="pull/${BASH_REMATCH[2]}/head"
|
35
|
+
>&2 echo "Ref: $ref."
|
36
|
+
echo "$ref"
|
37
|
+
else
|
38
|
+
>&2 echo "Ref: $default."
|
39
|
+
echo "$default"
|
40
|
+
fi
|
data/extra/update_watch.rb
CHANGED
@@ -7,7 +7,7 @@ enable :lock
|
|
7
7
|
Dir.chdir(File.dirname(__FILE__) + "/..")
|
8
8
|
|
9
9
|
post "/" do
|
10
|
-
puts "
|
10
|
+
puts "Received payload!"
|
11
11
|
puts "Rev: #{`git name-rev HEAD`.strip}"
|
12
12
|
system %{rake handle_update --trace REF=#{JSON.parse(params["payload"])["ref"].inspect}}
|
13
13
|
end
|
@@ -17,12 +17,12 @@ module Sass
|
|
17
17
|
# @see Base#\_retrieve
|
18
18
|
def _retrieve(key, version, sha)
|
19
19
|
return unless File.readable?(path_to(key))
|
20
|
-
File.open(path_to(key), "rb") do |f|
|
21
|
-
if f.readline("\n").strip == version && f.readline("\n").strip == sha
|
22
|
-
return f.read
|
23
|
-
end
|
24
|
-
end
|
25
20
|
begin
|
21
|
+
File.open(path_to(key), "rb") do |f|
|
22
|
+
if f.readline("\n").strip == version && f.readline("\n").strip == sha
|
23
|
+
return f.read
|
24
|
+
end
|
25
|
+
end
|
26
26
|
File.unlink path_to(key)
|
27
27
|
rescue Errno::ENOENT
|
28
28
|
# Already deleted. Race condition?
|
@@ -36,7 +36,7 @@ module Sass
|
|
36
36
|
def _store(key, version, sha, contents)
|
37
37
|
compiled_filename = path_to(key)
|
38
38
|
FileUtils.mkdir_p(File.dirname(compiled_filename))
|
39
|
-
Sass::Util.atomic_create_and_write_file(compiled_filename
|
39
|
+
Sass::Util.atomic_create_and_write_file(compiled_filename) do |f|
|
40
40
|
f.puts(version)
|
41
41
|
f.puts(sha)
|
42
42
|
f.write(contents)
|
@@ -52,7 +52,7 @@ module Sass
|
|
52
52
|
# @param key [String]
|
53
53
|
# @return [String] The path to the cache file.
|
54
54
|
def path_to(key)
|
55
|
-
key = key.gsub(/[<>:\\|?*%]/) {|c| "%%%03d" %
|
55
|
+
key = key.gsub(/[<>:\\|?*%]/) {|c| "%%%03d" % c.ord}
|
56
56
|
File.join(cache_location, key)
|
57
57
|
end
|
58
58
|
end
|
@@ -26,11 +26,10 @@ module Sass
|
|
26
26
|
|
27
27
|
# @see Base#retrieve
|
28
28
|
def retrieve(key, sha)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
29
|
+
return unless @contents.has_key?(key)
|
30
|
+
return unless @contents[key][:sha] == sha
|
31
|
+
obj = @contents[key][:obj]
|
32
|
+
obj.respond_to?(:deep_copy) ? obj.deep_copy : obj.dup
|
34
33
|
end
|
35
34
|
|
36
35
|
# @see Base#store
|
data/lib/sass/callbacks.rb
CHANGED
@@ -51,12 +51,12 @@ module Sass
|
|
51
51
|
def define_callback(name)
|
52
52
|
class_eval <<RUBY, __FILE__, __LINE__ + 1
|
53
53
|
def on_#{name}(&block)
|
54
|
-
@_sass_callbacks
|
54
|
+
@_sass_callbacks = {} unless defined? @_sass_callbacks
|
55
55
|
(@_sass_callbacks[#{name.inspect}] ||= []) << block
|
56
56
|
end
|
57
57
|
|
58
58
|
def run_#{name}(*args)
|
59
|
-
return unless @_sass_callbacks
|
59
|
+
return unless defined? @_sass_callbacks
|
60
60
|
return unless @_sass_callbacks[#{name.inspect}]
|
61
61
|
@_sass_callbacks[#{name.inspect}].each {|c| c[*args]}
|
62
62
|
end
|
data/lib/sass/css.rb
CHANGED
@@ -18,7 +18,7 @@ module Sass
|
|
18
18
|
# that can be converted to Unicode.
|
19
19
|
# If the stylesheet contains an `@charset` declaration,
|
20
20
|
# that overrides the Ruby encoding
|
21
|
-
# (see {file:SASS_REFERENCE.md#
|
21
|
+
# (see {file:SASS_REFERENCE.md#Encodings the encoding documentation})
|
22
22
|
# @option options :old [Boolean] (false)
|
23
23
|
# Whether or not to output old property syntax
|
24
24
|
# (`:color blue` as opposed to `color: blue`).
|
@@ -31,10 +31,11 @@ module Sass
|
|
31
31
|
template = template.read
|
32
32
|
end
|
33
33
|
|
34
|
-
@options = options.
|
34
|
+
@options = options.merge(:_convert => true)
|
35
35
|
# Backwards compatibility
|
36
36
|
@options[:old] = true if @options[:alternate] == false
|
37
37
|
@template = template
|
38
|
+
@checked_encoding = false
|
38
39
|
end
|
39
40
|
|
40
41
|
# Converts the CSS template into Sass or SCSS code.
|
@@ -50,8 +51,7 @@ module Sass
|
|
50
51
|
raise err
|
51
52
|
end
|
52
53
|
|
53
|
-
# Returns the original encoding of the document
|
54
|
-
# or `nil` under Ruby 1.8.
|
54
|
+
# Returns the original encoding of the document.
|
55
55
|
#
|
56
56
|
# @return [Encoding, nil]
|
57
57
|
# @raise [Encoding::UndefinedConversionError] if the source encoding
|
@@ -75,14 +75,14 @@ module Sass
|
|
75
75
|
# @return [Tree::Node] The root node of the parsed tree
|
76
76
|
def build_tree
|
77
77
|
root = Sass::SCSS::CssParser.new(@template, @options[:filename], nil).parse
|
78
|
-
parse_selectors
|
79
|
-
expand_commas
|
80
|
-
nest_seqs
|
81
|
-
parent_ref_rules
|
82
|
-
flatten_rules
|
83
|
-
bubble_subject
|
84
|
-
fold_commas
|
85
|
-
dump_selectors
|
78
|
+
parse_selectors(root)
|
79
|
+
expand_commas(root)
|
80
|
+
nest_seqs(root)
|
81
|
+
parent_ref_rules(root)
|
82
|
+
flatten_rules(root)
|
83
|
+
bubble_subject(root)
|
84
|
+
fold_commas(root)
|
85
|
+
dump_selectors(root)
|
86
86
|
root
|
87
87
|
end
|
88
88
|
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Sass
|
2
|
+
# A deprecation warning that should only be printed once for a given line in a
|
3
|
+
# given file.
|
4
|
+
#
|
5
|
+
# A global Deprecation instance should be created for each type of deprecation
|
6
|
+
# warning, and `warn` should be called each time a warning is needed.
|
7
|
+
class Deprecation
|
8
|
+
@@allow_double_warnings = false
|
9
|
+
|
10
|
+
# Runs a block in which double deprecation warnings for the same location
|
11
|
+
# are allowed.
|
12
|
+
def self.allow_double_warnings
|
13
|
+
old_allow_double_warnings = @@allow_double_warnings
|
14
|
+
@@allow_double_warnings = true
|
15
|
+
yield
|
16
|
+
ensure
|
17
|
+
@@allow_double_warnings = old_allow_double_warnings
|
18
|
+
end
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
# A set of filename, line pairs for which warnings have been emitted.
|
22
|
+
@seen = Set.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# Prints `message` as a deprecation warning associated with `filename`,
|
26
|
+
# `line`, and optionally `column`.
|
27
|
+
#
|
28
|
+
# This ensures that only one message will be printed for each line of a
|
29
|
+
# given file.
|
30
|
+
#
|
31
|
+
# @overload warn(filename, line, message)
|
32
|
+
# @param filename [String, nil]
|
33
|
+
# @param line [Number]
|
34
|
+
# @param message [String]
|
35
|
+
# @overload warn(filename, line, column, message)
|
36
|
+
# @param filename [String, nil]
|
37
|
+
# @param line [Number]
|
38
|
+
# @param column [Number]
|
39
|
+
# @param message [String]
|
40
|
+
def warn(filename, line, column_or_message, message = nil)
|
41
|
+
return if !@@allow_double_warnings && @seen.add?([filename, line]).nil?
|
42
|
+
if message
|
43
|
+
column = column_or_message
|
44
|
+
else
|
45
|
+
message = column_or_message
|
46
|
+
end
|
47
|
+
|
48
|
+
location = "line #{line}"
|
49
|
+
location << ", column #{column}" if column
|
50
|
+
location << " of #{filename}" if filename
|
51
|
+
|
52
|
+
Sass::Util.sass_warn("DEPRECATION WARNING on #{location}:\n#{message}")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|