flutter_widget_from_html icon indicating copy to clipboard operation
flutter_widget_from_html copied to clipboard

Add support for `STYLE` tag

Open daohoangson opened this issue 4 years ago • 4 comments

  • [ ] Add support for STYLE tag: parsing & element matching
  • [ ] Replace customStylesBuilder implementation to use a custom class instead of Map<String, String>

daohoangson avatar May 30 '21 09:05 daohoangson

The matches method is needed but an internal import is required... Which is not ideal.

import 'package:html/src/query_selector.dart';

daohoangson avatar May 30 '21 10:05 daohoangson

Has there been any progress made on supporting style tags or inline styling? Even if just the most basic CSS was supported, that would be a huge help and cut out the need for a lot of styling via the customStylesBuilder.

Any updates would be greatly appreciated, thanks!

jlemanski1 avatar Jan 05 '23 23:01 jlemanski1

You can use a limited set of CSS statements in inline styling. STYLE tag support is not there yet.

Check this list https://github.com/daohoangson/flutter_widget_from_html/tree/master/packages/core#inline-stylings

daohoangson avatar Jan 06 '23 00:01 daohoangson

Thanks, I was having issues which the display CSS property in an inline style. I was able to accomplish what I needed by using the customStylesBuilder to remove the style attribute and return the styling I needed.

jlemanski1 avatar Jan 06 '23 03:01 jlemanski1