sassc-embedded 1.78.0 → 1.79.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6436923b7f104059a6be6bf037be772b3191a12478b44457dcddd6dd2913e4b2
4
- data.tar.gz: 81e184f8d2f343d23c7d8228e4cb62c7aa7343cfb609ff93aa3793b3af4abb05
3
+ metadata.gz: 66fd09940c4005fa13fef08722e1a29409d784c5d288ce2f3a13548532b89ee4
4
+ data.tar.gz: 7fbb946f5ded3c950defdb5686d8be13d92fd61da46d1103d908f37f316cfdaa
5
5
  SHA512:
6
- metadata.gz: '09ad73cfc4311af1d2c2219b897a3d2a4393c7ed000736187bca650c94941470445a022f1299eb9d5ddb8defc118addb647560f8c703919e0319353a9d9acd63'
7
- data.tar.gz: 6891a983e30abec954405faca7b83ab3f4f2d9ecfc72f4724319c82f90f8c29eed650d73f14efc85b7003eb97747cbc3b52bb34e9ae6ec9f342c41257a4817fd
6
+ metadata.gz: 414d5d19de1f3acbc3e51ab41126fb9d0faeeb84aa8e410bbbcbb68d8ff1e6188d94bc95c95f05f1a2897027a918dd4e22ef39826b5d7d9d9ee20d28c3fe7b72
7
+ data.tar.gz: ac70c7c62a22b9e1fbd1df0c24da29afd2ee31b13800bb6f97b59f5cd032459cab04d2ca96b86bf9ba084b807ca54c37cb8a7101b0ceb0434da49bb7b8f7f5d6
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SassC
4
4
  module Embedded
5
- VERSION = '1.78.0'
5
+ VERSION = '1.79.0'
6
6
  end
7
7
  end
@@ -456,6 +456,10 @@ module SassC
456
456
  end
457
457
 
458
458
  module ValueConversion
459
+ COLOR4 = Sass::Value::Color.method_defined?(:space)
460
+
461
+ private_constant :COLOR4
462
+
459
463
  class << self
460
464
  remove_method(:from_native) if public_method_defined?(:from_native, false)
461
465
  end
@@ -467,7 +471,26 @@ module SassC
467
471
  when ::Sass::Value::Boolean
468
472
  ::SassC::Script::Value::Bool.new(value.to_bool)
469
473
  when ::Sass::Value::Color
470
- if value.instance_eval { defined? @hue }
474
+ if COLOR4
475
+ case value.space
476
+ when 'hsl', 'hwb'
477
+ value = value.to_space('hsl')
478
+ ::SassC::Script::Value::Color.new(
479
+ hue: value.channel('hue'),
480
+ saturation: value.channel('saturation'),
481
+ lightness: value.channel('lightness'),
482
+ alpha: value.alpha
483
+ )
484
+ else
485
+ value = value.to_space('rgb')
486
+ ::SassC::Script::Value::Color.new(
487
+ red: value.channel('red'),
488
+ green: value.channel('green'),
489
+ blue: value.channel('blue'),
490
+ alpha: value.alpha
491
+ )
492
+ end
493
+ elsif value.instance_eval { defined? @hue }
471
494
  ::SassC::Script::Value::Color.new(
472
495
  hue: value.hue,
473
496
  saturation: value.saturation,
@@ -528,6 +551,7 @@ module SassC
528
551
  when ::SassC::Script::Value::Color
529
552
  if value.rgba?
530
553
  ::Sass::Value::Color.new(
554
+ **(COLOR4 ? { space: 'rgb' } : {}),
531
555
  red: value.red,
532
556
  green: value.green,
533
557
  blue: value.blue,
@@ -535,6 +559,7 @@ module SassC
535
559
  )
536
560
  elsif value.hlsa?
537
561
  ::Sass::Value::Color.new(
562
+ **(COLOR4 ? { space: 'hsl' } : {}),
538
563
  hue: value.hue,
539
564
  saturation: value.saturation,
540
565
  lightness: value.lightness,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassc-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.78.0
4
+ version: 1.79.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-03 00:00:00.000000000 Z
11
+ date: 2024-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass-embedded
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.78'
19
+ version: '1.79'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.78'
26
+ version: '1.79'
27
27
  description: An embedded sass shim for SassC.
28
28
  email:
29
29
  - i@ntk.me
@@ -79,7 +79,7 @@ licenses:
79
79
  metadata:
80
80
  bug_tracker_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/issues
81
81
  documentation_uri: https://rubydoc.info/gems/sassc
82
- source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.78.0
82
+ source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.79.0
83
83
  funding_uri: https://github.com/sponsors/ntkme
84
84
  rubygems_mfa_required: 'true'
85
85
  post_install_message: