Repository: zhiburt/tabled
Pull request #322 (2023-04-08 15:28:49)

Rename a `json_to_table::Orientation::*` and `papergrid::set_margin/padding` methods


Patch:
diff --git a/csv_to_table/examples/csv_table.rs b/csv_to_table/examples/csv_table.rs
index 49f0e78..ed2d3d5 100644
--- a/csv_to_table/examples/csv_table.rs
+++ b/csv_to_table/examples/csv_table.rs
@@ -1,11 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example csv_table`
-//!
 //! This example demonstrates reading a csv string to a [`Table`] struct.
 //!
-//! ---
-//!
 //! * Note the necessary step of representing the string as a byte array.
 
 fn main() {
diff --git a/csv_to_table/examples/iter.rs b/csv_to_table/examples/iter.rs
index d2277ff..20c03e6 100644
--- a/csv_to_table/examples/iter.rs
+++ b/csv_to_table/examples/iter.rs
@@ -1,11 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example iter`
-//!
 //! This example demonstrates an alternative parsing option for [`csv_to_table`] translations.
 //!
-//! ---
-//!
 //! * The [`IterTable::sniff()`] formatting function is used to control how many
 //! rows will be considered in determining column widths. Since the default sniff value is 1000,
 //! this is helpful for controlling large dataset display outputs.
diff --git a/json_to_table/README.md b/json_to_table/README.md
index 68e7a00..375dd07 100644
--- a/json_to_table/README.md
+++ b/json_to_table/README.md
@@ -196,7 +196,7 @@ fn main() {
     );
 
     let table = json_to_table(&value)
-        .set_object_mode(Orientation::Horizontal)
+        .set_object_mode(Orientation::Row)
         .to_string();
 
     println!("{}", table)
diff --git a/json_to_table/examples/collapse.rs b/json_to_table/examples/collapse.rs
index a586e72..36f7d00 100644
--- a/json_to_table/examples/collapse.rs
+++ b/json_to_table/examples/collapse.rs
@@ -1,13 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example collapse`
-//!
 //! This example demonstrates using the [`JsonTable::collapse`] function
 //! to greatly improve the readability of a [`JsonTable`].
-//!
-//! ---
-//!
-//! * Note that a [`JsonTable`] must be mutably defined to be collapsed.
 
 use json_to_table::json_to_table;
 
diff --git a/json_to_table/examples/json_to_table.rs b/json_to_table/examples/json_to_table.rs
index 018ebaf..21f6065 100644
--- a/json_to_table/examples/json_to_table.rs
+++ b/json_to_table/examples/json_to_table.rs
@@ -1,13 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example json_to_table`
-//!
 //! This example demonstrates parsing a JSON literal to a [`Value`],
 //! and then translating that value to a [`JsonTable`] struct.
-//!
-//! ---
-//!
-//! * Note how the [`json_to_table`] function is used for easy translations.
 
 use json_to_table::json_to_table;
 
diff --git a/json_to_table/examples/orientation.rs b/json_to_table/examples/orientation.rs
index 53f59a9..4d03c29 100644
--- a/json_to_table/examples/orientation.rs
+++ b/json_to_table/examples/orientation.rs
@@ -1,17 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example orientation`
-//!
 //! This example demonstrates several [`JsonTable`] functions for rotating
-//! the arrangement of keys and values with the following functions:
-//!
-//! - [`JsonTable::set_array_mode`]
-//! - [`JsonTable::set_object_mode`]
-//! - [`JsonTable::set_mode_visitor`]
-//!
-//! ---
-//!
-//! * Note the shared [`Orientation`] enum between these methods.
+//! the arrangement of keys and values
 
 use json_to_table::{json_to_table, Orientation};
 
@@ -33,8 +21,8 @@ fn main() {
 
     let mut htable = json_to_table(&json);
     htable
-        .array_orientation(Orientation::Horizontal)
-        .object_orientation(Orientation::Horizontal);
+        .array_orientation(Orientation::Row)
+        .object_orientation(Orientation::Row);
 
     let ctable = json_to_table(&json);
 
diff --git a/json_to_table/examples/reader.rs b/json_to_table/examples/reader.rs
index ffd76ed..edd1a96 100644
--- a/json_to_table/examples/reader.rs
+++ b/json_to_table/examples/reader.rs
@@ -4,8 +4,6 @@
 //!
 //! This example demonstrates parsing json from the [`Stdin`]\(standard input) to a [`JsonTable`].
 //!
-//! ---
-//!
 //! * Check out [`serde_json`] for other helpful ways to import json data into your project.
 //! * Check out [`std::env`] and [`std::io`] for more examples of dealing with system streams.
 //! * Windows alternatives for the unix `cat` command:
diff --git a/json_to_table/src/table/collapsed_table.rs b/json_to_table/src/table/collapsed_table.rs
index ea31cc3..30ff787 100644
--- a/json_to_table/src/table/collapsed_table.rs
+++ b/json_to_table/src/table/collapsed_table.rs
@@ -90,8 +90,8 @@ fn _collapsed_table(val: &Value, cfg: &Config, dims: &Dimensions, ctx: PrintCont
             }
 
             match cfg.object_orientation {
-                Orientation::Vertical => generate_vertical_object(obj, cfg, dims, ctx),
-                Orientation::Horizontal => generate_horizontal_object(obj, cfg, dims, ctx),
+                Orientation::Column => generate_vertical_object(obj, cfg, dims, ctx),
+                Orientation::Row => generate_horizontal_object(obj, cfg, dims, ctx),
             }
         }
         Value::Array(list) => {
@@ -101,8 +101,8 @@ fn _collapsed_table(val: &Value, cfg: &Config, dims: &Dimensions, ctx: PrintCont
             }
 
             match cfg.array_orientation {
-                Orientation::Vertical => generate_vertical_array(list, cfg, dims, ctx),
-                Orientation::Horizontal => generate_horizontal_array(list, cfg, dims, ctx),
+                Orientation::Column => generate_vertical_array(list, cfg, dims, ctx),
+                Orientation::Row => generate_horizontal_array(list, cfg, dims, ctx),
             }
         }
     }
@@ -895,13 +895,13 @@ fn __collect_table_dims(
             let has_horizontal = cfg.cfg.get_borders().has_top();
 
             match cfg.object_orientation {
-                Orientation::Vertical => {
+                Orientation::Column => {
                     let total_width = key_max.width + val_max.width + has_vertical as usize;
                     total_height += has_horizontal as usize * (obj.len() - 1);
 
                     (Dim::new(total_width, total_height), count_elements)
                 }
-                Orientation::Horizontal => {
+                Orientation::Row => {
                     let total_height = key_max.height + val_max.height + has_horizontal as usize;
                     total_width += has_vertical as usize * (obj.len() - 1);
 
@@ -947,13 +947,13 @@ fn __collect_table_dims(
             buf.arrays.insert(pos, index);
 
             match cfg.array_orientation {
-                Orientation::Vertical => {
+                Orientation::Column => {
                     let has_horizontal = cfg.cfg.get_borders().has_top();
                     total_height += has_horizontal as usize * (list.len() - 1);
 
                     (Dim::new(max_width, total_height), count_elements)
                 }
-                Orientation::Horizontal => {
+                Orientation::Row => {
                     let has_vertical = cfg.cfg.get_borders().has_left();
                     total_width += has_vertical as usize * (list.len() - 1);
 
@@ -992,12 +992,12 @@ fn str_dimension(text: &str, cfg: &Config) -> Dim {
 
 fn get_padding_horizontal(cfg: &Config) -> usize {
     let pad = cfg.cfg.get_padding(Entity::Global);
-    pad.left.indent.size + pad.right.indent.size
+    pad.left.size + pad.right.size
 }
 
 fn get_padding_vertical(cfg: &Config) -> usize {
     let pad = cfg.cfg.get_padding(Entity::Global);
-    pad.top.indent.size + pad.bottom.indent.size
+    pad.top.size + pad.bottom.size
 }
 
 fn split_value(value: usize, by: usize) -> (usize, usize) {
@@ -1008,8 +1008,8 @@ fn split_value(value: usize, by: usize) -> (usize, usize) {
 
 fn config_string(value: &str, cfg: &ColoredConfig, width: usize, height: usize) -> String {
     let pad = cfg.get_padding(Entity::Global);
-    let width = width - pad.left.indent.size - pad.right.indent.size;
-    let height = height - pad.bottom.indent.size - pad.top.indent.size;
+    let width = width - pad.left.size - pad.right.size;
+    let height = height - pad.bottom.size - pad.top.size;
     let ah = *cfg.get_alignment_horizontal(Entity::Global);
     let av = *cfg.get_alignment_vertical(Entity::Global);
     set_string_dimension(value, width, height, ah, av)
diff --git a/json_to_table/src/table/mod.rs b/json_to_table/src/table/mod.rs
index b2c0ac1..af9fa89 100644
--- a/json_to_table/src/table/mod.rs
+++ b/json_to_table/src/table/mod.rs
@@ -17,7 +17,6 @@ mod plain_table;
 
 /// Converter of [`Value`] to a table,
 /// with a set of configurations.
-// todo: rename to ValueTable.
 #[derive(Debug, Clone)]
 pub struct JsonTable<T> {
     value: T,
@@ -32,8 +31,8 @@ impl<T> JsonTable<T> {
             cfg: Config {
                 plain: true,
                 cfg: ColoredConfig::new(configure_grid(), Default::default()),
-                array_orientation: Orientation::Vertical,
-                object_orientation: Orientation::Vertical,
+                array_orientation: Orientation::Column,
+                object_orientation: Orientation::Column,
             },
         }
     }
@@ -144,9 +143,9 @@ struct Config {
 #[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord)]
 pub enum Orientation {
     /// Vertical mode (from top to bottom).
-    Vertical,
+    Row,
     /// Horizontal mode (from left to right).
-    Horizontal,
+    Column,
 }
 
 fn configure_grid() -> SpannedConfig {
diff --git a/json_to_table/src/table/plain_table.rs b/json_to_table/src/table/plain_table.rs
index 19cd2d8..f09ca29 100644
--- a/json_to_table/src/table/plain_table.rs
+++ b/json_to_table/src/table/plain_table.rs
@@ -11,7 +11,7 @@ pub(super) fn plain_table(v: &Value, cfg: &Config) -> String {
 fn _plain_table(v: &Value, cfg: &Config, outer: bool) -> String {
     match v {
         Value::Array(arr) => match cfg.array_orientation {
-            Orientation::Vertical => {
+            Orientation::Column => {
                 let mut buf = Builder::with_capacity(1);
                 buf.hint_column_size(1);
                 for value in arr {
@@ -21,7 +21,7 @@ fn _plain_table(v: &Value, cfg: &Config, outer: bool) -> String {
 
                 buf.build().with(&cfg.cfg).to_string()
             }
-            Orientation::Horizontal => {
+            Orientation::Row => {
                 let mut buf = Vec::with_capacity(arr.len());
                 for value in arr {
                     let val = _plain_table(value, cfg, false);
@@ -32,7 +32,7 @@ fn _plain_table(v: &Value, cfg: &Config, outer: bool) -> String {
             }
         },
         Value::Object(map) => match cfg.object_orientation {
-            Orientation::Vertical => {
+            Orientation::Column => {
                 let mut buf = Builder::with_capacity(map.len());
                 for (key, value) in map {
                     let val = _plain_table(value, cfg, false);
@@ -41,7 +41,7 @@ fn _plain_table(v: &Value, cfg: &Config, outer: bool) -> String {
 
                 buf.build().with(&cfg.cfg).to_string()
             }
-            Orientation::Horizontal => {
+            Orientation::Row => {
                 let mut keys = Vec::with_capacity(map.len());
                 let mut vals = Vec::with_capacity(map.len());
                 for (key, value) in map {
diff --git a/papergrid/examples/color_map.rs b/papergrid/examples/color_map.rs
index bd94ae0..e9c238e 100644
--- a/papergrid/examples/color_map.rs
+++ b/papergrid/examples/color_map.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --features color --example color_map`
-//!
 //! This example demonstrates using a [`HashMap`] of colors to simplify styling
 //! sections of a [`Grid`] without embedding ANSI escape characters into cell values.
 //!
-//! ---
-//!
 //! * 🚩 This example requires the `color` feature.
 //!
 //! * Check out [`owo_colors`] for additional styling options available through their API.
diff --git a/papergrid/examples/colored_border.rs b/papergrid/examples/colored_border.rs
index 41e41f1..ec7ff28 100644
--- a/papergrid/examples/colored_border.rs
+++ b/papergrid/examples/colored_border.rs
@@ -1,13 +1,7 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --features color --example colored_border`
-//!
 //! This example demonstrates using colors to stylize [`Grid`] borders.
 //! Borders can be set globally with [`SpannedConfig::set_border_color_global()`]
 //! or individually with [`SpannedConfig::set_border_color()`].
 //!
-//! ---
-//!
 //! * 🚩 This example requires the `color` feature.
 //!
 //! * [`CompactConfig`] also supports colorization when the `color` feature is enabled.
diff --git a/papergrid/examples/common_grid.rs b/papergrid/examples/common_grid.rs
index c388e24..a0fc8d4 100644
--- a/papergrid/examples/common_grid.rs
+++ b/papergrid/examples/common_grid.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example common_grid`
-//!
 //! This example demonstrates the flexibility of [`papergrid`] with manual configurations
 //! of [`Borders`], [`CompactConfig`], and column counts with [`IterRecords`].
 //!
-//! ---
-//!
 //! * For an alternative to [`CompactGrid`] and [`CompactGridDimension`] with
 //! flexible row height, variable intra-column spans, and multiline cell support
 //! see [`Grid`] and [`SpannedGridDimension`].
diff --git a/papergrid/examples/common_grid_no_std.rs b/papergrid/examples/common_grid_no_std.rs
index c6465e3..ebb77bc 100644
--- a/papergrid/examples/common_grid_no_std.rs
+++ b/papergrid/examples/common_grid_no_std.rs
@@ -1,11 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example common_grid_no_std`
-//!
 //! This example demonstrates using [`papergrid`] without [The Rust Standard Library](std).
 //!
-//! ---
-//!
 //! * Note the missing, pre-built [`Dimension`] implementations requiring manual design.
 
 use papergrid::{
diff --git a/papergrid/examples/hello_world.rs b/papergrid/examples/hello_world.rs
index 6ad684f..90be1fa 100644
--- a/papergrid/examples/hello_world.rs
+++ b/papergrid/examples/hello_world.rs
@@ -1,17 +1,9 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example hello_world`
-//!
 //! This example demonstrates the flexibility of [`papergrid`] with manual configurations
 //! of [`Borders`], [`SpannedConfig`], and column counts with [`IterRecords`].
 //!
-//! ---
-//!
 //! * For an alternative to [`Grid`] and [`SpannedGridDimension`] with
 //! uniform row height and intra-column spans see [`CompactGrid`] and [`CompactGridDimension`].
-//!
 //! * Note that [`Grid`] supports multiline cells whereas [`CompactGrid`] does not.
-//!
 //! * Note that [`Dimension`] implementations rely on [`Dimension::estimate()`]
 //! to correctly format outputs, and typically trigger index-out-of-bounds errors otherwise.
 
diff --git a/papergrid/examples/papergrid_color.rs b/papergrid/examples/papergrid_color.rs
index 87690d4..f634c0d 100644
--- a/papergrid/examples/papergrid_color.rs
+++ b/papergrid/examples/papergrid_color.rs
@@ -1,11 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --features color --example papergrid_color`
-//!
 //! This example demonstrates using colors to stylize [`Grid`] cells.
 //!
-//! ---
-//!
 //! * 🚩 This example requires the `color` feature.
 //!
 //! * Note that this example uses inline ANSI escape characters to style
diff --git a/papergrid/src/config/spanned/borders_config.rs b/papergrid/src/config/spanned/borders_config.rs
index 91c291c..fe77298 100644
--- a/papergrid/src/config/spanned/borders_config.rs
+++ b/papergrid/src/config/spanned/borders_config.rs
@@ -108,6 +108,8 @@ impl<T: std::fmt::Debug> BordersConfig<T> {
             self.layout.left = true;
         }
 
+        // todo: when we delete lines these are still left set; so has_horizontal/vertical return true in some cases;
+        // it shall be fixed, but maybe we can improve the logic as it got a bit complicated.
         if line.right.is_some() {
             self.layout.right = true;
         }
@@ -124,8 +126,13 @@ impl<T: std::fmt::Debug> BordersConfig<T> {
         self.horizontals.get(&row)
     }
 
-    pub(crate) fn remove_horizontal_line(&mut self, row: usize) {
+    pub(crate) fn remove_horizontal_line(&mut self, row: usize, count_rows: usize) {
         self.horizontals.remove(&row);
+        self.layout.horizontals.remove(&row);
+
+        if self.has_horizontal(row, count_rows) {
+            self.layout.horizontals.insert(row);
+        }
     }
 
     pub(crate) fn insert_vertical_line(&mut self, row: usize, line: VerticalLine<T>) {
@@ -145,8 +152,13 @@ impl<T: std::fmt::Debug> BordersConfig<T> {
         self.verticals.get(&row)
     }
 
-    pub(crate) fn remove_vertical_line(&mut self, row: usize) {
-        self.verticals.remove(&row);
+    pub(crate) fn remove_vertical_line(&mut self, col: usize, count_columns: usize) {
+        self.verticals.remove(&col);
+        self.layout.verticals.remove(&col);
+
+        if self.has_vertical(col, count_columns) {
+            self.layout.verticals.insert(col);
+        }
     }
 
     pub(crate) fn set_borders(&mut self, borders: Borders<T>) {
diff --git a/papergrid/src/config/spanned/mod.rs b/papergrid/src/config/spanned/mod.rs
index ad338b2..b9d3438 100644
--- a/papergrid/src/config/spanned/mod.rs
+++ b/papergrid/src/config/spanned/mod.rs
@@ -61,18 +61,58 @@ impl Default for SpannedConfig {
 }
 
 impl SpannedConfig {
-    /// Returns a [`Margin`] value currently set.
-    pub fn get_margin(&self) -> &Sides<ColoredMarginIndent> {
-        &self.margin
+    /// Set a margin of a grid.
+    pub fn set_margin(&mut self, margin: Sides<Indent>) {
+        self.margin.left.indent = margin.left;
+        self.margin.right.indent = margin.right;
+        self.margin.top.indent = margin.top;
+        self.margin.bottom.indent = margin.bottom;
     }
 
-    /// Set a [`Margin`] value.
-    ///
+    /// Set a color of margin of a grid.
+    pub fn set_margin_color(&mut self, margin: Sides<Option<AnsiColor<'static>>>) {
+        self.margin.left.color = margin.left;
+        self.margin.right.color = margin.right;
+        self.margin.top.color = margin.top;
+        self.margin.bottom.color = margin.bottom;
+    }
 
-    // todo: change back to set_margin()
+    /// Set an offset of margin of a grid.
+    pub fn set_margin_offset(&mut self, margin: Sides<Offset>) {
+        self.margin.left.offset = margin.left;
+        self.margin.right.offset = margin.right;
+        self.margin.top.offset = margin.top;
+        self.margin.bottom.offset = margin.bottom;
+    }
 
-    pub fn get_margin_mut(&mut self) -> &mut Sides<ColoredMarginIndent> {
-        &mut self.margin
+    /// Returns a [`Margin`] value currently set.
+    pub fn get_margin(&self) -> Sides<Indent> {
+        Sides::new(
+            self.margin.left.indent,
+            self.margin.right.indent,
+            self.margin.top.indent,
+            self.margin.bottom.indent,
+        )
+    }
+
+    /// Returns a [`Margin`] value currently set.
+    pub fn get_margin_color(&self) -> Sides<Option<AnsiColor<'static>>> {
+        Sides::new(
+            self.margin.left.color.clone(),
+            self.margin.right.color.clone(),
+            self.margin.top.color.clone(),
+            self.margin.bottom.color.clone(),
+        )
+    }
+
+    /// Returns a [`Margin`] value currently set.
+    pub fn get_margin_offset(&self) -> Sides<Offset> {
+        Sides::new(
+            self.margin.left.offset,
+            self.margin.right.offset,
+            self.margin.top.offset,
+            self.margin.bottom.offset,
+        )
     }
 
     /// Clears all theme changes.
@@ -117,8 +157,8 @@ impl SpannedConfig {
     ///
     /// Row `0` means the top row.
     /// Row `grid.count_rows()` means the bottom row.
-    pub fn remove_horizontal_line(&mut self, line: usize) {
-        self.borders.remove_horizontal_line(line);
+    pub fn remove_horizontal_line(&mut self, line: usize, count_rows: usize) {
+        self.borders.remove_horizontal_line(line, count_rows);
     }
 
     /// Gets a overridden vertical line.
@@ -141,8 +181,8 @@ impl SpannedConfig {
     ///
     /// Row `0` means the left row.
     /// Row `grid.count_columns()` means the right most row.
-    pub fn remove_vertical_line(&mut self, line: usize) {
-        self.borders.remove_vertical_line(line);
+    pub fn remove_vertical_line(&mut self, line: usize, count_columns: usize) {
+        self.borders.remove_vertical_line(line, count_columns);
     }
 
     /// Gets a overridden line.
@@ -326,19 +366,51 @@ impl SpannedConfig {
     }
 
     /// Set a padding to a given cells.
-    pub fn set_padding(&mut self, entity: Entity, pad: Sides<impl Into<ColoredIndent>>) {
-        let val = Sides::new(
-            pad.left.into(),
-            pad.right.into(),
-            pad.top.into(),
-            pad.bottom.into(),
-        );
-        self.padding.insert(entity, val);
+    pub fn set_padding(&mut self, entity: Entity, padding: Sides<Indent>) {
+        let mut pad = self.padding.get(entity).clone();
+        pad.left.indent = padding.left;
+        pad.right.indent = padding.right;
+        pad.top.indent = padding.top;
+        pad.bottom.indent = padding.bottom;
+
+        self.padding.insert(entity, pad);
+    }
+
+    /// Set a padding to a given cells.
+    pub fn set_padding_color(
+        &mut self,
+        entity: Entity,
+        padding: Sides<Option<AnsiColor<'static>>>,
+    ) {
+        let mut pad = self.padding.get(entity).clone();
+        pad.left.color = padding.left;
+        pad.right.color = padding.right;
+        pad.top.color = padding.top;
+        pad.bottom.color = padding.bottom;
+
+        self.padding.insert(entity, pad);
     }
 
     /// Get a padding for a given [Entity].
-    pub fn get_padding(&self, entity: Entity) -> &Sides<ColoredIndent> {
-        self.padding.get(entity)
+    pub fn get_padding(&self, entity: Entity) -> Sides<Indent> {
+        let pad = self.padding.get(entity);
+        Sides::new(
+            pad.left.indent,
+            pad.right.indent,
+            pad.top.indent,
+            pad.bottom.indent,
+        )
+    }
+
+    /// Get a padding color for a given [Entity].
+    pub fn get_padding_color(&self, entity: Entity) -> Sides<Option<AnsiColor<'static>>> {
+        let pad = self.padding.get(entity);
+        Sides::new(
+            pad.left.color.clone(),
+            pad.right.color.clone(),
+            pad.top.color.clone(),
+            pad.bottom.color.clone(),
+        )
     }
 
     /// Set a formatting to a given cells.
@@ -641,9 +713,10 @@ impl From<CompactConfig> for SpannedConfig {
 
         let mut cfg = Self::default();
 
-        let pad = to_padding(compact.get_padding(), compact.get_padding_color());
-        cfg.set_padding(Global, pad);
-        *cfg.get_margin_mut() = to_margin(compact.get_margin(), compact.get_margin_color());
+        cfg.set_padding(Global, *compact.get_padding());
+        cfg.set_padding_color(Global, to_ansi_color(compact.get_padding_color()));
+        cfg.set_margin(*compact.get_margin());
+        cfg.set_margin_color(to_ansi_color(compact.get_margin_color()));
         cfg.set_alignment_horizontal(Global, compact.get_alignment_horizontal());
         cfg.set_borders(*compact.get_borders());
         cfg.set_borders_color(borders_static_color_to_ansi_color(
@@ -666,30 +739,15 @@ impl From<CompactConfig> for SpannedConfig {
     }
 }
 
-fn to_margin(pad: &Sides<Indent>, colors: Sides<StaticColor>) -> Sides<ColoredMarginIndent> {
-    let colors = to_ansi_color(colors);
+fn to_ansi_color(b: Sides<StaticColor>) -> Sides<Option<AnsiColor<'static>>> {
     Sides::new(
-        ColoredMarginIndent::new(pad.left, Offset::Begin(0), Some(colors.left)),
-        ColoredMarginIndent::new(pad.right, Offset::Begin(0), Some(colors.right)),
-        ColoredMarginIndent::new(pad.top, Offset::Begin(0), Some(colors.top)),
-        ColoredMarginIndent::new(pad.bottom, Offset::Begin(0), Some(colors.bottom)),
+        Some(b.left.into()),
+        Some(b.right.into()),
+        Some(b.top.into()),
+        Some(b.bottom.into()),
     )
 }
 
-fn to_padding(pad: &Sides<Indent>, colors: Sides<StaticColor>) -> Sides<ColoredIndent> {
-    let colors = to_ansi_color(colors);
-    Sides::new(
-        ColoredIndent::new(pad.left, Some(colors.left)),
-        ColoredIndent::new(pad.right, Some(colors.right)),
-        ColoredIndent::new(pad.top, Some(colors.top)),
-        ColoredIndent::new(pad.bottom, Some(colors.bottom)),
-    )
-}
-
-fn to_ansi_color(b: Sides<StaticColor>) -> Sides<AnsiColor<'static>> {
-    Sides::new(b.left.into(), b.right.into(), b.top.into(), b.bottom.into())
-}
-
 fn borders_static_color_to_ansi_color(b: Borders<StaticColor>) -> Borders<AnsiColor<'static>> {
     Borders {
         left: b.left.map(|c| c.into()),
@@ -769,61 +827,30 @@ fn is_cell_covered_by_both_spans(cfg: &SpannedConfig, pos: Position) -> bool {
     })
 }
 
-// todo:: Get back to original PAdding + PaddingColor
-
-/// A colorefull indent.
 #[derive(Default, Debug, Clone, PartialEq, Eq)]
-pub struct ColoredIndent {
-    /// An indent value.
-    pub indent: Indent,
-    /// An color value.
-    pub color: Option<AnsiColor<'static>>,
-}
-
-impl ColoredIndent {
-    /// An creates a new colored indent.
-    pub fn new(indent: Indent, color: Option<AnsiColor<'static>>) -> Self {
-        Self { indent, color }
-    }
-}
-
-impl From<Indent> for ColoredIndent {
-    fn from(indent: Indent) -> Self {
-        Self::new(indent, None)
-    }
+struct ColoredIndent {
+    indent: Indent,
+    color: Option<AnsiColor<'static>>,
 }
 
 /// A colorefull margin indent.
 #[derive(Debug, Clone, PartialEq, Eq)]
-pub struct ColoredMarginIndent {
+struct ColoredMarginIndent {
     /// An indent value.
-    pub indent: Indent,
+    indent: Indent,
     /// An offset value.
-    pub offset: Offset,
+    offset: Offset,
     /// An color value.
-    pub color: Option<AnsiColor<'static>>,
-}
-
-impl ColoredMarginIndent {
-    /// An creates a new colored margin indent.
-    pub fn new(indent: Indent, offset: Offset, color: Option<AnsiColor<'static>>) -> Self {
-        Self {
-            indent,
-            offset,
-            color,
-        }
-    }
+    color: Option<AnsiColor<'static>>,
 }
 
 impl Default for ColoredMarginIndent {
     fn default() -> Self {
-        Self::new(Indent::default(), Offset::Begin(0), None)
-    }
-}
-
-impl From<Indent> for ColoredMarginIndent {
-    fn from(indent: Indent) -> Self {
-        Self::new(indent, Offset::Begin(0), None)
+        Self {
+            indent: Indent::default(),
+            offset: Offset::Begin(0),
+            color: None,
+        }
     }
 }
 
diff --git a/papergrid/src/dimension/spanned.rs b/papergrid/src/dimension/spanned.rs
index 3fad6ea..f760068 100644
--- a/papergrid/src/dimension/spanned.rs
+++ b/papergrid/src/dimension/spanned.rs
@@ -83,8 +83,8 @@ fn build_dimensions<R: Records>(records: R, cfg: &SpannedConfig) -> (Vec<usize>,
             let text = cell.as_ref();
             let (height, width) = string_dimension(text);
             let pad = cfg.get_padding(pos.into());
-            let width = width + pad.left.indent.size + pad.right.indent.size;
-            let height = height + pad.top.indent.size + pad.bottom.indent.size;
+            let width = width + pad.left.size + pad.right.size;
+            let height = height + pad.top.size + pad.bottom.size;
 
             match cfg.get_column_span(pos) {
                 Some(n) if n > 1 => {
@@ -174,7 +174,7 @@ fn count_horizontal_borders(cfg: &SpannedConfig, len: usize, start: usize, end:
 fn get_cell_height(cell: &str, cfg: &SpannedConfig, pos: Position) -> usize {
     let count_lines = max(1, count_lines(cell));
     let padding = cfg.get_padding(pos.into());
-    count_lines + padding.top.indent.size + padding.bottom.indent.size
+    count_lines + padding.top.size + padding.bottom.size
 }
 
 fn inc_range(list: &mut [usize], size: usize, start: usize, end: usize) {
@@ -249,7 +249,7 @@ fn get_cell_width(text: &str, cfg: &SpannedConfig, pos: Position) -> usize {
 
 fn get_cell_padding(cfg: &SpannedConfig, pos: Position) -> usize {
     let padding = cfg.get_padding(pos.into());
-    padding.left.indent.size + padding.right.indent.size
+    padding.left.size + padding.right.size
 }
 
 fn range_width(
diff --git a/papergrid/src/grid/iterable.rs b/papergrid/src/grid/iterable.rs
index 7d2351d..c134255 100644
--- a/papergrid/src/grid/iterable.rs
+++ b/papergrid/src/grid/iterable.rs
@@ -16,7 +16,7 @@ use crate::{
     util::string::{count_lines, get_lines, string_width, string_width_multiline, Lines},
 };
 
-use crate::config::spanned::{ColoredIndent, Formatting, Offset, SpannedConfig};
+use crate::config::spanned::{Formatting, Offset, SpannedConfig};
 
 /// Grid provides a set of methods for building a text-based table.
 #[derive(Debug, Clone)]
@@ -112,7 +112,7 @@ fn print_grid_general<F: Write, R: Records, D: Dimension, C: Colors>(
         return Ok(());
     }
 
-    if cfg.get_margin().top.indent.size > 0 {
+    if cfg.get_margin().top.size > 0 {
         totalw = Some(output_width(cfg, dims, count_columns));
 
         print_margin_top(f, cfg, totalw.unwrap())?;
@@ -180,7 +180,7 @@ fn print_grid_general<F: Write, R: Records, D: Dimension, C: Colors>(
 
     {
         let margin = cfg.get_margin();
-        if margin.bottom.indent.size > 0 {
+        if margin.bottom.size > 0 {
             let totalw = totalw.unwrap_or_else(|| output_width(cfg, dims, count_columns));
 
             f.write_char('\n')?;
@@ -193,7 +193,7 @@ fn print_grid_general<F: Write, R: Records, D: Dimension, C: Colors>(
 
 fn output_width<D: Dimension>(cfg: &SpannedConfig, d: D, count_columns: usize) -> usize {
     let margin = cfg.get_margin();
-    total_width(cfg, &d, count_columns) + margin.left.indent.size + margin.right.indent.size
+    total_width(cfg, &d, count_columns) + margin.left.size + margin.right.size
 }
 
 #[allow(clippy::too_many_arguments)]
@@ -284,6 +284,7 @@ fn print_single_line_column<F: Write, C: Color>(
 ) -> fmt::Result {
     let pos = pos.into();
     let pad = cfg.get_padding(pos);
+    let pad_color = cfg.get_padding_color(pos);
     let fmt = cfg.get_formatting(pos);
 
     let (text, text_width) = if fmt.horizontal_trim && !text.is_empty() {
@@ -299,16 +300,16 @@ fn print_single_line_column<F: Write, C: Color>(
     };
 
     let alignment = *cfg.get_alignment_horizontal(pos);
-    let available_width = width - pad.left.indent.size - pad.right.indent.size;
+    let available_width = width - pad.left.size - pad.right.size;
     let (left, right) = calculate_indent(alignment, text_width, available_width);
 
-    print_padding(f, &pad.left)?;
+    print_padding(f, &pad.left, pad_color.left.as_ref())?;
 
     repeat_char(f, ' ', left)?;
     print_text(f, &text, color)?;
     repeat_char(f, ' ', right)?;
 
-    print_padding(f, &pad.right)?;
+    print_padding(f, &pad.right, pad_color.right.as_ref())?;
 
     Ok(())
 }
@@ -418,13 +419,13 @@ fn print_grid_spanned<F: Write, R: Records, D: Dimension, C: Colors>(
 
     let total_width = total_width(cfg, dims, count_columns);
     let margin = cfg.get_margin();
-    let total_width_with_margin = total_width + margin.left.indent.size + margin.right.indent.size;
+    let total_width_with_margin = total_width + margin.left.size + margin.right.size;
 
     let totalh = records
         .hint_count_rows()
         .map(|rows| total_height(cfg, dims, rows));
 
-    if margin.top.indent.size > 0 {
+    if margin.top.size > 0 {
         print_margin_top(f, cfg, total_width_with_margin)?;
         f.write_char('\n')?;
     }
@@ -483,7 +484,7 @@ fn print_grid_spanned<F: Write, R: Records, D: Dimension, C: Colors>(
             print_horizontal_line(f, cfg, line, totalh, dims, row, shape)?;
         }
 
-        if margin.bottom.indent.size > 0 {
+        if margin.bottom.size > 0 {
             f.write_char('\n')?;
             print_margin_bottom(f, cfg, total_width_with_margin)?;
         }
@@ -740,7 +741,8 @@ struct Cell<T, C> {
     indent_left: Option<usize>,
     alignh: AlignmentHorizontal,
     fmt: Formatting,
-    pad: Sides<ColoredIndent>,
+    pad: Sides<Indent>,
+    pad_color: Sides<Option<AnsiColor<'static>>>,
     color: Option<C>,
 }
 
@@ -757,7 +759,8 @@ where
         pos: Position,
     ) -> Cell<T, C> {
         let fmt = *cfg.get_formatting(pos.into());
-        let pad = cfg.get_padding(pos.into()).clone();
+        let pad = cfg.get_padding(pos.into());
+        let pad_color = cfg.get_padding_color(pos.into()).clone();
         let alignh = *cfg.get_alignment_horizontal(pos.into());
         let alignv = *cfg.get_alignment_vertical(pos.into());
 
@@ -773,7 +776,7 @@ where
         let mut indent_left = None;
         if !fmt.allow_lines_alignment {
             let text_width = get_text_width(text.as_ref(), fmt.horizontal_trim);
-            let available = width - pad.left.indent.size - pad.right.indent.size;
+            let available = width - pad.left.size - pad.right.size;
             indent_left = Some(calculate_indent(alignh, text_width, available).0);
         }
 
@@ -790,6 +793,7 @@ where
             alignh,
             fmt,
             pad,
+            pad_color,
             color,
         }
     }
@@ -802,14 +806,15 @@ where
     fn display<F: Write>(&mut self, f: &mut F) -> fmt::Result {
         if self.indent_top > 0 {
             self.indent_top -= 1;
-            print_padding_n(f, &self.pad.top, self.width)?;
+            print_padding_n(f, &self.pad.top, self.pad_color.top.as_ref(), self.width)?;
             return Ok(());
         }
 
         let line = match self.lines.lines.next() {
             Some(line) => line,
             None => {
-                print_padding_n(f, &self.pad.bottom, self.width)?;
+                let color = self.pad_color.bottom.as_ref();
+                print_padding_n(f, &self.pad.bottom, color, self.width)?;
                 return Ok(());
             }
         };
@@ -821,7 +826,7 @@ where
         };
 
         let line_width = string_width(&line);
-        let available_width = self.width - self.pad.left.indent.size - self.pad.right.indent.size;
+        let available_width = self.width - self.pad.left.size - self.pad.right.size;
 
         let (left, right) = if self.fmt.allow_lines_alignment {
             calculate_indent(self.alignh, line_width, available_width)
@@ -830,13 +835,13 @@ where
             (left, available_width - line_width - left)
         };
 
-        print_padding(f, &self.pad.left)?;
+        print_padding(f, &self.pad.left, self.pad_color.left.as_ref())?;
 
         repeat_char(f, ' ', left)?;
         print_text(f, &line, self.color.as_ref())?;
         repeat_char(f, ' ', right)?;
 
-        print_padding(f, &self.pad.right)?;
+        print_padding(f, &self.pad.right, self.pad_color.right.as_ref())?;
 
         Ok(())
     }
@@ -920,15 +925,15 @@ fn prepare_coloring<'a, 'b, F: Write>(
 }
 
 fn top_indent(
-    padding: &Sides<ColoredIndent>,
+    padding: &Sides<Indent>,
     alignment: AlignmentVertical,
     cell_height: usize,
     available: usize,
 ) -> usize {
-    let height = available - padding.top.indent.size;
+    let height = available - padding.top.size;
     let indent = indent_from_top(alignment, height, cell_height);
 
-    indent + padding.top.indent.size
+    indent + padding.top.size
 }
 
 fn indent_from_top(alignment: AlignmentVertical, available: usize, real: usize) -> usize {
@@ -996,14 +1001,18 @@ fn print_vertical_char<F: Write>(
 }
 
 fn print_margin_top<F: Write>(f: &mut F, cfg: &SpannedConfig, width: usize) -> fmt::Result {
-    let m = cfg.get_margin();
-    let (indent, offset, color) = (m.top.indent, m.top.offset, m.top.color.as_ref());
+    let indent = cfg.get_margin().top;
+    let offset = cfg.get_margin_offset().top;
+    let color = cfg.get_margin_color();
+    let color = color.top.as_ref();
     print_indent_lines(f, &indent, &offset, color, width)
 }
 
 fn print_margin_bottom<F: Write>(f: &mut F, cfg: &SpannedConfig, width: usize) -> fmt::Result {
-    let m = cfg.get_margin();
-    let (indent, offset, color) = (m.bottom.indent, m.bottom.offset, m.bottom.color.as_ref());
+    let indent = cfg.get_margin().bottom;
+    let offset = cfg.get_margin_offset().bottom;
+    let color = cfg.get_margin_color();
+    let color = color.bottom.as_ref();
     print_indent_lines(f, &indent, &offset, color, width)
 }
 
@@ -1013,8 +1022,10 @@ fn print_margin_left<F: Write>(
     line: usize,
     height: Option<usize>,
 ) -> fmt::Result {
-    let m = cfg.get_margin();
-    let (indent, offset, color) = (m.left.indent, m.left.offset, m.left.color.as_ref());
+    let indent = cfg.get_margin().left;
+    let offset = cfg.get_margin_offset().left;
+    let color = cfg.get_margin_color();
+    let color = color.left.as_ref();
     print_margin_vertical(f, indent, offset, color, line, height)
 }
 
@@ -1024,8 +1035,10 @@ fn print_margin_right<F: Write>(
     line: usize,
     height: Option<usize>,
 ) -> fmt::Result {
-    let m = cfg.get_margin();
-    let (indent, offset, color) = (m.right.indent, m.right.offset, m.right.color.as_ref());
+    let indent = cfg.get_margin().right;
+    let offset = cfg.get_margin_offset().right;
+    let color = cfg.get_margin_color();
+    let color = color.right.as_ref();
     print_margin_vertical(f, indent, offset, color, line, height)
 }
 
@@ -1113,12 +1126,17 @@ fn print_indent_lines<F: Write>(
     Ok(())
 }
 
-fn print_padding<F: Write>(f: &mut F, pad: &ColoredIndent) -> fmt::Result {
-    print_indent(f, pad.indent.fill, pad.indent.size, pad.color.as_ref())
+fn print_padding<F: Write>(f: &mut F, pad: &Indent, color: Option<&AnsiColor<'_>>) -> fmt::Result {
+    print_indent(f, pad.fill, pad.size, color)
 }
 
-fn print_padding_n<F: Write>(f: &mut F, pad: &ColoredIndent, n: usize) -> fmt::Result {
-    print_indent(f, pad.indent.fill, n, pad.color.as_ref())
+fn print_padding_n<F: Write>(
+    f: &mut F,
+    pad: &Indent,
+    color: Option<&AnsiColor<'_>>,
+    n: usize,
+) -> fmt::Result {
+    print_indent(f, pad.fill, n, color)
 }
 
 fn print_indent<F: Write>(
diff --git a/papergrid/src/grid/peekable.rs b/papergrid/src/grid/peekable.rs
index 324e863..bd1ebc1 100644
--- a/papergrid/src/grid/peekable.rs
+++ b/papergrid/src/grid/peekable.rs
@@ -10,7 +10,7 @@ use std::{
 use crate::{
     color::{AnsiColor, Color},
     colors::Colors,
-    config::spanned::{ColoredIndent, Formatting, Offset, SpannedConfig},
+    config::spanned::{Formatting, Offset, SpannedConfig},
     config::{AlignmentHorizontal, AlignmentVertical, Indent, Position, Sides},
     dimension::Dimension,
     records::{ExactRecords, PeekableRecords, Records},
@@ -98,11 +98,11 @@ fn build_grid<F: Write, R: Records + PeekableRecords + ExactRecords, D: Dimensio
 
     let total_width = total_width(cfg, dimension, shape.1);
     let total_width_with_margin =
-        total_width + cfg.get_margin().left.indent.size + cfg.get_margin().right.indent.size;
+        total_width + cfg.get_margin().left.size + cfg.get_margin().right.size;
 
     let total_height = total_height(cfg, dimension, shape.0);
 
-    if cfg.get_margin().top.indent.size > 0 {
+    if cfg.get_margin().top.size > 0 {
         print_margin_top(f, cfg, total_width_with_margin)?;
         f.write_char('\n')?;
     }
@@ -168,7 +168,7 @@ fn build_grid<F: Write, R: Records + PeekableRecords + ExactRecords, D: Dimensio
         print_margin_right(f, cfg, table_line, total_height)?;
     }
 
-    if cfg.get_margin().bottom.indent.size > 0 {
+    if cfg.get_margin().bottom.size > 0 {
         f.write_char('\n')?;
         print_margin_bottom(f, cfg, total_width_with_margin)?;
     }
@@ -306,11 +306,11 @@ fn build_grid_spanned<
 
     let total_width = total_width(cfg, dims, shape.1);
     let total_width_with_margin =
-        total_width + cfg.get_margin().left.indent.size + cfg.get_margin().right.indent.size;
+        total_width + cfg.get_margin().left.size + cfg.get_margin().right.size;
 
     let total_height = total_height(cfg, dims, shape.0);
 
-    if cfg.get_margin().top.indent.size > 0 {
+    if cfg.get_margin().top.size > 0 {
         print_margin_top(f, cfg, total_width_with_margin)?;
         f.write_char('\n')?;
     }
@@ -413,7 +413,7 @@ fn build_grid_spanned<
         print_margin_right(f, cfg, table_line, total_height)?;
     }
 
-    if cfg.get_margin().bottom.indent.size > 0 {
+    if cfg.get_margin().bottom.size > 0 {
         f.write_char('\n')?;
         print_margin_bottom(f, cfg, total_width_with_margin)?;
     }
@@ -564,17 +564,18 @@ fn print_cell_line<F: Write, R: Records + PeekableRecords + ExactRecords, C: Col
     }
 
     let pad = cfg.get_padding(pos.into());
+    let pad_color = cfg.get_padding_color(pos.into());
     let alignment = cfg.get_alignment_vertical(pos.into());
-    let indent = top_indent(pad, *alignment, cell_height, height);
+    let indent = top_indent(&pad, *alignment, cell_height, height);
     if indent > line {
-        return print_padding_n(f, &pad.top, width);
+        return print_indent(f, pad.top.fill, width, pad_color.top.as_ref());
     }
 
     let mut index = line - indent;
     let cell_has_this_line = cell_height > index;
     if !cell_has_this_line {
         // happens when other cells have bigger height
-        return print_padding_n(f, &pad.bottom, width);
+        return print_indent(f, pad.bottom.fill, width, pad_color.bottom.as_ref());
     }
 
     if formatting.vertical_trim {
@@ -582,18 +583,18 @@ fn print_cell_line<F: Write, R: Records + PeekableRecords + ExactRecords, C: Col
         index += empty_lines;
 
         if index > records.count_lines(pos) {
-            return print_padding_n(f, &pad.top, width);
+            return print_indent(f, pad.top.fill, width, pad_color.top.as_ref());
         }
     }
 
-    print_padding(f, &pad.left)?;
+    print_indent(f, pad.left.fill, pad.left.size, pad_color.left.as_ref())?;
 
-    let width = width - pad.left.indent.size - pad.right.indent.size;
+    let width = width - pad.left.size - pad.right.size;
     let alignment = *cfg.get_alignment_horizontal(pos.into());
     let color = colors.get_color(pos);
     print_line(f, records, pos, index, alignment, formatting, color, width)?;
 
-    print_padding(f, &pad.right)?;
+    print_indent(f, pad.right.fill, pad.right.size, pad_color.right.as_ref())?;
 
     Ok(())
 }
@@ -668,15 +669,15 @@ fn print_text<F: Write, C: Color>(f: &mut F, text: &str, clr: Option<C>) -> fmt:
 }
 
 fn top_indent(
-    padding: &Sides<ColoredIndent>,
+    pad: &Sides<Indent>,
     alignment: AlignmentVertical,
     cell_height: usize,
     available: usize,
 ) -> usize {
-    let height = available - padding.top.indent.size;
+    let height = available - pad.top.size;
     let indent = indent_from_top(alignment, height, cell_height);
 
-    indent + padding.top.indent.size
+    indent + pad.top.size
 }
 
 fn indent_from_top(alignment: AlignmentVertical, available: usize, real: usize) -> usize {
@@ -748,14 +749,18 @@ fn total_height<D: Dimension>(cfg: &SpannedConfig, dimension: &D, count_rows: us
 }
 
 fn print_margin_top<F: Write>(f: &mut F, cfg: &SpannedConfig, width: usize) -> fmt::Result {
-    let m = cfg.get_margin();
-    let (indent, offset, color) = (m.top.indent, m.top.offset, m.top.color.as_ref());
+    let indent = cfg.get_margin().top;
+    let offset = cfg.get_margin_offset().top;
+    let color = cfg.get_margin_color();
+    let color = color.top.as_ref();
     print_indent_lines(f, &indent, &offset, color, width)
 }
 
 fn print_margin_bottom<F: Write>(f: &mut F, cfg: &SpannedConfig, width: usize) -> fmt::Result {
-    let m = cfg.get_margin();
-    let (indent, offset, color) = (m.bottom.indent, m.bottom.offset, m.bottom.color.as_ref());
+    let indent = cfg.get_margin().bottom;
+    let offset = cfg.get_margin_offset().bottom;
+    let color = cfg.get_margin_color();
+    let color = color.bottom.as_ref();
     print_indent_lines(f, &indent, &offset, color, width)
 }
 
@@ -765,8 +770,10 @@ fn print_margin_left<F: Write>(
     line: usize,
     height: usize,
 ) -> fmt::Result {
-    let m = cfg.get_margin();
-    let (indent, offset, color) = (m.left.indent, m.left.offset, m.left.color.as_ref());
+    let indent = cfg.get_margin().left;
+    let offset = cfg.get_margin_offset().left;
+    let color = cfg.get_margin_color();
+    let color = color.left.as_ref();
     print_margin_vertical(f, indent, offset, color, line, height)
 }
 
@@ -776,8 +783,10 @@ fn print_margin_right<F: Write>(
     line: usize,
     height: usize,
 ) -> fmt::Result {
-    let m = cfg.get_margin();
-    let (indent, offset, color) = (m.right.indent, m.right.offset, m.right.color.as_ref());
+    let indent = cfg.get_margin().right;
+    let offset = cfg.get_margin_offset().right;
+    let color = cfg.get_margin_color();
+    let color = color.right.as_ref();
     print_margin_vertical(f, indent, offset, color, line, height)
 }
 
@@ -858,14 +867,6 @@ fn print_indent_lines<F: Write>(
     Ok(())
 }
 
-fn print_padding<F: Write>(f: &mut F, pad: &ColoredIndent) -> fmt::Result {
-    print_indent(f, pad.indent.fill, pad.indent.size, pad.color.as_ref())
-}
-
-fn print_padding_n<F: Write>(f: &mut F, pad: &ColoredIndent, n: usize) -> fmt::Result {
-    print_indent(f, pad.indent.fill, n, pad.color.as_ref())
-}
-
 fn print_indent<F: Write>(
     f: &mut F,
     c: char,
diff --git a/static_table/examples/static_table.rs b/static_table/examples/static_table.rs
index a638817..9d65d09 100644
--- a/static_table/examples/static_table.rs
+++ b/static_table/examples/static_table.rs
@@ -1,15 +1,7 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example static_table`
-//!
 //! This example demonstrates using the powerful [`static_table!`] macro to translate
 //! a sequence of arrays and several, optional settings to a static [`str`] table representation.
 //!
-//! ---
-//!
-//! * Note that [`static_table!`] is evaluated at compile time,
-//! resulting in highly efficient runtime performance.
-//!
+//! * Note that [`static_table!`] is evaluated at compile time, resulting in highly efficient runtime performance.
 //! * [`static_table!`] supports configuration of:
 //!     * granular column and row span specification
 //!     * [`THEME`](tabled::settings::Style)
diff --git a/table_to_html/examples/html.rs b/table_to_html/examples/html.rs
index 5b7b087..d1a0078 100644
--- a/table_to_html/examples/html.rs
+++ b/table_to_html/examples/html.rs
@@ -1,16 +1,9 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example html`
-//!
 //! This example demonstrates using [`HtmlTable`] to easily transform a multi-dimensional array
 //! into web-friendly [html](https://developer.mozilla.org/en-US/docs/Web/HTML).
 //!
-//! ---
-//!
 //! * Note how [`HtmlTable::set_border()`] is used to customize the output markup.
 //! These changes are implemented through a prepended [style](https://developer.mozilla.org/en-US/docs/Web/css)
 //! section above the opening table tag.
-//!
 //! * Customization options include:
 //!     * Border
 //!     * Alignment
diff --git a/tabled/Cargo.toml b/tabled/Cargo.toml
index e50b1ed..68922b7 100644
--- a/tabled/Cargo.toml
+++ b/tabled/Cargo.toml
@@ -244,6 +244,11 @@ name = "split"
 path = "examples/split.rs"
 required-features = ["std", "macros"]
 
+[[example]]
+name = "pool_table"
+path = "examples/pool_table.rs"
+required-features = ["std"]
+
 [features]
 default = ["derive", "macros"]
 std = ["papergrid/std"]
diff --git a/tabled/examples/alphabet.rs b/tabled/examples/alphabet.rs
index a069cd1..5cc8250 100644
--- a/tabled/examples/alphabet.rs
+++ b/tabled/examples/alphabet.rs
@@ -1,11 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example alphabet`
-//!
 //! This example demonstrates instantiating a [`Table`] from an [`IntoIterator`] compliant object.
 //!
-//! ---
-//!
 //! * Note how [`Range`] [expression syntax](https://doc.rust-lang.org/reference/expressions/range-expr.html)
 //! is used to idiomatically represent the English alphabet.
 
diff --git a/tabled/examples/border_text.rs b/tabled/examples/border_text.rs
index 777005f..bbdb767 100644
--- a/tabled/examples/border_text.rs
+++ b/tabled/examples/border_text.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example border_text`
-//!
 //! This example demonstrates inserting text into the borders
 //! of a [`Table`] with [`BorderText`]; a powerful labeling tool.
 //!
-//! ---
-//!
 //! * [`BorderText`] currently supports:
 //!     * Horizontal border placement
 //!     * Placement starting column offset
diff --git a/tabled/examples/builder.rs b/tabled/examples/builder.rs
index d6eafab..5a39771 100644
--- a/tabled/examples/builder.rs
+++ b/tabled/examples/builder.rs
@@ -1,15 +1,9 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example builder`
-//!
 //! This example demonstrates an alternative method for creating a [`Table`].
 //! [`Builder`] is an efficient implementation of the [builder design pattern](https://en.wikipedia.org/wiki/Builder_pattern).
 //!
 //! > The intent of the Builder design pattern is to separate the construction of a complex object from its representation.
 //! > -- <cite>Wikipedia</cite>
 //!
-//! ---
-//!
 //! * Note how [Builder] can be used to define a table's shape manually
 //!  and can be populated through iteration if it is mutable. This flexibility
 //! is useful when you don't have direct control over the datasets you intend to [table](tabled).
diff --git a/tabled/examples/builder_index.rs b/tabled/examples/builder_index.rs
index 8c16e9c..9a53eb5 100644
--- a/tabled/examples/builder_index.rs
+++ b/tabled/examples/builder_index.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example builder_index`
-//!
 //! This example demonstrates evolving the standard [`Builder`] to an [`IndexBuilder`],
 //! and then manipulating the constructing table with a newly prepended index column.
 //!
-//! ---
-//!
 //! * An [`IndexBuilder`] is capable of several useful manipulations, including:
 //!     * Giving the new index column a name
 //!     * Transposing the index column around a table
diff --git a/tabled/examples/col_row_macros.rs b/tabled/examples/col_row_macros.rs
index 45b5224..1a676eb 100644
--- a/tabled/examples/col_row_macros.rs
+++ b/tabled/examples/col_row_macros.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --features macros --example col_row_macros`
-//!
 //! This example demonstrates using the [`col!`] and [`row!`] macros to easily
 //! organize multiple tables together into a single, new [`Table`] display.
 //!
-//! ---
-//!
 //! * 🚩 This example requires the `macros` feature.
 //!
 //! * Note how both macros can be used in combination to layer
diff --git a/tabled/examples/color.rs b/tabled/examples/color.rs
index 1a16c12..b7064b3 100644
--- a/tabled/examples/color.rs
+++ b/tabled/examples/color.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --features color --example color`
-//!
 //! This example demonstrates using the [`Color`] [setting](tabled::settings) to
 //! stylize text, backgrounds, and borders.
 //!
-//! ---
-//!
 //! * 🚩 This example requires the `color` feature.
 //!
 //! * Note how [`Format::content()`] is used to break out [`CellOption`]
diff --git a/tabled/examples/colored_borders.rs b/tabled/examples/colored_borders.rs
index 059ce14..0bbdb4a 100644
--- a/tabled/examples/colored_borders.rs
+++ b/tabled/examples/colored_borders.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --features color --example colored_borders`
-//!
 //! This example demonstrates using the [`RawStyle`] [setting](tabled::settings) to
 //! to granularly specify border colors.
 //!
-//! ---
-//!
 //! * 🚩 This example requires the `color` feature.
 //!
 //! * Note how [`Color`] containts several helpful, const values covering
diff --git a/tabled/examples/colored_padding.rs b/tabled/examples/colored_padding.rs
index ca36e72..ac44a8b 100644
--- a/tabled/examples/colored_padding.rs
+++ b/tabled/examples/colored_padding.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --features color --example colored_padding`
-//!
 //! This example demonstrates using the [`Padding::colorize()`] function in several ways
 //! to give a [`Table`] display a vibrant asthetic.
 //!
-//! ---
-//!
 //! * 🚩 This example requires the `color` feature.
 //!
 //! * Note how the [`Color`] [setting](tabled::settings) is used to simplify creating
@@ -167,11 +161,11 @@ where
                 let right = available_width - left;
 
                 let pos = (row, col).into();
-                let mut padding = cfg.get_padding(pos).clone();
-                padding.left.indent.size = left;
-                padding.right.indent.size = right;
+                let mut pad = cfg.get_padding(pos);
+                pad.left.size = left;
+                pad.right.size = right;
 
-                cfg.set_padding(pos, padding);
+                cfg.set_padding(pos, pad);
             }
         }
     }
diff --git a/tabled/examples/compact_table.rs b/tabled/examples/compact_table.rs
index c34c403..560e30d 100644
--- a/tabled/examples/compact_table.rs
+++ b/tabled/examples/compact_table.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example compact_table`
-//!
 //! This example demonstrates creating a `new()` [`CompactTable`] with
 //! manual specifications for column count, column widths, and border styling.
 //!
-//! ---
-//!
 //! * [`CompactTable`] is a [`Table`] alternative that trades off reduced
 //! flexibility for improved performance.
 
diff --git a/tabled/examples/compact_table_2.rs b/tabled/examples/compact_table_2.rs
index ee7ea56..a97c3d8 100644
--- a/tabled/examples/compact_table_2.rs
+++ b/tabled/examples/compact_table_2.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example compact_table_2`
-//!
 //! This example demonstrates creating a [`CompactTable`] `from()` a
 //! multidimensional array.
 //!
-//! ---
-//!
 //! * Note how [`CompactTable::from()`] inherits the lengths of the nested arrays
 //! as typed definitions through [const generics](https://practice.rs/generics-traits/const-generics.html).
 
diff --git a/tabled/examples/compact_table_3.rs b/tabled/examples/compact_table_3.rs
index bdeda34..7a59c26 100644
--- a/tabled/examples/compact_table_3.rs
+++ b/tabled/examples/compact_table_3.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example compact_table_3`
-//!
 //! This example demonstrates how [`CompactTable`] is limited to single
 //! line rows.
 //!
-//! ---
-//!
 //! * Note how the multiline data is accepted, but then truncated in the display.
 
 use tabled::{settings::Style, tables::CompactTable};
diff --git a/tabled/examples/concat.rs b/tabled/examples/concat.rs
index 4e02870..09afeed 100644
--- a/tabled/examples/concat.rs
+++ b/tabled/examples/concat.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example concat`
-//!
 //! This example demonstrates using the [`Concat`] [`TableOption`] to concatenate
 //! [`tables`](Table) together.
 //!
-//! ---
-//!
 //! * [`Concat`] supports appending tables vertically and horizontally.
 //!
 //! * Note how the base tables style settings take take precedence over the appended table.
diff --git a/tabled/examples/custom_style.rs b/tabled/examples/custom_style.rs
index 507616d..e6f0848 100644
--- a/tabled/examples/custom_style.rs
+++ b/tabled/examples/custom_style.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example custom_style`
-//!
 //! This example demonstrates customizing one of the [`tabled`] default [styles](Style)
 //! to create a unique [`Table`] display.
 //!
-//! ---
-//!
 //! * Note that all predesigned styles can be configured completely.
 //! Styles can also be created from scratch!
 //!
diff --git a/tabled/examples/derive/display_with.rs b/tabled/examples/derive/display_with.rs
index ca0073b..9dfc87a 100644
--- a/tabled/examples/derive/display_with.rs
+++ b/tabled/examples/derive/display_with.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example display_with`
-//!
 //! This example demonstrates using the [attribute macro](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros)
 //! [`display_with`] to seamlessly augment field representations in a [`Table`] display.
 //!
-//! ---
-//!
 //! * [`display_with`] functions act as transformers during [`Table`] instantiation.
 //!
 //! * Note how [`display_with`] works with [std] and custom functions alike.
diff --git a/tabled/examples/derive/inline.rs b/tabled/examples/derive/inline.rs
index ce0f268..2ce0781 100644
--- a/tabled/examples/derive/inline.rs
+++ b/tabled/examples/derive/inline.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example inline`
-//!
 //! This example demonstrates using the [attribute macro](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros)
 //! [`inline`] to expand struct fields to individual columns in a [`Table`] display.
 //!
-//! ---
-//!
 //! * Note that without inlining a struct or enum field, those objects
 //! must implement the [`Display`] trait as they will be represented in
 //! a single column with the value of their [`ToString`] output.
diff --git a/tabled/examples/derive/inline_enum.rs b/tabled/examples/derive/inline_enum.rs
index b278a2e..707d5bb 100644
--- a/tabled/examples/derive/inline_enum.rs
+++ b/tabled/examples/derive/inline_enum.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example inline_enum`
-//!
 //! This example demonstrates using the [attribute macro](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros)
 //! [`inline`] to expand enum fields to individual columns in a [`Table`] display.
 //!
-//! ---
-//!
 //! * Note how the optional [`inline`] argument is used to apply prefixes
 //! to decomposed column headers. This is helpful for organizing tables
 //! with repetative fields that would normally result in confusing headers.
diff --git a/tabled/examples/derive/order.rs b/tabled/examples/derive/order.rs
index f0fe2ce..44e036f 100644
--- a/tabled/examples/derive/order.rs
+++ b/tabled/examples/derive/order.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example order`
-//!
 //! This example demonstrates using the [attribute macro](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros)
 //! [`order`] to relocate fields to specified indexes in a [`Table`] display.
 //!
-//! ---
-//!
 //! * By default, [`Table`] columns are shown in the same ordered they are
 //! defined in the deriving struct/enum definition.
 
diff --git a/tabled/examples/derive/rename.rs b/tabled/examples/derive/rename.rs
index 31e0790..7094119 100644
--- a/tabled/examples/derive/rename.rs
+++ b/tabled/examples/derive/rename.rs
@@ -1,7 +1,3 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example rename`
-//!
 //! This example demonstrates using the [attribute macro](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros)
 //! [`rename`] to alias specific fields in a [`Table`] display.
 
diff --git a/tabled/examples/derive/rename_all.rs b/tabled/examples/derive/rename_all.rs
index a114916..cd408e5 100644
--- a/tabled/examples/derive/rename_all.rs
+++ b/tabled/examples/derive/rename_all.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example rename_all`
-//!
 //! This example demonstrates using the [attribute macro](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros)
 //! [`rename_all`] to apply table-wide header formatting in a [`Table`] display.
 //!
-//! ---
-//!
 //! * Supported formatting rules include:
 //!     * 'camelCase'
 //!     * 'kabab-case'
diff --git a/tabled/examples/derive/skip.rs b/tabled/examples/derive/skip.rs
index dcae669..86f7a9b 100644
--- a/tabled/examples/derive/skip.rs
+++ b/tabled/examples/derive/skip.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example skip`
-//!
 //! This example demonstrates using the [attribute macro](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros)
 //! [`skip`] to omit specific fields from becoming columns in a [`Table`] display.
 //!
-//! ---
-//!
 //! * Note how [`skip`] annoys [clippy](https://doc.rust-lang.org/clippy/) with `dead_code`
 //! warnings. This can be addressed with compiler overrides like `#[allow(dead_code)]`.
 
diff --git a/tabled/examples/disable.rs b/tabled/examples/disable.rs
index 6c1b39f..1f04de7 100644
--- a/tabled/examples/disable.rs
+++ b/tabled/examples/disable.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example disable`
-//!
 //! This example demonstrates using the [`Disable`] [`TableOption`] to remove specific
 //! cell data from a [`Table`] display.
 //!
-//! ---
-//!
 //! * ⚠️ Using [`Disable`] in combination with other [`Style`] customizations may yield unexpected results.
 //! It is safest to use [`Disable`] last in a chain of alterations.
 
diff --git a/tabled/examples/extended_display.rs b/tabled/examples/extended_display.rs
index 00dd83a..d312578 100644
--- a/tabled/examples/extended_display.rs
+++ b/tabled/examples/extended_display.rs
@@ -1,13 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example extended_display`
-//!
 //! This example demonstrates using [ExtendedTable], a [Table] alternative with
 //! limited flexibility but a greater emphasis on large data displays.
-//!
-//! ---
-//!
-//! * 🎉 Inspired by https://www.postgresql.org/docs/current/app-psql.html
 
 use tabled::{tables::ExtendedTable, Tabled};
 
diff --git a/tabled/examples/extract.rs b/tabled/examples/extract.rs
index d9b95cd..8d7d864 100644
--- a/tabled/examples/extract.rs
+++ b/tabled/examples/extract.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example extract`
-//!
 //! This example demonstrates using the [`Extract`] [`TableOption`] to
 //! produce a subsection of a [`Table`].
 //!
-//! ---
-//!
 //! * [`Extract`] can return a new [`Table`] with three functions:
 //!     * `rows()` | yields subset of the initial rows
 //!     * `columns()` | yields subset of the initial columns
diff --git a/tabled/examples/format.rs b/tabled/examples/format.rs
index 4aa89dc..7dc4bdd 100644
--- a/tabled/examples/format.rs
+++ b/tabled/examples/format.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example format`
-//!
 //! This example demonstrates using the [`Format`] [`CellOption`] factory to alter
 //! the cells of a [`Table`].
 //!
-//! ---
-//!
 //! * Note how [`Format::content()`] gives access to the respective cell content for replacement.
 //! And [`Format::positioned()`] additionally provides the index coordinates of that cell.
 //!
diff --git a/tabled/examples/formatting_settings.rs b/tabled/examples/formatting_settings.rs
index 0670974..19c8a48 100644
--- a/tabled/examples/formatting_settings.rs
+++ b/tabled/examples/formatting_settings.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example formatting_settings`
-//!
 //! This example demonstrates using the [`Alignment`], [`AlignmentStrategy`], and [`TrimStrategy`] [`CellOptions`]
 //! to align the content of a [`Table`] in several nuanced ways.
 //!
-//! ---
-//!
 //! * Note how [`AlignmentStrategy`] and [`TrimStrategy`] provide useful tools for managing multiline cells and
 //! cell values that are bloated with whitespace.
 
diff --git a/tabled/examples/grid_colors.rs b/tabled/examples/grid_colors.rs
index b612415..f48b39f 100644
--- a/tabled/examples/grid_colors.rs
+++ b/tabled/examples/grid_colors.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example grid_colors`
-//!
 //! This example demonstrates using [`Color`] as a [`CellOption`] modifier to stylize
 //! the cells of a [`Table`].
 //!
-//! ---
-//!
 //! * Note how the [`Color`] [setting](tabled::settings) is used to simplify creating
 //! reusable themes for backgrounds.
 
diff --git a/tabled/examples/height.rs b/tabled/examples/height.rs
index c945cfe..2da0f36 100644
--- a/tabled/examples/height.rs
+++ b/tabled/examples/height.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example height`
-//!
 //! This example demonstrates using the [`Height`] [`TableOption`] for adjusting
 //! the height of a [`Table`].
 //!
-//! ---
-//!
 //! * [`Height`] supports three key features:
 //!     * [`CellHeightIncrease`] spreads new whitespace between the [`Table`]
 //! rows up to the specified line count.
diff --git a/tabled/examples/highlight.rs b/tabled/examples/highlight.rs
index 43ea09d..0b6abb8 100644
--- a/tabled/examples/highlight.rs
+++ b/tabled/examples/highlight.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example highlight`
-//!
 //! This example demonstrates using the [`Highlight`] [`TableOption`] to
 //! decorate sections of a [`Table`] with a unique [`Border`].
 //!
-//! ---
-//!
 //! * Note how [`Highlight`] arguments can be chained together to
 //! create cross-sections and non-symmetrical shapes.
 
diff --git a/tabled/examples/highlight_color.rs b/tabled/examples/highlight_color.rs
index d5c3ef6..4646f38 100644
--- a/tabled/examples/highlight_color.rs
+++ b/tabled/examples/highlight_color.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example highlight`
-//!
 //! This example demonstrates using [`Highlight`] in combination with [`BorderColor`] to
 //! frame sections of a [`Table`] with a unique background [`Color`].
 //!
-//! ---
-//!
 //! * Note how [`Highlight::colored()`] is used to accept the necessary input instead of [`Highlight::new()`].
 
 use tabled::{
diff --git a/tabled/examples/hyperlink.rs b/tabled/examples/hyperlink.rs
index ef271a1..9fda7a0 100644
--- a/tabled/examples/hyperlink.rs
+++ b/tabled/examples/hyperlink.rs
@@ -1,14 +1,8 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --features color --example hyperlink`
-//!
 //! This example demonstrates how hyperlinks can be embedded into a [`Table`] display.
 //!
 //! While not a [`tabled`] specific implementation, it is helpful to know that
 //! most users expect certain elements of interactivity based on the purpose of your display.
 //!
-//! ---
-//!
 //! * 🚩 This example requires the `color` feature.
 //!
 //! * ⚠️ Terminal interfaces may differ in how they parse links or make them interactive.
diff --git a/tabled/examples/iter_table.rs b/tabled/examples/iter_table.rs
index 8c69e34..0a77f74 100644
--- a/tabled/examples/iter_table.rs
+++ b/tabled/examples/iter_table.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example iter_table`
-//!
 //! This example demonstrates using [`IterTable`], an [allocation](https://doc.rust-lang.org/nomicon/vec/vec-alloc.html)
 //! free [`Table`] alternative that translates an iterator into a display.
 //!
-//! ---
-//!
 //! * Note how [`IterTable`] supports the familiar `.with()` syntax for applying display
 //! modifications.
 //!
diff --git a/tabled/examples/margin.rs b/tabled/examples/margin.rs
index 3758563..97498fb 100644
--- a/tabled/examples/margin.rs
+++ b/tabled/examples/margin.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example margin`
-//!
 //! This example demonstrates using the [`Margin`] [`TableOption`] to buffer space
 //! around a [`Table`] display.
 //!
-//! ---
-//!
 //! * Note how the [`Margin::fill()`] function allows for overriding the default whitespace
 //! with any [`char`].
 
diff --git a/tabled/examples/matrix.rs b/tabled/examples/matrix.rs
index 31e5c64..59e22ae 100644
--- a/tabled/examples/matrix.rs
+++ b/tabled/examples/matrix.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example matrix`
-//!
 //! This example demonstrates how [`tabled`] is an excellent tool for creating
 //! dataset visualizations.
 //!
-//! ---
-//!
 //! * 🚀 When native display solutions, such as the [`Debug`] trait and [pretty printing](https://doc.rust-lang.org/std/fmt/#sign0)
 //! options, aren't enough, [`tabled`] is a great choice for improving the quality of your displays.
 
diff --git a/tabled/examples/merge_duplicates.rs b/tabled/examples/merge_duplicates.rs
index 4db8a17..250a95a 100644
--- a/tabled/examples/merge_duplicates.rs
+++ b/tabled/examples/merge_duplicates.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example merge_duplicates`
-//!
 //! This example demonstrates using the [`Merge`] [`TableOption`] to clarify
 //! redundancies in a [`Table`] display.
 //!
-//! ---
-//!
 //! * Note how repetative entries must be consecutive, in their specified direction,
 //! to be merged together.
 //!
diff --git a/tabled/examples/merge_duplicates_2.rs b/tabled/examples/merge_duplicates_2.rs
index acac4e1..063664d 100644
--- a/tabled/examples/merge_duplicates_2.rs
+++ b/tabled/examples/merge_duplicates_2.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example merge_duplicates_2`
-//!
 //! This example demonstrates using the [`Merge`] [`TableOption`] to clarify
 //! redundancies in a [`Table`] display.
 //!
-//! ---
-//!
 //! * Note how a custom theme is applied to give the [`Merged`](Merge) cells
 //! a unique look.
 //!
diff --git a/tabled/examples/nested_table.rs b/tabled/examples/nested_table.rs
index aee6831..8884c81 100644
--- a/tabled/examples/nested_table.rs
+++ b/tabled/examples/nested_table.rs
@@ -1,11 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example nested_table`
-//!
 //! This example demonstrates how [`Tables`](Table) can be comprised of other tables.
 //!
-//! ---
-//!
 //! * This first nested [`Table`] example showcases the [`Builder`] approach.
 //!
 //! * Note how a great deal of manual customizations have been applied to create a
diff --git a/tabled/examples/nested_table_2.rs b/tabled/examples/nested_table_2.rs
index ce784e5..40b0cd0 100644
--- a/tabled/examples/nested_table_2.rs
+++ b/tabled/examples/nested_table_2.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example nested_table_2`
-//!
 //! This example demonstrates a minimalist implementation of [`Tabling`](Table) records
 //! with struct fields.
 //!
-//! ---
-//!
 //! * This second nested [`Table`] example showcases the [`derive`] approach.
 //!
 //! * Note how the [`display_with`] attribute macro applies the custom `display_distribution`
diff --git a/tabled/examples/nested_table_3.rs b/tabled/examples/nested_table_3.rs
index f1b31f0..8e79b27 100644
--- a/tabled/examples/nested_table_3.rs
+++ b/tabled/examples/nested_table_3.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example nested_table_3`
-//!
 //! This example demonstrates creating a nested [`Table`] by instantiating a new
 //! [`Table`] from a collection of other [`Tables`](Table).
 //!
-//! ---
-//!
 //! * This third nested [`Table`] example showcases the [`Table::new()`] approach.
 
 use tabled::{
diff --git a/tabled/examples/panel.rs b/tabled/examples/panel.rs
index bd5214f..343abcd 100644
--- a/tabled/examples/panel.rs
+++ b/tabled/examples/panel.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example panel`
-//!
 //! This example demonstrates using the [`Panel`] [`TableOption`] to inject
 //! table-length columns and rows into a [`Table`].
 //!
-//! ---
-//!
 //! * [`Panel`] supports four injection options:
 //!     * Horizontal | manual index selection
 //!     * Vertical | manual index selection
diff --git a/tabled/examples/pool_table.rs b/tabled/examples/pool_table.rs
new file mode 100644
index 0000000..593631e
--- /dev/null
+++ b/tabled/examples/pool_table.rs
@@ -0,0 +1,33 @@
+//! This example demonstrates a [`PoolTable`] usage.
+
+use tabled::{
+    settings::{Alignment, Style},
+    tables::{PoolTable, TableValue},
+};
+
+fn main() {
+    let data = vec![
+        vec!["Hello World", "Hello World", "Hello World"],
+        vec!["Hello", "", "Hello"],
+        vec!["W", "o", "r", "l", "d"],
+    ];
+
+    let data = TableValue::Column(
+        data.into_iter()
+            .map(|row| {
+                TableValue::Row(
+                    row.into_iter()
+                        .map(|text| TableValue::Cell(text.to_owned()))
+                        .collect(),
+                )
+            })
+            .collect(),
+    );
+
+    let table = PoolTable::from(data)
+        .with(Style::modern())
+        .with(Alignment::center())
+        .to_string();
+
+    println!("{table}");
+}
diff --git a/tabled/examples/rotate.rs b/tabled/examples/rotate.rs
index a16df1f..8db9975 100644
--- a/tabled/examples/rotate.rs
+++ b/tabled/examples/rotate.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example rotate`
-//!
 //! This example demonstrates using the [`Rotate`] [`TableOption`] to rotate the cells
 //! of a [`Table`].
 //!
-//! ---
-//!
 //! * [`Rotate`] supports four motions:
 //!     * `Left` | 90 degree shift
 //!     * `Right` | 90 degree shift
diff --git a/tabled/examples/settings_list.rs b/tabled/examples/settings_list.rs
index 949931e..b0b0aca 100644
--- a/tabled/examples/settings_list.rs
+++ b/tabled/examples/settings_list.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example settings_list`
-//!
 //! This example demonstrates using the [`Settings`] [`TableOption`] to array
 //! [`Table`] configurations in a separate step from instantiation.
 //!
-//! ---
-//!
 //! * Note how this methodoly can lead to huge performance gains
 //! with compile-time constants.
 
diff --git a/tabled/examples/shadow.rs b/tabled/examples/shadow.rs
index f76503a..baa856e 100644
--- a/tabled/examples/shadow.rs
+++ b/tabled/examples/shadow.rs
@@ -5,8 +5,6 @@
 //! This example demonstrates using the [`Shadow`] [`TableOption`] to create
 //! a striking frame around a [`Table`] display.
 //!
-//! ---
-//!
 //! * [`Shadow`] supports several configurations:
 //!     * Thickness
 //!     * Offset
diff --git a/tabled/examples/span.rs b/tabled/examples/span.rs
index 60cf66f..e6a7557 100644
--- a/tabled/examples/span.rs
+++ b/tabled/examples/span.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example span`
-//!
 //! This example demonstrates using the [`Span`] [`CellOption`] to
 //! extend [Cells](Cell) over a specified number of columns/rows.
 //!
-//! ---
-//!
 //! * Note how [`Span`] is available for [`Cell`] modifications
 //! after the [`Modify`] [`TableOption`] is applied.
 //!
diff --git a/tabled/examples/split.rs b/tabled/examples/split.rs
index 11f26b9..d8e6c67 100644
--- a/tabled/examples/split.rs
+++ b/tabled/examples/split.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example split`
-//!
 //! This example demonstrates using the [`Split`] [`TableOption`] to
 //! transform a [`Table`] display in multiple ways.
 //!
-//! ---
-//!
 //! * Several configurations are available to customize a [`Split`] instruction:
 //!     * [`Index`](usize)
 //!     * [`Behavior`]
diff --git a/tabled/examples/table.rs b/tabled/examples/table.rs
index 059eac6..d6d5c39 100644
--- a/tabled/examples/table.rs
+++ b/tabled/examples/table.rs
@@ -1,11 +1,5 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example table`
-//!
 //! This example demonstrates the fundemental qualities of the [crate](https://crates.io/crates/tabled) [`tabled`].
 //!
-//! ---
-//!
 //! * [`tabled`] is powered by convenient [procedural macros](https://doc.rust-lang.org/reference/procedural-macros.html#procedural-macros)
 //! like [`Tabled`]; a deriveable trait that allows your custom
 //! structs and enums to be represented with [`tabled`]'s powerful suite of features.
diff --git a/tabled/examples/table_width.rs b/tabled/examples/table_width.rs
index 30c0756..372adb4 100644
--- a/tabled/examples/table_width.rs
+++ b/tabled/examples/table_width.rs
@@ -1,12 +1,6 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example table_width`
-//!
 //! This example demonstrates using the [`Width`] [`TableOption`] to expand and
 //! contract a [`Table`] display.
 //!
-//! ---
-//!
 //! * Note how table-wide size adjustments are applied proportionally to all columns.
 //!
 //! * Note how [fluent](https://en.wikipedia.org/wiki/Fluent_interface) functions
diff --git a/tabled/examples/table_width_2.rs b/tabled/examples/table_width_2.rs
index 75c4eaa..d2601fc 100644
--- a/tabled/examples/table_width_2.rs
+++ b/tabled/examples/table_width_2.rs
@@ -1,7 +1,3 @@
-//! This example can be run with the following command:
-//!
-//! `cargo run --example table_width_2`
-//!
 //! This example demonstrates using [`Wrap::keep_words()`] to preserve
 //! word shape while truncating a table to the specified size. Without
 //! this setting enabled, a word could possibly be split into pieces,
diff --git a/tabled/src/grid/compact_multiline_config.rs b/tabled/src/grid/compact_multiline_config.rs
index 8aa316b..cc9af07 100644
--- a/tabled/src/grid/compact_multiline_config.rs
+++ b/tabled/src/grid/compact_multiline_config.rs
@@ -60,83 +60,10 @@ impl AsRef<CompactConfig> for CompactMultilineConfig {
 #[cfg(feature = "std")]
 impl From<CompactMultilineConfig> for crate::grid::config::SpannedConfig {
     fn from(compact: CompactMultilineConfig) -> Self {
-        use crate::grid::color::{AnsiColor, StaticColor};
-        use crate::grid::config::{Borders, Entity::Global, HorizontalLine, Indent, Offset, Sides};
-        use papergrid::config::spanned::{ColoredIndent, ColoredMarginIndent};
-
-        fn to_margin(
-            pad: &Sides<Indent>,
-            colors: Sides<StaticColor>,
-        ) -> Sides<ColoredMarginIndent> {
-            let colors = to_ansi_color(colors);
-            Sides::new(
-                ColoredMarginIndent::new(pad.left, Offset::Begin(0), Some(colors.left)),
-                ColoredMarginIndent::new(pad.right, Offset::Begin(0), Some(colors.right)),
-                ColoredMarginIndent::new(pad.top, Offset::Begin(0), Some(colors.top)),
-                ColoredMarginIndent::new(pad.bottom, Offset::Begin(0), Some(colors.bottom)),
-            )
-        }
-
-        fn to_padding(pad: &Sides<Indent>, colors: Sides<StaticColor>) -> Sides<ColoredIndent> {
-            let colors = to_ansi_color(colors);
-            Sides::new(
-                ColoredIndent::new(pad.left, Some(colors.left)),
-                ColoredIndent::new(pad.right, Some(colors.right)),
-                ColoredIndent::new(pad.top, Some(colors.top)),
-                ColoredIndent::new(pad.bottom, Some(colors.bottom)),
-            )
-        }
-
-        fn to_ansi_color(b: Sides<StaticColor>) -> Sides<AnsiColor<'static>> {
-            Sides::new(b.left.into(), b.right.into(), b.top.into(), b.bottom.into())
-        }
-
-        fn borders_static_color_to_ansi_color(
-            b: Borders<StaticColor>,
-        ) -> Borders<AnsiColor<'static>> {
-            Borders {
-                left: b.left.map(|c| c.into()),
-                right: b.right.map(|c| c.into()),
-                top: b.top.map(|c| c.into()),
-                bottom: b.bottom.map(|c| c.into()),
-                bottom_intersection: b.bottom_intersection.map(|c| c.into()),
-                bottom_left: b.bottom_left.map(|c| c.into()),
-                bottom_right: b.bottom_right.map(|c| c.into()),
-                horizontal: b.horizontal.map(|c| c.into()),
-                intersection: b.intersection.map(|c| c.into()),
-                left_intersection: b.left_intersection.map(|c| c.into()),
-                right_intersection: b.right_intersection.map(|c| c.into()),
-                top_intersection: b.top_intersection.map(|c| c.into()),
-                top_left: b.top_left.map(|c| c.into()),
-                top_right: b.top_right.map(|c| c.into()),
-                vertical: b.vertical.map(|c| c.into()),
-            }
-        }
-
-        let mut cfg = crate::grid::config::SpannedConfig::default();
-
-        let pad = to_padding(compact.get_padding(), compact.get_padding_color());
-        cfg.set_padding(Global, pad);
-        *cfg.get_margin_mut() = to_margin(compact.get_margin(), compact.get_margin_color());
-        cfg.set_alignment_horizontal(Global, compact.get_alignment_horizontal());
-        cfg.set_alignment_vertical(Global, compact.get_alignment_vertical());
-        cfg.set_borders(*compact.get_borders());
-        cfg.set_borders_color(borders_static_color_to_ansi_color(
-            *compact.get_borders_color(),
-        ));
-
-        if let Some(line) = compact.get_first_horizontal_line() {
-            cfg.insert_horizontal_line(
-                1,
-                HorizontalLine {
-                    intersection: line.intersection,
-                    left: line.connect1,
-                    right: line.connect2,
-                    main: Some(line.main),
-                },
-            );
-        }
+        use crate::grid::config::Entity;
 
+        let mut cfg = crate::grid::config::SpannedConfig::from(compact.config);
+        cfg.set_alignment_vertical(Entity::Global, compact.alignment_vertical);
         cfg
     }
 }
diff --git a/tabled/src/grid/dimension/peekable_dimension.rs b/tabled/src/grid/dimension/peekable_dimension.rs
index 5989089..1ba6fda 100644
--- a/tabled/src/grid/dimension/peekable_dimension.rs
+++ b/tabled/src/grid/dimension/peekable_dimension.rs
@@ -94,8 +94,8 @@ mod estimation {
                 let width = cell.width();
 
                 let pad = cfg.get_padding(pos.into());
-                let width = width + pad.left.indent.size + pad.right.indent.size;
-                let height = height + pad.top.indent.size + pad.bottom.indent.size;
+                let width = width + pad.left.size + pad.right.size;
+                let height = height + pad.top.size + pad.bottom.size;
 
                 match cfg.get_column_span(pos) {
                     Some(n) if n > 1 => {
diff --git a/tabled/src/grid/mod.rs b/tabled/src/grid/mod.rs
index dca9a41..3f24c36 100644
--- a/tabled/src/grid/mod.rs
+++ b/tabled/src/grid/mod.rs
@@ -27,8 +27,7 @@ pub mod config {
     #[cfg(feature = "std")]
     #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
     pub use papergrid::config::spanned::{
-        ColoredIndent, ColoredMarginIndent, Formatting, HorizontalLine, Offset, SpannedConfig,
-        VerticalLine,
+        Formatting, HorizontalLine, Offset, SpannedConfig, VerticalLine,
     };
 
     #[cfg(feature = "std")]
diff --git a/tabled/src/settings/height/util.rs b/tabled/src/settings/height/util.rs
index c93fe6a..c6917d9 100644
--- a/tabled/src/settings/height/util.rs
+++ b/tabled/src/settings/height/util.rs
@@ -11,7 +11,7 @@ pub(crate) fn get_table_height<R: Records + ExactRecords>(
     let count_horizontals = cfg.count_horizontal(records.count_rows());
 
     let margin = cfg.get_margin();
-    let margin_size = margin.top.indent.size + margin.bottom.indent.size;
+    let margin_size = margin.top.size + margin.bottom.size;
 
     let list = SpannedGridDimension::height(records, cfg);
     let total = list.iter().sum::<usize>();
diff --git a/tabled/src/settings/margin/mod.rs b/tabled/src/settings/margin/mod.rs
index 7e6820b..4bd043d 100644
--- a/tabled/src/settings/margin/mod.rs
+++ b/tabled/src/settings/margin/mod.rs
@@ -38,10 +38,7 @@ use crate::{
 };
 
 #[cfg(feature = "std")]
-use crate::grid::{
-    color::AnsiColor,
-    config::{ColoredConfig, ColoredMarginIndent, Offset},
-};
+use crate::grid::{color::AnsiColor, config::ColoredConfig};
 
 /// Margin is responsible for a left/right/top/bottom outer indent of a grid.
 ///
@@ -102,17 +99,18 @@ where
     C: Into<AnsiColor<'static>> + Clone,
 {
     fn change(&mut self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D) {
-        let margin = cfg.get_margin_mut();
-        margin.left = ColoredMarginIndent::new(self.indent.left, Offset::Begin(0), None);
-        margin.right = ColoredMarginIndent::new(self.indent.right, Offset::Begin(0), None);
-        margin.top = ColoredMarginIndent::new(self.indent.top, Offset::Begin(0), None);
-        margin.bottom = ColoredMarginIndent::new(self.indent.bottom, Offset::Begin(0), None);
+        let indent = self.indent;
+        let margin = Sides::new(indent.left, indent.right, indent.top, indent.bottom);
+        cfg.set_margin(margin);
 
-        if let Some(colors) = self.colors.clone() {
-            margin.left.color = Some(colors.left.into());
-            margin.right.color = Some(colors.right.into());
-            margin.top.color = Some(colors.top.into());
-            margin.bottom.color = Some(colors.bottom.into());
+        if let Some(colors) = &self.colors {
+            let margin = Sides::new(
+                Some(colors.left.clone().into()),
+                Some(colors.right.clone().into()),
+                Some(colors.top.clone().into()),
+                Some(colors.bottom.clone().into()),
+            );
+            cfg.set_margin_color(margin);
         }
     }
 }
diff --git a/tabled/src/settings/padding/mod.rs b/tabled/src/settings/padding/mod.rs
index 4a9a217..4c73f0a 100644
--- a/tabled/src/settings/padding/mod.rs
+++ b/tabled/src/settings/padding/mod.rs
@@ -43,14 +43,11 @@ use crate::{
         config::{CompactConfig, CompactMultilineConfig},
         config::{Entity, Indent, Sides},
     },
-    settings::TableOption,
+    settings::{CellOption, TableOption},
 };
 
 #[cfg(feature = "std")]
-use crate::grid::{
-    color::AnsiColor,
-    config::{ColoredConfig, ColoredIndent},
-};
+use crate::grid::{color::AnsiColor, config::ColoredConfig};
 
 /// Padding is responsible for a left/right/top/bottom inner indent of a particular cell.
 ///
@@ -112,14 +109,24 @@ impl<Color> Padding<Color> {
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
-impl<R, C> crate::settings::CellOption<R, ColoredConfig> for Padding<C>
+impl<R, C> CellOption<R, ColoredConfig> for Padding<C>
 where
     C: Into<AnsiColor<'static>> + Clone,
 {
     fn change(&mut self, _: &mut R, cfg: &mut ColoredConfig, entity: Entity) {
-        let pad = create_padding(&self.indent, self.colors.as_ref());
+        let indent = self.indent;
+        let pad = Sides::new(indent.left, indent.right, indent.top, indent.bottom);
         cfg.set_padding(entity, pad);
+
+        if let Some(colors) = &self.colors {
+            let pad = Sides::new(
+                Some(colors.left.clone().into()),
+                Some(colors.right.clone().into()),
+                Some(colors.top.clone().into()),
+                Some(colors.bottom.clone().into()),
+            );
+            cfg.set_padding_color(entity, pad);
+        }
     }
 }
 
@@ -129,9 +136,8 @@ impl<R, D, C> TableOption<R, D, ColoredConfig> for Padding<C>
 where
     C: Into<AnsiColor<'static>> + Clone,
 {
-    fn change(&mut self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D) {
-        let pad = create_padding(&self.indent, self.colors.as_ref());
-        cfg.set_padding(Entity::Global, pad);
+    fn change(&mut self, records: &mut R, cfg: &mut ColoredConfig, _: &mut D) {
+        <Self as CellOption<R, ColoredConfig>>::change(self, records, cfg, Entity::Global)
     }
 }
 
@@ -157,16 +163,3 @@ where
         self.change(records, cfg.deref_mut(), dimension)
     }
 }
-
-#[cfg(feature = "std")]
-fn create_padding<C: Into<AnsiColor<'static>> + Clone>(
-    i: &Sides<Indent>,
-    c: Option<&Sides<C>>,
-) -> Sides<ColoredIndent> {
-    Sides::new(
-        ColoredIndent::new(i.left, c.as_ref().map(|c| c.left.clone().into())),
-        ColoredIndent::new(i.right, c.as_ref().map(|c| c.right.clone().into())),
-        ColoredIndent::new(i.top, c.as_ref().map(|c| c.top.clone().into())),
-        ColoredIndent::new(i.bottom, c.as_ref().map(|c| c.bottom.clone().into())),
-    )
-}
diff --git a/tabled/src/settings/shadow/mod.rs b/tabled/src/settings/shadow/mod.rs
index d465951..880a349 100644
--- a/tabled/src/settings/shadow/mod.rs
+++ b/tabled/src/settings/shadow/mod.rs
@@ -28,7 +28,8 @@
 //! [`Table`]: crate::Table
 
 use crate::{
-    grid::config::{ColoredConfig, Offset, Sides},
+    grid::color::AnsiColor,
+    grid::config::{ColoredConfig, Indent, Offset, Sides},
     settings::{color::Color, TableOption},
 };
 
@@ -113,61 +114,82 @@ impl Shadow {
 
 impl<R, D> TableOption<R, D, ColoredConfig> for Shadow {
     fn change(&mut self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D) {
-        let mut margin = cfg.get_margin_mut();
+        set_margin(cfg, self.size, self.c, &self.direction);
+        set_margin_offset(cfg, self.size_offset, &self.direction);
 
-        if self.direction.top {
-            margin.top.indent.size = self.size;
-            margin.top.indent.fill = self.c;
+        if let Some(color) = &self.color {
+            set_margin_color(cfg, color.clone().into(), &self.direction);
         }
+    }
+}
 
-        if self.direction.bottom {
-            margin.bottom.indent.size = self.size;
-            margin.bottom.indent.fill = self.c;
-        }
+fn set_margin(cfg: &mut ColoredConfig, size: usize, c: char, direction: &Sides<bool>) {
+    let mut margin: Sides<Indent> = Sides::default();
+    if direction.top {
+        margin.top.size = size;
+        margin.top.fill = c;
+    }
 
-        if self.direction.left {
-            margin.left.indent.size = self.size;
-            margin.left.indent.fill = self.c;
-        }
+    if direction.bottom {
+        margin.bottom.size = size;
+        margin.bottom.fill = c;
+    }
 
-        if self.direction.right {
-            margin.right.indent.size = self.size;
-            margin.right.indent.fill = self.c;
-        }
+    if direction.left {
+        margin.left.size = size;
+        margin.left.fill = c;
+    }
 
-        if self.direction.right && self.direction.bottom {
-            margin.bottom.offset = Offset::Begin(self.size_offset);
-            margin.right.offset = Offset::Begin(self.size_offset);
-        }
+    if direction.right {
+        margin.right.size = size;
+        margin.right.fill = c;
+    }
 
-        if self.direction.right && self.direction.top {
-            margin.top.offset = Offset::Begin(self.size_offset);
-            margin.right.offset = Offset::End(self.size_offset);
-        }
+    cfg.set_margin(margin);
+}
 
-        if self.direction.left && self.direction.bottom {
-            margin.bottom.offset = Offset::End(self.size_offset);
-            margin.left.offset = Offset::Begin(self.size_offset);
-        }
+fn set_margin_offset(cfg: &mut ColoredConfig, size: usize, direction: &Sides<bool>) {
+    let mut margin = Sides::filled(Offset::Begin(0));
+    if direction.right && direction.bottom {
+        margin.bottom = Offset::Begin(size);
+        margin.right = Offset::Begin(size);
+    }
 
-        if self.direction.left && self.direction.top {
-            margin.top.offset = Offset::End(self.size_offset);
-            margin.left.offset = Offset::End(self.size_offset);
-        }
+    if direction.right && direction.top {
+        margin.top = Offset::Begin(size);
+        margin.right = Offset::End(size);
+    }
 
-        if let Some(color) = self.color.as_ref() {
-            if self.direction.top {
-                margin.top.color = Some(color.clone().into());
-            }
-            if self.direction.bottom {
-                margin.bottom.color = Some(color.clone().into());
-            }
-            if self.direction.left {
-                margin.left.color = Some(color.clone().into());
-            }
-            if self.direction.right {
-                margin.right.color = Some(color.clone().into());
-            }
-        }
+    if direction.left && direction.bottom {
+        margin.bottom = Offset::End(size);
+        margin.left = Offset::Begin(size);
+    }
+
+    if direction.left && direction.top {
+        margin.top = Offset::End(size);
+        margin.left = Offset::End(size);
+    }
+
+    cfg.set_margin_offset(margin);
+}
+
+fn set_margin_color(cfg: &mut ColoredConfig, color: AnsiColor<'static>, direction: &Sides<bool>) {
+    let mut margin: Sides<Option<AnsiColor<'static>>> = Sides::default();
+    if direction.right {
+        margin.right = Some(color.clone());
     }
+
+    if direction.top {
+        margin.top = Some(color.clone());
+    }
+
+    if direction.left {
+        margin.left = Some(color.clone());
+    }
+
+    if direction.bottom {
+        margin.bottom = Some(color.clone());
+    }
+
+    cfg.set_margin_color(margin);
 }
diff --git a/tabled/src/settings/style/builder.rs b/tabled/src/settings/style/builder.rs
index e454a05..5edeaef 100644
--- a/tabled/src/settings/style/builder.rs
+++ b/tabled/src/settings/style/builder.rs
@@ -598,9 +598,7 @@ impl<T, B, L, R, H, V, HLines, VLines> Style<T, B, L, R, H, V, HLines, VLines> {
         }
 
         for vl in &mut self.verticals {
-            if let Some(line) = &mut vl.line {
-                line.connector1 = Some(c);
-            }
+            vl.line.connector1 = Some(c);
         }
 
         Style::new(self.borders, self.horizontals, self.verticals)
@@ -628,9 +626,7 @@ impl<T, B, L, R, H, V, HLines, VLines> Style<T, B, L, R, H, V, HLines, VLines> {
         }
 
         for vl in &mut self.verticals {
-            if let Some(line) = &mut vl.line {
-                line.connector2 = Some(c);
-            }
+            vl.line.connector2 = Some(c);
         }
 
         Style::new(self.borders, self.horizontals, self.verticals)
@@ -658,9 +654,7 @@ impl<T, B, L, R, H, V, HLines, VLines> Style<T, B, L, R, H, V, HLines, VLines> {
         }
 
         for hl in &mut self.horizontals {
-            if let Some(line) = &mut hl.line {
-                line.connector1 = Some(c);
-            }
+            hl.line.connector1 = Some(c);
         }
 
         Style::new(self.borders, self.horizontals, self.verticals)
@@ -688,9 +682,7 @@ impl<T, B, L, R, H, V, HLines, VLines> Style<T, B, L, R, H, V, HLines, VLines> {
         }
 
         for hl in &mut self.horizontals {
-            if let Some(line) = &mut hl.line {
-                line.connector2 = Some(c);
-            }
+            hl.line.connector2 = Some(c);
         }
 
         Style::new(self.borders, self.horizontals, self.verticals)
@@ -718,9 +710,7 @@ impl<T, B, L, R, H, V, HLines, VLines> Style<T, B, L, R, H, V, HLines, VLines> {
         }
 
         for vl in &mut self.verticals {
-            if let Some(line) = &mut vl.line {
-                line.intersection = Some(c);
-            }
+            vl.line.intersection = Some(c);
         }
 
         Style::new(self.borders, self.horizontals, self.verticals)
@@ -748,9 +738,7 @@ impl<T, B, L, R, H, V, HLines, VLines> Style<T, B, L, R, H, V, HLines, VLines> {
         }
 
         for hl in &mut self.horizontals {
-            if let Some(line) = &mut hl.line {
-                line.intersection = Some(c);
-            }
+            hl.line.intersection = Some(c);
         }
 
         Style::new(self.borders, self.horizontals, self.verticals)
@@ -1133,20 +1121,16 @@ where
     fn next(&mut self) -> Option<Self::Item> {
         let mut hl = self.iter.next()?;
 
-        if let Some(mut line) = hl.line {
-            if self.intersection {
-                line.intersection = None;
-            }
-
-            if self.left {
-                line.connector1 = None;
-            }
+        if self.intersection {
+            hl.line.intersection = None;
+        }
 
-            if self.right {
-                line.connector2 = None;
-            }
+        if self.left {
+            hl.line.connector1 = None;
+        }
 
-            hl.line = Some(line);
+        if self.right {
+            hl.line.connector2 = None;
         }
 
         Some(hl)
@@ -1182,20 +1166,16 @@ where
     fn next(&mut self) -> Option<Self::Item> {
         let mut hl = self.iter.next()?;
 
-        if let Some(mut line) = hl.line {
-            if self.intersection {
-                line.intersection = None;
-            }
-
-            if self.top {
-                line.connector1 = None;
-            }
+        if self.intersection {
+            hl.line.intersection = None;
+        }
 
-            if self.bottom {
-                line.connector2 = None;
-            }
+        if self.top {
+            hl.line.connector1 = None;
+        }
 
-            hl.line = Some(line);
+        if self.bottom {
+            hl.line.connector2 = None;
         }
 
         Some(hl)
diff --git a/tabled/src/settings/style/horizontal_line.rs b/tabled/src/settings/style/horizontal_line.rs
index af56dd9..647d2a6 100644
--- a/tabled/src/settings/style/horizontal_line.rs
+++ b/tabled/src/settings/style/horizontal_line.rs
@@ -14,103 +14,51 @@ use super::Line;
 #[derive(Debug, Clone)]
 pub struct HorizontalLine {
     pub(crate) index: usize,
-    pub(crate) line: Option<Line>,
+    pub(crate) line: Line,
 }
 
 impl HorizontalLine {
     /// Creates a new horizontal split line.
     pub const fn new(index: usize, line: Line) -> Self {
-        Self {
-            index,
-            line: Some(line),
-        }
-    }
-
-    /// Removes an existing split line by index.
-    ///
-    /// It not present or in case of index bigger than the count of columns it has no affect.
-    pub fn empty(index: usize) -> Self {
-        Self { index, line: None }
+        Self { index, line }
     }
 
     /// Sets a horizontal character.
     pub const fn main(mut self, c: Option<char>) -> Self {
-        let mut line = match self.line {
-            Some(line) => line,
-            None => Line::empty(),
-        };
-
-        line.main = c;
-        self.line = Some(line);
-
+        self.line.main = c;
         self
     }
 
     /// Sets a vertical intersection character.
     pub const fn intersection(mut self, c: Option<char>) -> Self {
-        let mut line = match self.line {
-            Some(line) => line,
-            None => Line::empty(),
-        };
-
-        line.intersection = c;
-        self.line = Some(line);
-
+        self.line.intersection = c;
         self
     }
 
     /// Sets a left character.
     pub const fn left(mut self, c: Option<char>) -> Self {
-        let mut line = match self.line {
-            Some(line) => line,
-            None => Line::empty(),
-        };
-
-        line.connector1 = c;
-        self.line = Some(line);
-
+        self.line.connector1 = c;
         self
     }
 
     /// Sets a right character.
     pub const fn right(mut self, c: Option<char>) -> Self {
-        let mut line = match self.line {
-            Some(line) => line,
-            None => Line::empty(),
-        };
-
-        line.connector2 = c;
-        self.line = Some(line);
-
+        self.line.connector2 = c;
         self
     }
-
-    /// Checks if it's an empty line.
-    pub const fn is_empty(&self) -> bool {
-        match &self.line {
-            Some(l) => l.is_empty(),
-            None => true,
-        }
-    }
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<R, D> TableOption<R, D, ColoredConfig> for HorizontalLine {
     fn change(&mut self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D) {
-        match self.line {
-            Some(line) => cfg.insert_horizontal_line(self.index, GridLine::from(line)),
-            None => cfg.remove_horizontal_line(self.index),
-        }
+        cfg.insert_horizontal_line(self.index, GridLine::from(self.line))
     }
 }
 
 impl<R, D> TableOption<R, D, CompactConfig> for HorizontalLine {
     fn change(&mut self, _: &mut R, cfg: &mut CompactConfig, _: &mut D) {
         if self.index == 1 {
-            if let Some(line) = self.line {
-                *cfg = cfg.set_first_horizontal_line(papergrid::config::Line::from(line));
-            }
+            *cfg = cfg.set_first_horizontal_line(papergrid::config::Line::from(self.line));
         }
     }
 }
diff --git a/tabled/src/settings/style/raw_style.rs b/tabled/src/settings/style/raw_style.rs
index 8c5cbe0..a31028c 100644
--- a/tabled/src/settings/style/raw_style.rs
+++ b/tabled/src/settings/style/raw_style.rs
@@ -395,19 +395,11 @@ impl<R, D> TableOption<R, D, ColoredConfig> for &RawStyle {
         cfg.set_borders(self.borders);
 
         for (&row, line) in &self.horizontals {
-            if line.is_empty() {
-                cfg.remove_horizontal_line(row);
-            } else {
-                cfg.insert_horizontal_line(row, config::HorizontalLine::from(*line));
-            }
+            cfg.insert_horizontal_line(row, config::HorizontalLine::from(*line));
         }
 
         for (&col, line) in &self.verticals {
-            if line.is_empty() {
-                cfg.remove_vertical_line(col);
-            } else {
-                cfg.insert_vertical_line(col, config::VerticalLine::from(*line));
-            }
+            cfg.insert_vertical_line(col, config::VerticalLine::from(*line));
         }
 
         if !self.colors.is_empty() {
@@ -426,20 +418,14 @@ where
             .get_horizontals()
             .clone()
             .into_iter()
-            .flat_map(|hr| {
-                let index = hr.index;
-                hr.line.map(|line| (index, line))
-            })
+            .map(|hr| (hr.index, hr.line))
             .collect();
 
         let verticals = style
             .get_verticals()
             .clone()
             .into_iter()
-            .flat_map(|hr| {
-                let index = hr.index;
-                hr.line.map(|line| (index, line))
-            })
+            .map(|hr| (hr.index, hr.line))
             .collect();
 
         Self {
diff --git a/tabled/src/settings/style/vertical_line.rs b/tabled/src/settings/style/vertical_line.rs
index 34f7f72..6f8c98b 100644
--- a/tabled/src/settings/style/vertical_line.rs
+++ b/tabled/src/settings/style/vertical_line.rs
@@ -9,93 +9,43 @@ use super::Line;
 #[derive(Debug, Clone)]
 pub struct VerticalLine {
     pub(crate) index: usize,
-    pub(crate) line: Option<Line>,
+    pub(crate) line: Line,
 }
 
 impl VerticalLine {
     /// Creates a new horizontal split line.
     pub const fn new(index: usize, line: Line) -> Self {
-        Self {
-            index,
-            line: Some(line),
-        }
-    }
-
-    /// Removes an existing split line by index.
-    ///
-    /// It not present or in case of index bigger than the count of columns it has no affect.
-    pub fn empty(index: usize) -> Self {
-        Self { index, line: None }
+        Self { index, line }
     }
 
     /// Sets a horizontal character.
     pub const fn main(mut self, c: Option<char>) -> Self {
-        let mut line = match self.line {
-            Some(line) => line,
-            None => Line::empty(),
-        };
-
-        line.main = c;
-        self.line = Some(line);
-
+        self.line.main = c;
         self
     }
 
     /// Sets a vertical intersection character.
     pub const fn intersection(mut self, c: Option<char>) -> Self {
-        let mut line = match self.line {
-            Some(line) => line,
-            None => Line::empty(),
-        };
-
-        line.intersection = c;
-        self.line = Some(line);
-
+        self.line.intersection = c;
         self
     }
 
     /// Sets a top character.
     pub const fn top(mut self, c: Option<char>) -> Self {
-        let mut line = match self.line {
-            Some(line) => line,
-            None => Line::empty(),
-        };
-
-        line.connector1 = c;
-        self.line = Some(line);
-
+        self.line.connector1 = c;
         self
     }
 
     /// Sets a bottom character.
     pub const fn bottom(mut self, c: Option<char>) -> Self {
-        let mut line = match self.line {
-            Some(line) => line,
-            None => Line::empty(),
-        };
-
-        line.connector2 = c;
-        self.line = Some(line);
-
+        self.line.connector2 = c;
         self
     }
-
-    /// Checks if it's an empty line.
-    pub const fn is_empty(&self) -> bool {
-        match &self.line {
-            Some(l) => l.is_empty(),
-            None => true,
-        }
-    }
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<R, D> TableOption<R, D, ColoredConfig> for VerticalLine {
     fn change(&mut self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D) {
-        match &self.line {
-            Some(line) => cfg.insert_vertical_line(self.index, VLine::from(*line)),
-            None => cfg.remove_vertical_line(self.index),
-        }
+        cfg.insert_vertical_line(self.index, VLine::from(self.line));
     }
 }
diff --git a/tabled/src/settings/width/truncate.rs b/tabled/src/settings/width/truncate.rs
index b7f1ac6..7b13145 100644
--- a/tabled/src/settings/width/truncate.rs
+++ b/tabled/src/settings/width/truncate.rs
@@ -446,8 +446,7 @@ fn get_decrease_cell_list(
 
                 if width >= width_min {
                     let padding = cfg.get_padding((row, col).into());
-                    let width =
-                        width.saturating_sub(padding.left.indent.size + padding.right.indent.size);
+                    let width = width.saturating_sub(padding.left.size + padding.right.size);
 
                     points.push(((row, col), width));
                 }
diff --git a/tabled/src/settings/width/util.rs b/tabled/src/settings/width/util.rs
index 9548351..f8f2ac7 100644
--- a/tabled/src/settings/width/util.rs
+++ b/tabled/src/settings/width/util.rs
@@ -21,8 +21,8 @@ fn get_table_total_width(list: &[usize], cfg: &SpannedConfig) -> usize {
     let margin = cfg.get_margin();
     list.iter().sum::<usize>()
         + cfg.count_vertical(list.len())
-        + margin.left.indent.size
-        + margin.right.indent.size
+        + margin.left.size
+        + margin.right.size
 }
 
 /// The function cuts the string to a specific width.
diff --git a/tabled/src/settings/width/wrap.rs b/tabled/src/settings/width/wrap.rs
index def0089..2800c36 100644
--- a/tabled/src/settings/width/wrap.rs
+++ b/tabled/src/settings/width/wrap.rs
@@ -629,8 +629,7 @@ fn get_decrease_cell_list(
 
                 if width >= width_min {
                     let padding = cfg.get_padding((row, col).into());
-                    let width =
-                        width.saturating_sub(padding.left.indent.size + padding.right.indent.size);
+                    let width = width.saturating_sub(padding.left.size + padding.right.size);
 
                     points.push(((row, col), width));
                 }
diff --git a/tabled/src/tables/table.rs b/tabled/src/tables/table.rs
index 2fef352..5d45af3 100644
--- a/tabled/src/tables/table.rs
+++ b/tabled/src/tables/table.rs
@@ -222,7 +222,7 @@ impl Table {
 
         let margin = self.config.get_margin();
 
-        total + counth + margin.top.indent.size + margin.bottom.indent.size
+        total + counth + margin.top.size + margin.bottom.size
     }
 
     /// Returns total widths of a table, including margin and vertical lines.
@@ -237,7 +237,7 @@ impl Table {
 
         let margin = self.config.get_margin();
 
-        total + countv + margin.left.indent.size + margin.right.indent.size
+        total + countv + margin.left.size + margin.right.size
     }
 
     /// Returns a table config.
@@ -420,21 +420,22 @@ fn set_width_table(f: &fmt::Formatter<'_>, cfg: &mut SpannedConfig, table: &Tabl
         let alignment = f.align().unwrap_or(fmt::Alignment::Left);
         let (left, right) = table_padding(alignment, available);
 
-        let mut margin = cfg.get_margin_mut();
-        margin.left.indent.size += left;
-        margin.right.indent.size += right;
+        let mut margin = cfg.get_margin();
+        margin.left.size += left;
+        margin.right.size += right;
 
-        if (margin.left.indent.size > 0 && margin.left.indent.fill == char::default())
-            || fill != char::default()
+        if (margin.left.size > 0 && margin.left.fill == char::default()) || fill != char::default()
         {
-            margin.left.indent.fill = fill;
+            margin.left.fill = fill;
         }
 
-        if (margin.right.indent.size > 0 && margin.right.indent.fill == char::default())
+        if (margin.right.size > 0 && margin.right.fill == char::default())
             || fill != char::default()
         {
-            margin.right.indent.fill = fill;
+            margin.right.fill = fill;
         }
+
+        cfg.set_margin(margin);
     }
 }
 
diff --git a/tabled/src/tables/table_pool.rs b/tabled/src/tables/table_pool.rs
index d3d7777..ed19abc 100644
--- a/tabled/src/tables/table_pool.rs
+++ b/tabled/src/tables/table_pool.rs
@@ -1,10 +1,10 @@
-use papergrid::{
-    config::{compact::CompactConfig, AlignmentHorizontal, Indent, Sides},
-    records::IntoRecords,
-};
-
 use crate::{
-    grid::{config::CompactMultilineConfig, dimension::CompleteDimension, records::EmptyRecords},
+    grid::{
+        config::{AlignmentHorizontal, CompactConfig, CompactMultilineConfig, Indent, Sides},
+        dimension::CompleteDimension,
+        records::EmptyRecords,
+        records::IntoRecords,
+    },
     settings::{Style, TableOption},
 };
 
@@ -218,6 +218,7 @@ fn configure_grid() -> CompactMultilineConfig {
 }
 
 mod print {
+    use core::iter::FromIterator;
     use std::{cmp::max, collections::HashMap, iter::repeat};
 
     use papergrid::config::{spanned::SpannedConfig, Borders};
@@ -443,9 +444,7 @@ mod print {
             };
 
             let val = _build_table(val, cfg, dims, valctx);
-
             intersections_vertical = val.intersections_vertical;
-
             new_intersections_horizontal.extend(val.intersections_horizontal.iter());
             let value = val.content;
 
@@ -475,7 +474,7 @@ mod print {
         let config: SpannedConfig = (*cfg).into();
 
         let value = config_string(value, cfg, width, height);
-        let mut table = Table::new([value]);
+        let mut table = Table::from_iter([[value]]);
 
         let _ = table.with(config);
         let _ = table.with(ConfigCell(ctx));
@@ -489,79 +488,96 @@ mod print {
 
     impl<R, D> TableOption<R, D, ColoredConfig> for ConfigCell {
         fn change(&mut self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D) {
-            let ctx = &mut self.0;
-
             {
-                let mut borders = *cfg.get_borders();
+                // we set a horizontal lines to borders to not complicate logic with cleaning it
 
-                let has_vertical = cfg.get_borders().has_left();
-                if !ctx.intersections_horizontal.is_empty() && has_vertical {
-                    let mut splits =
-                        short_splits(&mut ctx.intersections_horizontal, ctx.size.width);
-                    squash_splits(&mut splits);
+                let mut borders = *cfg.get_borders();
+                if let Some(line) = cfg.get_horizontal_line(0) {
+                    borders.top = line.main;
+                    borders.top_left = line.left;
+                    borders.top_right = line.right;
+                }
 
-                    let c = cfg.get_borders().bottom_intersection.unwrap_or(' ');
-                    cfg_set_top_chars(cfg, &splits, c)
+                if let Some(line) = cfg.get_horizontal_line(1) {
+                    borders.bottom = line.main;
+                    borders.bottom_left = line.left;
+                    borders.bottom_right = line.right;
                 }
 
-                let has_horizontal = cfg.get_borders().has_top();
-                if !ctx.intersections_vertical.is_empty() && has_horizontal {
-                    let mut splits = short_splits(&mut ctx.intersections_vertical, ctx.size.width);
-                    squash_splits(&mut splits);
+                cfg.clear_theme();
+                cfg.set_borders(borders);
+            }
 
-                    let c = cfg.get_borders().right_intersection.unwrap_or(' ');
-                    cfg_set_left_chars(cfg, &splits, c)
-                }
+            let ctx = &mut self.0;
+
+            let has_vertical = cfg.get_borders().has_left();
+            if !ctx.intersections_horizontal.is_empty() && has_vertical {
+                let mut splits = short_splits(&mut ctx.intersections_horizontal, ctx.size.width);
+                squash_splits(&mut splits);
 
-                // set top_left
-                {
-                    if ctx.kv && ctx.kv_is_first {
-                        borders.top_left = borders.top_intersection;
-                    }
+                let c = cfg.get_borders().bottom_intersection.unwrap_or(' ');
+                cfg_set_top_chars(cfg, &splits, c)
+            }
 
-                    if ctx.kv && !ctx.kv_is_first {
-                        borders.top_left = borders.intersection;
-                    }
+            let has_horizontal = cfg.get_borders().has_top();
+            if !ctx.intersections_vertical.is_empty() && has_horizontal {
+                let mut splits = short_splits(&mut ctx.intersections_vertical, ctx.size.width);
+                squash_splits(&mut splits);
 
-                    if ctx.kv && ctx.list && !ctx.list_is_first {
-                        borders.top_left = borders.left_intersection;
-                    }
+                let c = cfg.get_borders().right_intersection.unwrap_or(' ');
+                cfg_set_left_chars(cfg, &splits, c)
+            }
 
-                    if ctx.is_first_col && !ctx.is_first_row {
-                        borders.top_left = borders.left_intersection;
-                    }
+            let mut borders = *cfg.get_borders();
 
-                    if ctx.lean_top {
-                        borders.top_left = borders.top_intersection;
-                    }
+            // set top_left
+            {
+                if ctx.kv && ctx.kv_is_first {
+                    borders.top_left = borders.top_intersection;
+                }
 
-                    if ctx.top_left {
-                        borders.top_left = borders.left_intersection;
-                    }
+                if ctx.kv && !ctx.kv_is_first {
+                    borders.top_left = borders.intersection;
+                }
 
-                    if ctx.top_intersection {
-                        borders.top_left = borders.intersection;
-                    }
+                if ctx.kv && ctx.list && !ctx.list_is_first {
+                    borders.top_left = borders.left_intersection;
                 }
 
-                if ctx.is_last_col && !ctx.is_first_row {
-                    borders.top_right = borders.right_intersection;
+                if ctx.is_first_col && !ctx.is_first_row {
+                    borders.top_left = borders.left_intersection;
                 }
 
-                if !ctx.is_first_col && ctx.is_last_row {
-                    borders.bottom_left = borders.bottom_intersection;
+                if ctx.lean_top {
+                    borders.top_left = borders.top_intersection;
                 }
 
-                if !ctx.is_last_row || ctx.no_bottom {
-                    cfg_no_bottom_borders(&mut borders);
+                if ctx.top_left {
+                    borders.top_left = borders.left_intersection;
                 }
 
-                if ctx.no_right {
-                    cfg_no_right_borders(&mut borders);
+                if ctx.top_intersection {
+                    borders.top_left = borders.intersection;
                 }
+            }
 
-                cfg.set_borders(borders);
+            if ctx.is_last_col && !ctx.is_first_row {
+                borders.top_right = borders.right_intersection;
             }
+
+            if !ctx.is_first_col && ctx.is_last_row {
+                borders.bottom_left = borders.bottom_intersection;
+            }
+
+            if !ctx.is_last_row || ctx.no_bottom {
+                cfg_no_bottom_borders(&mut borders);
+            }
+
+            if ctx.no_right {
+                cfg_no_right_borders(&mut borders);
+            }
+
+            cfg.set_borders(borders);
         }
     }
 
@@ -570,6 +586,7 @@ mod print {
         borders.bottom_intersection = None;
         borders.bottom_left = None;
         borders.bottom_right = None;
+        borders.horizontal = None;
     }
 
     fn cfg_no_right_borders(borders: &mut Borders<char>) {
@@ -577,6 +594,7 @@ mod print {
         borders.right_intersection = None;
         borders.top_right = None;
         borders.bottom_right = None;
+        borders.vertical = None;
     }
 
     fn cfg_set_top_chars(cfg: &mut ColoredConfig, list: &[usize], c: char) {


Test patch:
diff --git a/json_to_table/tests/test_orientation_modes.rs b/json_to_table/tests/test_orientation_modes.rs
index b667190..24fcb55 100644
--- a/json_to_table/tests/test_orientation_modes.rs
+++ b/json_to_table/tests/test_orientation_modes.rs
@@ -35,7 +35,7 @@ fn orientation_test_1() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -87,8 +87,8 @@ fn orientation_test_2() {
 
     let table = json_to_table(&value)
         .with(Style::modern())
-        .object_orientation(Orientation::Horizontal)
-        .array_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
+        .array_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -297,7 +297,7 @@ fn collapse_array_orientation_test_1() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -348,7 +348,7 @@ fn collapse_array_orientation_test_2() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -401,7 +401,7 @@ fn collapse_array_orientation_test_3() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -444,7 +444,7 @@ fn collapse_array_orientation_test_4() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -474,7 +474,7 @@ fn collapse_array_orientation_test_5() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -503,7 +503,7 @@ fn collapse_array_orientation_test_6() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -547,7 +547,7 @@ fn collapse_object_orientation_test_1() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -592,7 +592,7 @@ fn collapse_object_orientation_test_2() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -645,7 +645,7 @@ fn collapse_object_orientation_test_3() {
 
     let table = json_to_table(&value)
         .with(Style::modern())
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -688,7 +688,7 @@ fn collapse_object_orientation_test_4() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -736,7 +736,7 @@ fn collapse_object_orientation_test_5() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -785,7 +785,7 @@ fn collapse_object_orientation_test_6() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -843,8 +843,8 @@ fn collapse_object_array_orientation_test_1() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
-        .array_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -885,8 +885,8 @@ fn collapse_object_array_orientation_test_2() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
-        .array_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -929,8 +929,8 @@ fn collapse_object_array_orientation_test_3() {
 
     let table = json_to_table(&value)
         .with(Style::modern())
-        .object_orientation(Orientation::Horizontal)
-        .array_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -961,8 +961,8 @@ fn collapse_object_array_orientation_test_4() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
-        .array_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -988,8 +988,8 @@ fn collapse_object_array_orientation_test_5() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
-        .array_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -1016,8 +1016,8 @@ fn collapse_object_array_orientation_test_6() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
-        .array_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -1069,8 +1069,8 @@ fn collapse_object_array_orientation_test_7() {
 
     let table = json_to_table(&value)
         .with(Style::extended())
-        .object_orientation(Orientation::Horizontal)
-        .array_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
+        .array_orientation(Orientation::Row)
         .collapse()
         .to_string();
 
@@ -1114,7 +1114,7 @@ fn collapse_object_array_orientation_test_7() {
 //     let table = json_to_table(&value)
 //         .set_style(Style::extended())
 //         .collapse()
-//         .set_object_mode(Orientation::Vertical)
+//         .set_object_mode(Orientation::Column)
 //         .to_string();
 
 //     println!("{table}");
diff --git a/json_to_table/tests/test_table.rs b/json_to_table/tests/test_table.rs
index b84b4b6..22f6ee4 100644
--- a/json_to_table/tests/test_table.rs
+++ b/json_to_table/tests/test_table.rs
@@ -940,7 +940,7 @@ fn test_map_empty_entity_collapsed_1_horizontal() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -986,7 +986,7 @@ fn test_map_empty_entity_collapsed_2_horizontal() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -1018,7 +1018,7 @@ fn test_list_empty_entity_collapsed_0_horizontal() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -1038,7 +1038,7 @@ fn test_list_empty_entity_collapsed_1_horizontal() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -1054,7 +1054,7 @@ fn test_list_empty_entity_collapsed_2_horizontal() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .array_orientation(Orientation::Horizontal)
+        .array_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -1078,7 +1078,7 @@ fn test_map_empty_entity_collapsed_1_horizontal_map() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -1116,7 +1116,7 @@ fn test_map_empty_entity_collapsed_2_horizontal_map() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -1144,7 +1144,7 @@ fn test_list_empty_entity_collapsed_0_horizontal_map() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -1170,7 +1170,7 @@ fn test_list_empty_entity_collapsed_1_horizontal_map() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
@@ -1192,7 +1192,7 @@ fn test_list_empty_entity_collapsed_2_horizontal_map() {
     let table = json_to_table(&value)
         .with(Style::modern())
         .collapse()
-        .object_orientation(Orientation::Horizontal)
+        .object_orientation(Orientation::Row)
         .to_string();
 
     assert_eq!(
diff --git a/tabled/tests/pool_table.rs b/tabled/tests/pool_table.rs
index 3417f6c..c5950fa 100644
--- a/tabled/tests/pool_table.rs
+++ b/tabled/tests/pool_table.rs
@@ -210,6 +210,41 @@ test_table!(
     "└─────┴────────────────────┴──────┘"
 );
 
+test_table!(
+    pool_table_example,
+    {
+        let data = vec![
+            vec!["Hello World", "Hello World", "Hello World"],
+            vec!["Hello", "", "Hello"],
+            vec!["W", "o", "r", "l", "d"],
+        ];
+
+        let data = TableValue::Column(
+            data.into_iter()
+                .map(|row| {
+                    TableValue::Row(
+                        row.into_iter()
+                            .map(|text| TableValue::Cell(text.to_owned()))
+                            .collect(),
+                    )
+                })
+                .collect(),
+        );
+
+        PoolTable::from(data)
+            .with(Style::modern())
+            .with(Alignment::center())
+            .to_string()
+    },
+    "┌─────────────┬─────────────┬─────────────┐"
+    "│ Hello World │ Hello World │ Hello World │"
+    "├─────────────┴──┬─────────┬┴─────────────┤"
+    "│     Hello      │         │    Hello     │"
+    "├─────────┬──────┴┬───────┬┴──────┬───────┤"
+    "│    W    │   o   │   r   │   l   │   d   │"
+    "└─────────┴───────┴───────┴───────┴───────┘"
+);
+
 test_table!(
     pool_table_value_empty_row,
     PoolTable::from(TableValue::Row(vec![]))
@@ -394,3 +429,32 @@ test_table!(
     "|      |  3                      |      |"
     "+------+-------------------------+------+"
 );
+
+test_table!(
+    pool_table_style_empty,
+    PoolTable::new(create_matrix::<3, 3>()).with(Style::empty()),
+    " 0-0  0-1  0-2 "
+    " 1-0  1-1  1-2 "
+    " 2-0  2-1  2-2 "
+);
+
+test_table!(
+    pool_table_style_markdown,
+    PoolTable::new(create_matrix::<3, 3>()).with(Style::markdown()),
+    "| 0-0 | 0-1 | 0-2 |"
+    "| 1-0 | 1-1 | 1-2 |"
+    "| 2-0 | 2-1 | 2-2 |"
+    "|----- ----- -----|"
+);
+
+test_table!(
+    pool_table_style_rounded,
+    PoolTable::new(create_matrix::<3, 3>()).with(Style::rounded()),
+    "╭─────┬─────┬─────╮"
+    "│ 0-0 │ 0-1 │ 0-2 │"
+    " ───── ───── ───── "
+    "│ 1-0 │ 1-1 │ 1-2 │"
+    " ───── ───── ───── "
+    "│ 2-0 │ 2-1 │ 2-2 │"
+    "├─────┴─────┴─────┤"
+);
diff --git a/tabled/tests/style_test.rs b/tabled/tests/style_test.rs
index d416efb..36db111 100644
--- a/tabled/tests/style_test.rs
+++ b/tabled/tests/style_test.rs
@@ -2160,10 +2160,9 @@ fn style_with_color_test() {
 
 test_table!(
     empty_line_clears_lines,
-    create_table::<3, 3>().with(Style::rounded().horizontals(vec![HorizontalLine::new(1, Line::empty())])),
+    create_table::<3, 3>().with(Style::rounded().remove_horizontals()),
     "╭───┬──────────┬──────────┬──────────╮"
     "│ N │ column 0 │ column 1 │ column 2 │"
-    "                                      "
     "│ 0 │   0-0    │   0-1    │   0-2    │"
     "│ 1 │   1-0    │   1-1    │   1-2    │"
     "│ 2 │   2-0    │   2-1    │   2-2    │"
@@ -2172,7 +2171,7 @@ test_table!(
 
 test_table!(
     empty_line_clears_lines_1,
-    create_table::<3, 3>().with(Style::rounded().horizontals(vec![HorizontalLine::empty(1)])),
+    create_table::<3, 3>().with(Style::rounded().remove_horizontals()),
     "╭───┬──────────┬──────────┬──────────╮"
     "│ N │ column 0 │ column 1 │ column 2 │"
     "│ 0 │   0-0    │   0-1    │   0-2    │"
@@ -2265,22 +2264,6 @@ test_table!(
     "2---2----------2----------2----------2"
 );
 
-test_table!(
-    verticals_5,
-    create_table::<3, 3>()
-        .with(Style::ascii().verticals((0..10).map(|i| VerticalLine::new(i, Line::new(Some('*'), Some('x'), Some('c'), Some('2'))))))
-        .with(Style::ascii().verticals((0..10).map(VerticalLine::empty))),
-    "+---+----------+----------+----------+"
-    "| N | column 0 | column 1 | column 2 |"
-    "+---+----------+----------+----------+"
-    "| 0 |   0-0    |   0-1    |   0-2    |"
-    "+---+----------+----------+----------+"
-    "| 1 |   1-0    |   1-1    |   1-2    |"
-    "+---+----------+----------+----------+"
-    "| 2 |   2-0    |   2-1    |   2-2    |"
-    "+---+----------+----------+----------+"
-);
-
 test_table!(
     vertical_line_0,
     create_table::<3, 3>()
@@ -2611,3 +2594,9 @@ test_table!(
     "|     ! |xxxx"
     "+-------+xxxx"
 );
+
+test_table!(
+    table_style_no_bottom_no_new_line,
+    create_table::<0, 0>().with(Style::markdown().remove_horizontals()),
+    "| N |"
+);