flutter_html_css_border_radius 0.2.0
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_extensionon 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 #
emandremno longer multiply by a hard-coded 16.emnow uses the element's own computed font size andremthe newrootFontSizeargument, which defaults toflutter_html's root font size of 14. The border width and the margin are still read at thepreStylingstep, but only the raw declaration travels from there: both are now resolved at thebuildingstep, whereflutter_htmlhas already turned a relative font size into pixels. Sizes change for anyone already shipping these units. Aborder-radius: 0.5remwas 8 px and is now 7 px, and0.5emon an element rendering at 20 px was 8 px and is now 10 px.kFlutterHtmlDefaultFontSizeis 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, usekFlutterHtmlRootFontSizefromflutter_html_css_font_size, orFontSize.medium.valuefromflutter_htmlitself.- The README moved to the family style: the
silent-failure caveat is in the opening paragraph, the registration-order trap
and
wrapIfHasAnyClassare 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.gitignoreplusdoc/(empty today, reserved for long-form notes), because.pubignorereplaces.gitignorerather than extending it, and a short one letbuild/into an archive once.
0.1.1 #
extraTagsis deprecated: it has no effect, and never had. [matches] is style-driven, so an element carryingborder-radiusin its inline style is handled whatever its tag; andflutter_html3.0.0 consults an extension'ssupportedTagsin exactly one place, the base class's defaultmatches, which this class overrides entirely. It will be removed in 1.0.0.- The "Non-standard tags" section of
example/example.mdwas wrong. It implied passingextraTags: {'v-card'}made a<v-card>render with rounded corners. It does not: with no built-in renderer for that tag,prepareFromExtensionyields anEmptyContentElementand the element renders nothing at all, not merely nothing rounded. Measured, with and without the argument, in both cases. The section now shows theTagExtensionthat 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
wrapIfHasAnyClasswas under-explained.flutter_htmlprepares the element tree before any extension expands a class intostyle="", so this extension wraps every classed element speculatively and reads the radius at build time; that is whatwrapIfHasAnyClassis for, and setting it tofalseloses class-driven rounding in either order. Listing this extension last is a separate matter: both extensions run at thepreStylingstep in registration order, and listed first this one cannot extractborderandmargin, 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_htmlextension that appliesborder-radius(shorthand, per-corner, and logical corner properties) from an element's inline style, preserving borders and margins.