flutter_html_css_border_radius 0.2.0 copy "flutter_html_css_border_radius: ^0.2.0" to clipboard
flutter_html_css_border_radius: ^0.2.0 copied to clipboard

A flutter_html extension that renders the CSS border-radius properties, including the per-corner and logical corner longhands.

0.2.0 #

  • Renamed from flutter_html_css_border_radius_extension on pub.flutter-io.cn. The old package stays published and is marked discontinued with this one as its replacement. Class names are unchanged.

0.1.2 #

  • em and rem no longer multiply by a hard-coded 16. em now uses the element's own computed font size and rem the new rootFontSize argument, which defaults to flutter_html's root font size of 14. The border width and the margin are still read at the preStyling step, but only the raw declaration travels from there: both are now resolved at the building step, where flutter_html has already turned a relative font size into pixels. Sizes change for anyone already shipping these units. A border-radius: 0.5rem was 8 px and is now 7 px, and 0.5em on an element rendering at 20 px was 8 px and is now 10 px.
  • kFlutterHtmlDefaultFontSize is not exported. It was only ever in the working tree, so nothing shipped with it and there is nothing to deprecate. Four packages in the family declared the same value under that name, which made importing any two of them an ambiguous import. The fallback basis is now a library-private constant. If you want the root font size as a symbol, use kFlutterHtmlRootFontSize from flutter_html_css_font_size, or FontSize.medium.value from flutter_html itself.
  • The README moved to the family style: the silent-failure caveat is in the opening paragraph, the registration-order trap and wrapIfHasAnyClass are under one "Before you register it" heading with the working arrangement shown as code, and Limitations is explicit that a rounded element still needs a renderer for its tag.
  • Added .pubignore. It is a verbatim copy of .gitignore plus doc/ (empty today, reserved for long-form notes), because .pubignore replaces .gitignore rather than extending it, and a short one let build/ into an archive once.

0.1.1 #

  • extraTags is deprecated: it has no effect, and never had. [matches] is style-driven, so an element carrying border-radius in its inline style is handled whatever its tag; and flutter_html 3.0.0 consults an extension's supportedTags in exactly one place, the base class's default matches, which this class overrides entirely. It will be removed in 1.0.0.
  • The "Non-standard tags" section of example/example.md was wrong. It implied passing extraTags: {'v-card'} made a <v-card> render with rounded corners. It does not: with no built-in renderer for that tag, prepareFromExtension yields an EmptyContentElement and the element renders nothing at all, not merely nothing rounded. Measured, with and without the argument, in both cases. The section now shows the TagExtension that actually makes it work.
  • The advice to list this extension after a utility-class extension stays, but the reason given for it was wrong, and wrapIfHasAnyClass was under-explained. flutter_html prepares the element tree before any extension expands a class into style="", so this extension wraps every classed element speculatively and reads the radius at build time; that is what wrapIfHasAnyClass is for, and setting it to false loses class-driven rounding in either order. Listing this extension last is a separate matter: both extensions run at the preStyling step in registration order, and listed first this one cannot extract border and margin, so a bordered element renders a square border around a rounded clip. Measured, and documented in the README, the example, and the field's dartdoc.

0.1.0 #

  • Initial release: adds a flutter_html extension that applies border-radius (shorthand, per-corner, and logical corner properties) from an element's inline style, preserving borders and margins.
0
likes
160
points
73
downloads

Documentation

API reference

Publisher

verified publisherchaosworld.cc

Weekly Downloads

A flutter_html extension that renders the CSS border-radius properties, including the per-corner and logical corner longhands.

Repository (GitLab)
View/report issues
Contributing

Topics

#flutter-html #css #html #extension #border-radius

License

MPL-2.0 (license)

Dependencies

flutter, flutter_html, html

More

Packages that depend on flutter_html_css_border_radius