GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CSS::DOM::Rule::Media(3) User Contributed Perl Documentation CSS::DOM::Rule::Media(3)

CSS::DOM::Rule::Media - CSS @media rule class for CSS::DOM

Version 0.17

  use CSS::DOM;
  my $media_rule = CSS::DOM->parse(
      '@media print { body { background: none } }'
  )->cssRules->[0];

  # OR:
  use CSS::DOM::Rule::Media;
  my $media_rule = new CSS::DOM::Rule::Media $parent;
  push @{$media_rule->media}, 'print';
  $media_rule->insertRule('body { background: none }')

This module implements CSS @media rules for CSS::DOM. It inherits from CSS::DOM::Rule and implements the CSSMediaRule DOM interface.

media
Returns the MediaList associated with the @media rule (or a plain list in list context). This defaults to an empty list. You can pass a comma-delimited string to the MediaList's "mediaText" method to set it.
cssRules
In scalar context, this returns a CSS::DOM::RuleList object (simply a blessed array reference) of CSS::DOM::Rule objects. In list context it returns a list.
insertRule ( $css_code, $index )
Parses the rule contained in the $css_code, inserting it the @media rule's list of subrules at the given $index.
deleteRule ( $index )
Deletes the rule at the given $index.

CSS::DOM

CSS::DOM::Rule

CSS::DOM::MediaList

2018-01-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.