sass-embedded 1.103.1 → 1.104.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7d3cfcfef86f60babe917978aaa2fe2051f5a92eb59aee3466d954a85d7a794
4
- data.tar.gz: 33d274d7b05022ea6858ba73c5ce7907e44b073fc1402a6aa07af606ceff72d9
3
+ metadata.gz: f62f81842ed5d8f0ac3003a89728f62a5e6a45cd930542b94e25272ef027e70f
4
+ data.tar.gz: 6907d14e9554afbc97645658eef48c6d104e33141c04fa3090a0e2d6ce813909
5
5
  SHA512:
6
- metadata.gz: 175389c01b92759a49abd5af245fb4cae2c4fc00c15fa5f11eb5918a41bef1338336af93de187e1f2bd2a9c9846073b57c3c91abd585513533e0357f998c66df
7
- data.tar.gz: 515930beaec6302aad4da582912773bf6b9c31996c0cd3c2526a02caa699dfcdece4dc3ecc643d5bde1289bdb938afbd0858a63a3f55f6f8844ea449f69af2da
6
+ metadata.gz: 7893025f3394d42048ed1e57b8ddf828ba2b440228e3d098a22ef873743836f8b999d40a4f13adbaa253d14acfd0cf4a86c0afe248622f5492e80bee85811bbc
7
+ data.tar.gz: 1b1c0e20ca194e51f09be99970e03d1264d5ee7077d3257dcc29750d77d154c757ba641f41897551dca8d3f6db127d8ece2888a752454214e73ff78c1ff85242
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "sass": "file:sass-1.103.1.tgz"
3
+ "sass": "file:sass-1.104.0.tgz"
4
4
  }
5
5
  }
Binary file
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  module Embedded
5
- VERSION = '1.103.1'
5
+ VERSION = '1.104.0'
6
6
  end
7
7
  end
data/lib/sass/embedded.rb CHANGED
@@ -15,7 +15,7 @@ module Sass
15
15
  @compiler = nil
16
16
  @mutex = Mutex.new
17
17
 
18
- # rubocop:disable Layout/LineLength
18
+ # rubocop:disable-next Layout/LineLength
19
19
  class << self
20
20
  # Compiles the Sass file at +path+ to CSS.
21
21
  # @overload compile(path, load_paths: [], charset: true, source_map: false, source_map_include_sources: false, style: :expanded, functions: {}, importers: [], alert_ascii: false, alert_color: nil, fatal_deprecations: [], future_deprecations: [], logger: nil, quiet_deps: false, silence_deprecations: [], verbose: false)
@@ -64,5 +64,4 @@ module Sass
64
64
  end
65
65
  end
66
66
  end
67
- # rubocop:enable Layout/LineLength
68
67
  end
@@ -452,22 +452,34 @@ module Sass
452
452
  _initialize_for_space(
453
453
  space,
454
454
  _normalize_hue(channel0, invert: !channel1.nil? && FuzzyMath.less_than?(channel1, 0)),
455
- channel1&.abs,
456
- channel2,
457
- alpha
455
+ _normalize_linear(channel1&.abs),
456
+ _normalize_linear(channel2),
457
+ _normalize_linear(alpha)
458
458
  )
459
459
  when Space::HWB
460
- _initialize_for_space(space, _normalize_hue(channel0, invert: false), channel1, channel2, alpha)
460
+ _initialize_for_space(
461
+ space,
462
+ _normalize_hue(channel0, invert: false),
463
+ _normalize_linear(channel1),
464
+ _normalize_linear(channel2),
465
+ _normalize_linear(alpha)
466
+ )
461
467
  when Space::LCH, Space::OKLCH
462
468
  _initialize_for_space(
463
469
  space,
464
- channel0,
465
- channel1&.abs,
470
+ _normalize_linear(channel0),
471
+ _normalize_linear(channel1&.abs),
466
472
  _normalize_hue(channel2, invert: !channel1.nil? && FuzzyMath.less_than?(channel1, 0)),
467
- alpha
473
+ _normalize_linear(alpha)
468
474
  )
469
475
  else
470
- _initialize_for_space(space, channel0, channel1, channel2, alpha)
476
+ _initialize_for_space(
477
+ space,
478
+ _normalize_linear(channel0),
479
+ _normalize_linear(channel1),
480
+ _normalize_linear(channel2),
481
+ _normalize_linear(alpha)
482
+ )
471
483
  end
472
484
  end
473
485
 
@@ -481,9 +493,19 @@ module Sass
481
493
  FuzzyMath.assert_between(@alpha_or_nil, 0, 1, 'alpha') unless @alpha_or_nil.nil?
482
494
  end
483
495
 
496
+ def _normalize_linear(value)
497
+ return value if value.nil?
498
+
499
+ return 0 if value.zero? || value.to_f.nan?
500
+
501
+ value
502
+ end
503
+
484
504
  def _normalize_hue(hue, invert:)
485
505
  return hue if hue.nil?
486
506
 
507
+ return 0 if hue.zero? || !hue.finite?
508
+
487
509
  ((hue % 360) + 360 + (invert ? 180 : 0)) % 360
488
510
  end
489
511
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.103.1
4
+ version: 1.104.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
@@ -54,7 +54,7 @@ files:
54
54
  - ext/sass/file_utils.rb
55
55
  - ext/sass/package.json
56
56
  - ext/sass/platform.rb
57
- - ext/sass/sass-1.103.1.tgz
57
+ - ext/sass/sass-1.104.0.tgz
58
58
  - ext/sass/sass_config.rb
59
59
  - ext/sass/utils.rb
60
60
  - lib/sass-embedded.rb
@@ -133,8 +133,8 @@ licenses:
133
133
  - MIT
134
134
  metadata:
135
135
  bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
136
- documentation_uri: https://rubydoc.info/gems/sass-embedded/1.103.1
137
- source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.103.1
136
+ documentation_uri: https://rubydoc.info/gems/sass-embedded/1.104.0
137
+ source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.104.0
138
138
  funding_uri: https://github.com/sponsors/ntkme
139
139
  rubygems_mfa_required: 'true'
140
140
  rdoc_options: []
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubygems_version: 4.0.19
154
+ rubygems_version: 4.0.20
155
155
  specification_version: 4
156
156
  summary: Use dart-sass with Ruby!
157
157
  test_files: []
Binary file