css_parser 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/css_parser/rule_set.rb +7 -8
- data/lib/css_parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 351dd37c4f67732bcc07deb8d86c00ff6d15931787a3c08880ee8b4321fdf27e
|
4
|
+
data.tar.gz: bc830e26b6b15e06af401f0a1e9abed835e2deec34cd2986c428baca1d51d18b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0013771da7b78cf5f9ef4edb4af039a535d4b9e8709d68808159a27df9f6d76649f6976f4bbecace5773e5b7b1d1fc3e3a7afbd85be267765d5beee2ac565877
|
7
|
+
data.tar.gz: 7ef404fe368409bb2951764e232b2364522b76a5c72f171c4560f5ba70a3c51b0d149709a9e4777ae2bc8049241358b6b382005fdc18298ea0d8b24085476a15
|
data/lib/css_parser/rule_set.rb
CHANGED
@@ -511,23 +511,22 @@ module CssParser
|
|
511
511
|
#
|
512
512
|
# TODO: this is extremely similar to create_background_shorthand! and should be combined
|
513
513
|
def create_border_shorthand! # :nodoc:
|
514
|
-
values =
|
515
|
-
|
516
|
-
BORDER_STYLE_PROPERTIES.each do |property|
|
514
|
+
values = BORDER_STYLE_PROPERTIES.map do |property|
|
517
515
|
next unless (declaration = declarations[property])
|
518
516
|
next if declaration.important
|
519
|
-
|
520
517
|
# can't merge if any value contains a space (i.e. has multiple values)
|
521
518
|
# we temporarily remove any spaces after commas for the check (inside rgba, etc...)
|
522
|
-
|
519
|
+
next if declaration.value.gsub(/,\s/, ',').strip =~ /\s/
|
523
520
|
|
524
|
-
|
521
|
+
declaration.value
|
522
|
+
end.compact
|
523
|
+
|
524
|
+
return if values.size != BORDER_STYLE_PROPERTIES.size
|
525
525
|
|
526
|
+
BORDER_STYLE_PROPERTIES.each do |property|
|
526
527
|
declarations.delete(property)
|
527
528
|
end
|
528
529
|
|
529
|
-
return if values.empty?
|
530
|
-
|
531
530
|
declarations['border'] = values.join(' ')
|
532
531
|
end
|
533
532
|
|
data/lib/css_parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Dunae
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|