css_inline 0.19.1 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "css-inline-ruby"
3
- version = "0.19.1"
3
+ version = "0.20.1"
4
4
  authors = ["Dmitry Dygalo <dmitry@dygalo.dev>"]
5
5
  edition = "2024"
6
6
  readme = "README.rdoc"
@@ -20,6 +20,6 @@ magnus = "0.8"
20
20
  rayon = "1"
21
21
 
22
22
  [dependencies.css-inline]
23
- version = "0.19.1"
23
+ version = "0.20.1"
24
24
  default-features = false
25
25
  features = ["http", "file", "stylesheet-cache"]
@@ -69,6 +69,10 @@ struct Options {
69
69
  preallocate_node_capacity: Option<usize>,
70
70
  /// Remove selectors that were successfully inlined from inline `<style>` blocks.
71
71
  remove_inlined_selectors: Option<bool>,
72
+ /// Apply `width` HTML attributes from CSS `width` properties on supported elements.
73
+ apply_width_attributes: Option<bool>,
74
+ /// Apply `height` HTML attributes from CSS `height` properties on supported elements.
75
+ apply_height_attributes: Option<bool>,
72
76
  }
73
77
 
74
78
  impl TryConvert for Options {
@@ -90,6 +94,10 @@ impl TryConvert for Options {
90
94
  .aref::<_, Option<usize>>(ruby.to_symbol("preallocate_node_capacity"))?,
91
95
  remove_inlined_selectors: h
92
96
  .aref::<_, Option<bool>>(ruby.to_symbol("remove_inlined_selectors"))?,
97
+ apply_width_attributes: h
98
+ .aref::<_, Option<bool>>(ruby.to_symbol("apply_width_attributes"))?,
99
+ apply_height_attributes: h
100
+ .aref::<_, Option<bool>>(ruby.to_symbol("apply_height_attributes"))?,
93
101
  })
94
102
  }
95
103
  }
@@ -113,6 +121,8 @@ fn parse_options<Req>(
113
121
  preallocate_node_capacity: kwargs.preallocate_node_capacity.unwrap_or(32),
114
122
  resolver: Arc::new(rust_inline::DefaultStylesheetResolver),
115
123
  remove_inlined_selectors: kwargs.remove_inlined_selectors.unwrap_or(false),
124
+ apply_width_attributes: kwargs.apply_width_attributes.unwrap_or(false),
125
+ apply_height_attributes: kwargs.apply_height_attributes.unwrap_or(false),
116
126
  })
117
127
  }
118
128
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css_inline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Dygalo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-23 00:00:00.000000000 Z
11
+ date: 2026-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys