From 0e6afa3050d7fd3773f9f33a6cf280553e5d07da Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Wed, 28 Jul 2021 09:58:45 +0200 Subject: [PATCH 1/3] Corrected changelog for real release --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a26699e57..c30430366a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ -## [2.1.1] - July 27, 2021: +## [2.1.1] - July 28, 2021: +* Stable release with all 2.1.1-preview.X changes + +## [2.1.1-preview.0] - July 27, 2021: * Improves hr tag support * Fixes a leading whitespace issue * Fixes some crashes with CSS parsing From b6c045eed7fb0137b3feb23b3dbf1641ec85b993 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Wed, 1 Sep 2021 15:34:32 +0200 Subject: [PATCH 2/3] Support exactly-specified widths and height from css --- example/lib/main.dart | 22 +++++++++------------- lib/src/css_parser.dart | 6 ++++++ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index e303346363..4c88cd07f5 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -61,17 +61,13 @@ const htmlData = r"""

Famous quote...

- - - - - +
- + @@ -268,13 +264,13 @@ class _MyHomePageState extends State { 'h5': Style(maxLines: 2, textOverflow: TextOverflow.ellipsis), }, customRender: { - "table": (context, child) { - return SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: - (context.tree as TableLayoutElement).toWidget(context), - ); - }, + // "table": (context, child) { + // return SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: + // (context.tree as TableLayoutElement).toWidget(context), + // ); + // }, "bird": (RenderContext context, Widget child) { return TextSpan(text: "🐦"); }, diff --git a/lib/src/css_parser.dart b/lib/src/css_parser.dart index 261a09ba27..94ce32012f 100644 --- a/lib/src/css_parser.dart +++ b/lib/src/css_parser.dart @@ -194,6 +194,9 @@ Style declarationsToStyle(Map> declarations) { case 'font-weight': style.fontWeight = ExpressionMapping.expressionToFontWeight(value.first); break; + case 'height': + style.height = ExpressionMapping.expressionToPaddingLength(value.first) ?? style.height; + break; case 'list-style-type': if (value.first is css.LiteralTerm) { style.listStyleType = ExpressionMapping.expressionToListStyleType(value.first as css.LiteralTerm) ?? style.listStyleType; @@ -298,6 +301,9 @@ Style declarationsToStyle(Map> declarations) { case 'text-shadow': style.textShadow = ExpressionMapping.expressionToTextShadow(value); break; + case 'width': + style.width = ExpressionMapping.expressionToPaddingLength(value.first) ?? style.width; + break; } } }); From b878184ed6ec269f04fe51c5aeb1a8fed8cf50cd Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Wed, 1 Sep 2021 15:45:40 +0200 Subject: [PATCH 3/3] Revert example changes from "Support exactly-specified widths and height from css" --- example/lib/main.dart | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 4c88cd07f5..e303346363 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -61,13 +61,17 @@ const htmlData = r"""

Famous quote...

-
OneTwoThree
Rowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspanDataDataRowspanDataData
Google
+
+ + + + - + @@ -264,13 +268,13 @@ class _MyHomePageState extends State { 'h5': Style(maxLines: 2, textOverflow: TextOverflow.ellipsis), }, customRender: { - // "table": (context, child) { - // return SingleChildScrollView( - // scrollDirection: Axis.horizontal, - // child: - // (context.tree as TableLayoutElement).toWidget(context), - // ); - // }, + "table": (context, child) { + return SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: + (context.tree as TableLayoutElement).toWidget(context), + ); + }, "bird": (RenderContext context, Widget child) { return TextSpan(text: "🐦"); },
OneTwoThree
RowspanDataDataRowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspan\nRowspanDataData
Google