diff --git a/CHANGELOG.md b/CHANGELOG.md
index c20f97245..501abc7c2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+* Add `no-cellborder` and `vertically-tight` tables to `CustomBody`
* Remove numbering from `Learning Objectives` in `bca`
* Change iframe link text
diff --git a/lib/kitchen/directions/bake_numbered_table/bake_table_body.rb b/lib/kitchen/directions/bake_numbered_table/bake_table_body.rb
index 241e36409..0611e8c3e 100644
--- a/lib/kitchen/directions/bake_numbered_table/bake_table_body.rb
+++ b/lib/kitchen/directions/bake_numbered_table/bake_table_body.rb
@@ -87,6 +87,12 @@ def bake(table:, number:, cases: false, label_class: nil)
elsif table.narrow_table?
custom_table = CustomBody.new(table: table, klass: 'narrow-table')
custom_table.modify_body(has_fake_title: false)
+ elsif table.no_cellborder_table?
+ custom_table = CustomBody.new(table: table, klass: 'no-cellborder')
+ custom_table.modify_body(has_fake_title: false)
+ elsif table.vertically_tight_table?
+ custom_table = CustomBody.new(table: table, klass: 'vertically-tight')
+ custom_table.modify_body(has_fake_title: false)
end
return unless table.full_width_table?
diff --git a/lib/kitchen/directions/bake_unnumbered_tables.rb b/lib/kitchen/directions/bake_unnumbered_tables.rb
index 569c58849..544e12714 100644
--- a/lib/kitchen/directions/bake_unnumbered_tables.rb
+++ b/lib/kitchen/directions/bake_unnumbered_tables.rb
@@ -8,6 +8,7 @@ def self.v1(book:)
table.wrap(%(
))
table.remove_attribute('summary')
table.parent.add_class('os-unstyled-container') if table.unstyled?
+ table.parent.add_class('os-no-cellborder-container') if table.no_cellborder_table?
table.parent.add_class('os-column-header-container') if table.column_header?
if table.top_titled?
table.parent.add_class('os-top-titled-container')
diff --git a/lib/kitchen/table_element.rb b/lib/kitchen/table_element.rb
index 4e11f7fee..662c6e125 100644
--- a/lib/kitchen/table_element.rb
+++ b/lib/kitchen/table_element.rb
@@ -137,6 +137,22 @@ def full_width_table?
has_class?('full-width')
end
+ # Returns true if the table is vertically tight
+ #
+ # @return [Boolean]
+ #
+ def vertically_tight_table?
+ has_class?('vertically-tight')
+ end
+
+ # Returns true if the table is no-cellborder
+ #
+ # @return [Boolean]
+ #
+ def no_cellborder_table?
+ has_class?('no-cellborder')
+ end
+
# Returns an element for the table caption, if present
#
# @return [Element, nil]
diff --git a/spec/kitchen_spec/directions/bake_numbered_table/v1_spec.rb b/spec/kitchen_spec/directions/bake_numbered_table/v1_spec.rb
index 17b264be6..949592665 100644
--- a/spec/kitchen_spec/directions/bake_numbered_table/v1_spec.rb
+++ b/spec/kitchen_spec/directions/bake_numbered_table/v1_spec.rb
@@ -116,6 +116,28 @@
).tables.first
end
+ let(:vertically_tight_table) do
+ book_containing(html:
+ one_chapter_with_one_page_containing(
+ <<~HTML
+
+ HTML
+ )
+ ).tables.first
+ end
+
+ let(:no_cellborder_table) do
+ book_containing(html:
+ one_chapter_with_one_page_containing(
+ <<~HTML
+
+ HTML
+ )
+ ).tables.first
+ end
+
let(:full_width_table) do
book_containing(html:
one_chapter_with_one_page_containing(
@@ -225,6 +247,18 @@
expect(narrow_table.document.search('.os-table').first).to match_snapshot_auto
end
+ it 'bakes a vertically-tight table' do
+ described_class.new.bake(table: vertically_tight_table, number: '2.3')
+
+ expect(vertically_tight_table.document.search('.os-table').first).to match_snapshot_auto
+ end
+
+ it 'bakes a no-cellborder table' do
+ described_class.new.bake(table: no_cellborder_table, number: '2.3')
+
+ expect(no_cellborder_table.document.search('.os-table').first).to match_snapshot_auto
+ end
+
it 'bakes a full width table' do
described_class.new.bake(table: full_width_table, number: '2.3')
diff --git a/spec/kitchen_spec/directions/bake_unnumbered_tables_spec.rb b/spec/kitchen_spec/directions/bake_unnumbered_tables_spec.rb
index 3af47ba6e..c12d2bb58 100644
--- a/spec/kitchen_spec/directions/bake_unnumbered_tables_spec.rb
+++ b/spec/kitchen_spec/directions/bake_unnumbered_tables_spec.rb
@@ -59,6 +59,17 @@
)
end
+ let(:book_with_no_cellborder_table) do
+ book_containing(html:
+ one_chapter_with_one_page_containing(
+ <<~HTML
+
+ HTML
+ )
+ )
+ end
+
let(:book_with_top_titled_table) do
book_containing(html:
one_chapter_with_one_page_containing(
@@ -101,6 +112,18 @@
)
end
+ it 'bakes no cellborder table' do
+ described_class.v1(book: book_with_no_cellborder_table)
+ expect(book_with_no_cellborder_table.tables.first.parent).to match_normalized_html(
+ <<~HTML
+
+ HTML
+ )
+ end
+
it 'bakes top-titled table' do
described_class.v1(book: book_with_top_titled_table)
expect(
diff --git a/spec/recipes_spec/books/nursing-external/expected_output.xhtml b/spec/recipes_spec/books/nursing-external/expected_output.xhtml
index 58a2113c2..596d3ab44 100644
--- a/spec/recipes_spec/books/nursing-external/expected_output.xhtml
+++ b/spec/recipes_spec/books/nursing-external/expected_output.xhtml
@@ -1053,7 +1053,7 @@
-->
-
+
@@ -1122,7 +1122,7 @@
Drug Emphasis Table: ACE Inhibitors
-
+
@@ -1289,7 +1289,7 @@
Table 1.4 lists common ARBs and typical routes and dosing for adult and pediatric clients. Table 1.5 is a drug prototype table for ARBs featuring valsartan. It lists drug class, mechanism of action, dosage, indications, therapeutic effects, drug and food interactions, adverse effects, and contraindications.
-
+
@@ -1347,7 +1347,7 @@
Drug Emphasis Table: ARBs
-
+
@@ -1539,7 +1539,7 @@ Asthmatic clients and clients with chronic lung diseases should be monitored car
Table 1.6 lists common beta blockers and typical routes and dosing for adults and children. Table 1.7 is a drug prototype chart for beta-adrenergic blockers featuring metoprolol. It lists drug class, mechanism of action, dosage, indications, therapeutic effects, drug and food interactions, adverse effects, and contraindications.
-
+
@@ -2068,7 +2068,7 @@ Asthmatic clients and clients with chronic lung diseases should be monitored car
Potassium-Sparing Diuretics
Potassium-sparing diuretics antagonize aldosterone. These drugs reduce aldosterone-induced sodium and water retention in the late distal tubules of the kidneys. These types of diuretics spare potassium within the body; therefore, potassium does not need to be supplemented. Potassium-sparing diuretics are commonly used to treat hypertension in clients with impaired renal function.
-
+
@@ -5719,7 +5719,7 @@ Asthmatic clients and clients with chronic lung diseases should be monitored car
Malrotation and Volvulus
Malrotation most often occurs in the small intestines as the digestive tract rotates into its final position as it develops. Volvulus is a severe complication of a malrotation in which the improper rotation blocks blood flow to the digestive tract, causing ischemia (Columbia University Irving Medical Center, n.d.). While malrotation can be the cause of a volvulus, a volvulus can also occur with the absence of malrotation (Table 4.2). There will be fractions in text, such as 2½ cups or even ¾ cup of this food provides 40% of the recommended daily allowance.
-
+
@@ -5808,7 +5808,7 @@ Asthmatic clients and clients with chronic lung diseases should be monitored car
-
+
@@ -6024,7 +6024,7 @@ Asthmatic clients and clients with chronic lung diseases should be monitored car
-
+
@@ -6494,7 +6494,7 @@ If the client has dentures, bridges, or other removable dental appliances, have
Deviations
Deviations from these normal findings can indicate health problems within the lower gastrointestinal tract and accessory organs that can impact the body’s ability to break down and absorb nutrition and eliminate wastes. On inspection many things can be found as a deviation from expected findings. Abdominal distention can indicate a very wide range of problems like small bowel obstruction, abdominal aortic aneurysm, masses, tumors, splenomegaly, hepatomegaly, hernia, cancer, and constipation (Mealie et al., 2022). Visible patches of ecchymosis on the abdomen can indicate several forms of hemorrhage in the abdomen. Grey Turner sign which is ecchymosis of the flank and groin is seen in pancreatic hemorrhages while Cullen’s sign which is periumbilical ecchymosis is seen in retroperitoneal and intra-abdominal hemorrhages. Purple-pink striae in the absence of late pregnancy can indicate Cushing’s syndrome; vein dilation seen as a visible vascular pattern can indicate portal hypertension or vena cava obstruction; and Caput Medusae, abdominal distention, and jaundice can indicate cirrhosis and/or other liver failure. Any open skin in the form of a fistula or sinus can indicate a deeper infection. Very marked aortic pulsations, even in very lean clients, can be indicative of aortic aneurysm (Pearson Education, 2018). For newborns and young infants with umbilical cord stumps still in place, umbilical hernias may be seen as weakened appearing fascia below the umbilicus (Gantan & Wiedrich, 2022). Other deviations in the umbilical stump appearance can include surrounding erythema, induration and tenderness (on palpation), all of which can indicate ]omphalitis and should be reported immediately. All deviations from expected findings should be reported; however, signs of hemorrhage and severe distention should be reported immediately (see Table 4.5 for easy reference).
-
+
diff --git a/spec/snapshots/Kitchen_Directions_BakeNumberedTable_V1_bakes_a_no_cellborder_table.snap b/spec/snapshots/Kitchen_Directions_BakeNumberedTable_V1_bakes_a_no_cellborder_table.snap
new file mode 100644
index 000000000..65fab74f7
--- /dev/null
+++ b/spec/snapshots/Kitchen_Directions_BakeNumberedTable_V1_bakes_a_no_cellborder_table.snap
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/spec/snapshots/Kitchen_Directions_BakeNumberedTable_V1_bakes_a_vertically_tight_table.snap b/spec/snapshots/Kitchen_Directions_BakeNumberedTable_V1_bakes_a_vertically_tight_table.snap
new file mode 100644
index 000000000..9cb746385
--- /dev/null
+++ b/spec/snapshots/Kitchen_Directions_BakeNumberedTable_V1_bakes_a_vertically_tight_table.snap
@@ -0,0 +1,8 @@
+
\ No newline at end of file
|