style function

Element style(
  1. String css, {
  2. String? media,
  3. String? nonce,
  4. String? id,
  5. String? classes,
  6. Map<String, Object?> attributes = const {},
})

An inline <style> with css; a </style in it is defused (see RawTextNode). nonce is the request's Content-Security-Policy nonce.

Implementation

Element style(
  String css, {
  String? media,
  String? nonce,
  String? id,
  String? classes,
  Map<String, Object?> attributes = const {},
}) => _tag(
  'style',
  [RawTextNode(css, tag: 'style')],
  id,
  classes,
  {'media': media, 'nonce': nonce, ...attributes},
);