mjml-rb 0.2.25 → 0.2.26

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: e364fd8b1b8bb2e9020dec1afe71062b8efa5e6db3000edead4dad5280adb5c5
4
- data.tar.gz: d975ccd74e68c83cd9324c538bd76046d9e2b29a9ce27e23054ebde79195bc6e
3
+ metadata.gz: f821f46d065dc6d6f587dab7e8a7617b29cb0806b6fcfdf2315716e1dbcd2ca5
4
+ data.tar.gz: 46bab2d4220a372ee0b4116cc8e3592a7a8e8f40736ac2c30a7cc959f640e5b1
5
5
  SHA512:
6
- metadata.gz: 147b6bf2c9abda80086c29e440d002d3fab3768e96ee71e7faa8e8be5defb2e91e11d51ee422ce07caf3f2a698f23dd1001382bc3e69a4e1bd0e49d68a7f0659
7
- data.tar.gz: 142f4902cb84b3fa00adb1608186d13e40559e60127c18ac7213bcf89804069bafc97666b2013d67fd3fdd2083a75b27e38fa63e97d71ed7cc9600bf9d92eba6
6
+ metadata.gz: 0b1925984de0312ff6090c68d4fa70e49cccebfba14c1de94c56e0eece6828deac28e5b32e86f3f49afcaf962797ab696dd5f80ed5852400a4d515b6bea4cdd0
7
+ data.tar.gz: 42c8b09f6e014157186153483bd6b7fa77aa141c52cb0aa4a2dffaacf71d216082881a3a4760676b17c1b920740456ec3190cfa95d389c8bdbd35a2f73f2ce8a
@@ -32,6 +32,75 @@ module MjmlRb
32
32
  end
33
33
  end.freeze
34
34
 
35
+ SOCIAL_ALLOWED_ATTRIBUTES = {
36
+ "align" => "enum(left,right,center)",
37
+ "border-radius" => "unit(px,%)",
38
+ "container-background-color" => "color",
39
+ "color" => "color",
40
+ "font-family" => "string",
41
+ "font-size" => "unit(px)",
42
+ "font-style" => "string",
43
+ "font-weight" => "string",
44
+ "icon-size" => "unit(px,%)",
45
+ "icon-height" => "unit(px,%)",
46
+ "icon-padding" => "unit(px,%){1,4}",
47
+ "inner-padding" => "unit(px,%){1,4}",
48
+ "line-height" => "unit(px,%,)",
49
+ "mode" => "enum(horizontal,vertical)",
50
+ "padding-bottom" => "unit(px,%)",
51
+ "padding-left" => "unit(px,%)",
52
+ "padding-right" => "unit(px,%)",
53
+ "padding-top" => "unit(px,%)",
54
+ "padding" => "unit(px,%){1,4}",
55
+ "table-layout" => "enum(auto,fixed)",
56
+ "text-padding" => "unit(px,%){1,4}",
57
+ "text-decoration" => "string",
58
+ "vertical-align" => "enum(top,bottom,middle)"
59
+ }.freeze
60
+
61
+ SOCIAL_ELEMENT_ALLOWED_ATTRIBUTES = {
62
+ "align" => "enum(left,center,right)",
63
+ "icon-position" => "enum(left,right)",
64
+ "background-color" => "color",
65
+ "color" => "color",
66
+ "border-radius" => "unit(px)",
67
+ "font-family" => "string",
68
+ "font-size" => "unit(px)",
69
+ "font-style" => "string",
70
+ "font-weight" => "string",
71
+ "href" => "string",
72
+ "icon-size" => "unit(px,%)",
73
+ "icon-height" => "unit(px,%)",
74
+ "icon-padding" => "unit(px,%){1,4}",
75
+ "line-height" => "unit(px,%,)",
76
+ "name" => "string",
77
+ "padding-bottom" => "unit(px,%)",
78
+ "padding-left" => "unit(px,%)",
79
+ "padding-right" => "unit(px,%)",
80
+ "padding-top" => "unit(px,%)",
81
+ "padding" => "unit(px,%){1,4}",
82
+ "text-padding" => "unit(px,%){1,4}",
83
+ "rel" => "string",
84
+ "src" => "string",
85
+ "srcset" => "string",
86
+ "sizes" => "string",
87
+ "alt" => "string",
88
+ "title" => "string",
89
+ "target" => "string",
90
+ "text-decoration" => "string",
91
+ "vertical-align" => "enum(top,middle,bottom)"
92
+ }.freeze
93
+
94
+ class << self
95
+ def allowed_attributes_for(tag_name)
96
+ tag_name == "mj-social-element" ? SOCIAL_ELEMENT_ALLOWED_ATTRIBUTES : SOCIAL_ALLOWED_ATTRIBUTES
97
+ end
98
+
99
+ def allowed_attributes
100
+ SOCIAL_ALLOWED_ATTRIBUTES
101
+ end
102
+ end
103
+
35
104
  # Attributes Social parent passes down to its mj-social-element children
36
105
  INHERITED_ATTRS = %w[
37
106
  border-radius color font-family font-size font-weight font-style
@@ -1,3 +1,3 @@
1
1
  module MjmlRb
2
- VERSION = "0.2.25".freeze
2
+ VERSION = "0.2.26".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mjml-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.25
4
+ version: 0.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Andriichuk