@@ -202,7 +202,6 @@ def block_text(
202202 column (
203203 mjml_text (content = html , attributes = {"align" : align }),
204204 ),
205- # attributes={"padding": "0px"},
206205 )
207206
208207 return Block (mjml_section )
@@ -248,7 +247,6 @@ def block_title(
248247 attributes = {"align" : align },
249248 )
250249 ),
251- # attributes={"padding": "0px"},
252250 )
253251
254252 return Block (mjml_section )
@@ -285,7 +283,6 @@ def block_spacer(height: str = "20px") -> Block:
285283 column (
286284 mjml_spacer (attributes = {"height" : height }),
287285 ),
288- # attributes={"padding": "0px"},
289286 )
290287
291288 return Block (mjml_section )
@@ -354,32 +351,26 @@ def block_image(
354351 - Images from local files are converted to inline attachments with CID references
355352 during email processing by mjml_to_email().
356353 - If `float` is not "none", it takes precedence and overrides `align`.
357- """
358- # Convert integer width to CSS string
354+ """
359355 if isinstance (width , int ):
360356 width_str = f"{ width } px"
361357 else :
362358 width_str = width
363359
364- # Determine alignment style based on float and align parameters
365360 align_style = ""
366361
367- # Float takes precedence if not "none"
368362 if float != "none" :
369363 align_style = f"float: { float } ;"
370364 else :
371- # Use align parameter if float is "none"
372365 if align == "center" :
373366 align_style = "display: block; margin: 0 auto;"
374367 elif align == "left" :
375368 align_style = "display: block; margin: 0;"
376369 elif align == "right" :
377370 align_style = "display: block; margin: 0 0 0 auto;"
378- # "inline" has no special style
379371
380372 # Detect URL vs local file
381373 if _is_url (file ):
382- # For URLs, use as-is
383374 src = file
384375 else :
385376 # For local files, read as bytes for processing by _process_mjml_images
0 commit comments