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 +4 -4
- data/lib/mjml-rb/components/social.rb +69 -0
- data/lib/mjml-rb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f821f46d065dc6d6f587dab7e8a7617b29cb0806b6fcfdf2315716e1dbcd2ca5
|
|
4
|
+
data.tar.gz: 46bab2d4220a372ee0b4116cc8e3592a7a8e8f40736ac2c30a7cc959f640e5b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/mjml-rb/version.rb
CHANGED