activemail 2.1.0 → 2.1.1

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: 3dc3ba94cb3bbe53858813d40a054636f6b445a39fa7c52fcd0a8839e1fb6af0
4
- data.tar.gz: 0a9f87dd6be3ed968f7a24d0110e0a59d52074d0a582ee8dd69ee430bf126784
3
+ metadata.gz: ec710853bef9007bed632f4224ed565c37014a0a8749917b921d2fb1172ee4f2
4
+ data.tar.gz: 6b9bd91c3e8590a65cc7d8389dda58290b2ebe2e228ad20f400d3e371cd00213
5
5
  SHA512:
6
- metadata.gz: 71a238775cdcfee13478fded9dee238e7abc374bd481ff0a8e4995616f329d6490efe939b0fc4bd4d8ae4fb8ab2b8622f44b162aa89c94fb1152570d0f1a8a9b
7
- data.tar.gz: ef6f072e79dd25da4149fd47db1abbc33b0c97afd198835c97d36b5f1624e23e2245affef488fc931b323ba3e1a9842a45f3177c4b14abf1740d9121d351da42
6
+ metadata.gz: 07e90ca61f098953fd6c76ff0eb57d77b6165c9a597fec90362c878cfea84d7e0c017f8d0284dad025e555714cace1f93558845aefce50b7a9f1d75bab8af273
7
+ data.tar.gz: ee42a0bcb06d56a651495c293a776cfed17642e09ae7e30220b9dc5db1d2a93c86d2bbbb894e52057aecc6afb97c91f659d188ec10908dfe16dc629ba188920c
data/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project are documented here.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.1.1] - 2026-10-19
9
+
10
+ ### Fixed
11
+
12
+ - `<center>` adds `align="center"` and `.float-center` to its direct children and
13
+ nested menu items again, as in 2.0: since 2.1.0 a centered table, image or
14
+ paragraph stayed left-aligned and paragraphs got their default margins back.
15
+
8
16
  ## [2.1.0] - 2026-10-19
9
17
 
10
18
  Behaviour changes to review before upgrading: see [UPGRADING.md](UPGRADING.md).
@@ -42,7 +50,7 @@ Behaviour changes to review before upgrading: see [UPGRADING.md](UPGRADING.md).
42
50
  `<a>` carries `display:inline-block`, the body font and a `1.25` line height.
43
51
  The dark-mode fill targets the cell.
44
52
  - `<center>` renders a `<center align="center" class="float-center">` and no
45
- longer rewrites its children.
53
+ longer rewrites its children (reverted in 2.1.1).
46
54
  - A mailer that declines to send (`NullMail`) is a `declined` violation unless
47
55
  allowed.
48
56
  - The generated layouts render the same `_document_head`, `_head` and `_footer`
@@ -241,6 +249,7 @@ toolkit for Rails.
241
249
  - Rails `>= 7.1` (tested up to 8.1).
242
250
  - Nokogiri `>= 1.16`.
243
251
 
252
+ [2.1.1]: https://github.com/AdVitam/activemail/compare/v2.1.0...v2.1.1
244
253
  [2.1.0]: https://github.com/AdVitam/activemail/compare/v2.0.0...v2.1.0
245
254
  [2.0.0]: https://github.com/AdVitam/activemail/compare/v1.2.3...v2.0.0
246
255
  [1.0.1]: https://github.com/AdVitam/activemail/compare/v1.0.0...v1.0.1
data/README.md CHANGED
@@ -270,7 +270,7 @@ only, and a variant border sits on the cell as well. `class="secondary"` selects
270
270
 
271
271
  - `<wrapper class="header">` → `<table class="header wrapper" align="center" style="width:100%;">` with a `.wrapper-inner` cell.
272
272
  - `<h-line>` → a full-width single-cell table drawn as a 1px rule in the `border` color.
273
- - `<center>` renders a `<center align="center" class="float-center">` around its content and leaves the content untouched.
273
+ - `<center>` renders a `<center align="center" class="float-center">` and adds `align="center"` and `.float-center` to its direct children and nested menu items.
274
274
 
275
275
  ### `<raw>`
276
276
 
data/UPGRADING.md CHANGED
@@ -36,13 +36,6 @@ text area is 16px narrower on each side.
36
36
  `line-height:1.25`; the cell gets `mso-padding-alt`.
37
37
  - A dark-mode override of the button fill must target `table td`, not `a`.
38
38
 
39
- ## Center
40
-
41
- `<center>` no longer adds `align="center"` and `.float-center` to its children
42
- (nor to nested menu items): it renders one `<center align="center">` and leaves
43
- its content as written. Put `class="float-center"` or `align="center"` on the
44
- children that need it.
45
-
46
39
  ## Layouts
47
40
 
48
41
  The `<head>` of the default layout moved to `layouts/activemail/_document_head`,
@@ -10,6 +10,11 @@ module ActiveMail
10
10
 
11
11
  sig { override.params(node: Nokogiri::XML::Node, inner: String).returns(String) }
12
12
  def transform(node, inner)
13
+ node.elements.each do |child|
14
+ child['align'] = 'center'
15
+ child['class'] = combine_classes(child, 'float-center')
16
+ end
17
+ node.css('.menu-item').each { |item| item['class'] = combine_classes(item, 'float-center') }
13
18
  %(<center#{root_attributes(node, classes: 'float-center')} align="center">#{inner}</center>)
14
19
  end
15
20
 
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module ActiveMail
5
- VERSION = '2.1.0'
5
+ VERSION = '2.1.1'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemail
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Advitam