markawesome 0.18.0 → 0.18.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: b3ce7a2c074d2d33074977cfe3f20c474ba14908e4c07e283c8067e9adce65f4
4
- data.tar.gz: 54c1bdd4ab2c53d11c14589757707b3325555afa5315142fa5341f6842d0b90a
3
+ metadata.gz: 6c2c5ebb3f9f231f78078d8ff504c309a0a20a2b786835db6763b79ec02c2ecb
4
+ data.tar.gz: c2828be808439565b2ff460feaf052ed97640fd9605a973897656d86b71160e6
5
5
  SHA512:
6
- metadata.gz: ae0b842c192958678ed64bca94c3f637d16c58c4c641c8cc02bc69234ca35e322fd4f677d424c959499c692a5b6f1c7acc477123ad86c3c4eb94a2c91c2ae654
7
- data.tar.gz: d870d957d821ca0cd44c46a6afa7175d26436538ed3dae3ce2f7363afb8b1d20aa79a5195743fbfe7b47f5c7494402c89c32ce630acb6010d3f5fa91f1bb2b03
6
+ metadata.gz: 43d62e1980cd64700193e51dfef75007b4a64382ee70b4623283e24d29bd9dc6b0043834411bad243131abf57328587008704c858da90a4dc2d33a3410db9faf
7
+ data.tar.gz: 2668f52f02046b64911bbc7cb979fb4d9cd6c061eb811f3f06a7f21d0a46eb859adf300d836c30b1e544f2b03fabc39617a384c83c12ae70f1159db7b1424c02
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.18.1] - 2026-07-04
10
+
11
+ ### Fixed
12
+
13
+ - **Horizontal cards no longer overflow with multi-block bodies.** A `===horizontal` card whose body has more than one block (e.g. a `#` heading plus a paragraph) now wraps the body in a single `<div>`, so Web Awesome's `:host([orientation='horizontal']) .body slot::slotted(*) { height: 100% }` rule — which it applies to **every** direct body child — targets the one wrapper instead of each block. Previously each block was stretched to the full card height and the extra ones spilled out below the card. Vertical cards are unchanged (no wrapper is emitted). Parity locked by the new `card-horizontal-body-wrap` case in `markawesome-js`'s `test/parity-corpus.test.ts`.
14
+
9
15
  ## [0.18.0] - 2026-07-04
10
16
 
11
17
  ### Added
@@ -138,8 +138,7 @@ module Markawesome
138
138
 
139
139
  # Main content
140
140
  if parts[:content] && !parts[:content].empty?
141
- content_html = markdown_to_html(parts[:content])
142
- html_parts << content_html
141
+ html_parts << body_content_html(parts[:content], orientation)
143
142
  end
144
143
 
145
144
  # Footer slot
@@ -149,6 +148,17 @@ module Markawesome
149
148
 
150
149
  "<wa-card#{attr_string}>#{html_parts.join}</wa-card>"
151
150
  end
151
+
152
+ # Horizontal cards wrap the body in a single <div> so Web Awesome's
153
+ # `:host([orientation='horizontal']) .body slot::slotted(*) { height: 100% }`
154
+ # rule — which it applies to EVERY direct body child — targets one wrapper
155
+ # instead of each block. Without the wrapper a multi-block body (e.g. a
156
+ # heading plus a paragraph) has each child stretched to the full card
157
+ # height, so the extra ones overflow below it.
158
+ def body_content_html(content, orientation)
159
+ content_html = markdown_to_html(content)
160
+ orientation == 'horizontal' ? "<div>#{content_html}</div>" : content_html
161
+ end
152
162
  end
153
163
  end
154
164
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Markawesome
4
- VERSION = '0.18.0'
4
+ VERSION = '0.18.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markawesome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janne Waren