%
% API Documentation for cssutils
% Module cssutils.css.cssmediarule
%
% Generated by epydoc 3.0.1
% [Fri Feb 01 19:05:21 2008]
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                          Module Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.cssmediarule \textit{(module)}|(}
\section{Module cssutils.css.cssmediarule}

    \label{cssutils:css:cssmediarule}

CSSMediaRule implements DOM Level 2 CSS CSSMediaRule.
\textbf{Version:} \$LastChangedRevision: 950 \$



\textbf{Date:} \$LastChangedDate: 2008-01-27 17:28:41 +0100 (So, 27 Jan 2008) \$



\textbf{Author:} \$LastChangedBy: cthedot \$




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.cssmediarule \textit{(module)}!cssutils.css.cssmediarule.CSSMediaRule \textit{(class)}|(}
\subsection{Class CSSMediaRule}

    \label{cssutils:css:cssmediarule:CSSMediaRule}
\begin{tabular}{cccccccccc}
% Line for object, linespec=[False, False, False]
\multicolumn{2}{r}{\settowidth{\BCL}{object}\multirow{2}{\BCL}{object}}
&&
&&
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
&&
&&
  \\
% Line for cssutils.util.Base, linespec=[False, False]
\multicolumn{4}{r}{\settowidth{\BCL}{cssutils.util.Base}\multirow{2}{\BCL}{cssutils.util.Base}}
&&
&&
  \\\cline{5-5}
  &&&&\multicolumn{1}{c|}{}
&&
&&
  \\
% Line for cssutils.css.cssrule.CSSRule, linespec=[False]
\multicolumn{6}{r}{\settowidth{\BCL}{cssutils.css.cssrule.CSSRule}\multirow{2}{\BCL}{cssutils.css.cssrule.CSSRule}}
&&
  \\\cline{7-7}
  &&&&&&\multicolumn{1}{c|}{}
&&
  \\
&&&&&&\multicolumn{2}{l}{\textbf{cssutils.css.cssmediarule.CSSMediaRule}}
\end{tabular}


Objects implementing the CSSMediaRule interface can be identified by the
MEDIA{\_}RULE constant. On these objects the type attribute must return the
value of that constant.


%___________________________________________________________________________

\hypertarget{properties}{}
\pdfbookmark[3]{Properties}{properties}
\paragraph*{Properties}
\label{properties}
\begin{description}
\item[{cssRules: A css::CSSRuleList of all CSS rules contained within the}] \leavevmode 
media block.

\item[{media: of type stylesheets::MediaList, (DOM readonly)}] \leavevmode 
A list of media types for this rule of type MediaList.

\item[{inherited from CSSRule}] \leavevmode 
cssText

\end{description}


%___________________________________________________________________________

\hypertarget{cssutils-only}{}
\pdfbookmark[4]{cssutils only}{cssutils-only}
\subparagraph*{cssutils only}
\label{cssutils-only}
\begin{description}
\item[{atkeyword:}] \leavevmode 
the literal keyword used

\end{description}


%___________________________________________________________________________

\hypertarget{format}{}
\pdfbookmark[3]{Format}{format}
\paragraph*{Format}
\label{format}
\begin{description}
\item[{media}] \leavevmode 
: MEDIA{\_}SYM S* medium {[} COMMA S* medium {]}* LBRACE S* ruleset* '{\}}' S*;

\end{description}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self}, \textit{mediaText}={\tt \texttt{'}\texttt{all}\texttt{'}}, \textit{parentRule}={\tt None}, \textit{parentStyleSheet}={\tt None}, \textit{readonly}={\tt False})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

constructor
\setlength{\parskip}{1ex}
      Overrides: object.\_\_init\_\_

    \end{boxedminipage}

    \label{cssutils:css:cssmediarule:CSSMediaRule:__iter__}
    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.cssmediarule \textit{(module)}!cssutils.css.cssmediarule.CSSMediaRule \textit{(class)}!cssutils.css.cssmediarule.CSSMediaRule.\_\_iter\_\_ \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_iter\_\_}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

generator which iterates over cssRules.
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{cssutils:css:cssmediarule:CSSMediaRule:deleteRule}
    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.cssmediarule \textit{(module)}!cssutils.css.cssmediarule.CSSMediaRule \textit{(class)}!cssutils.css.cssmediarule.CSSMediaRule.deleteRule \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{deleteRule}(\textit{self}, \textit{index})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
\begin{description}
\item[{index}] \leavevmode 
within the media block's rule collection of the rule to remove.

\end{description}

Used to delete a rule from the media block.

DOMExceptions
\begin{itemize}
\item {} 
INDEX{\_}SIZE{\_}ERR: (self)
Raised if the specified index does not correspond to a rule in
the media rule list.

\item {} 
NO{\_}MODIFICATION{\_}ALLOWED{\_}ERR: (self)
Raised if this media rule is readonly.

\end{itemize}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{cssutils:css:cssmediarule:CSSMediaRule:add}
    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.cssmediarule \textit{(module)}!cssutils.css.cssmediarule.CSSMediaRule \textit{(class)}!cssutils.css.cssmediarule.CSSMediaRule.add \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{add}(\textit{self}, \textit{rule})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

Adds rule to end of this mediarule. Same as \texttt{.insertRule(rule)}.
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{cssutils:css:cssmediarule:CSSMediaRule:insertRule}
    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.cssmediarule \textit{(module)}!cssutils.css.cssmediarule.CSSMediaRule \textit{(class)}!cssutils.css.cssmediarule.CSSMediaRule.insertRule \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{insertRule}(\textit{self}, \textit{rule}, \textit{index}={\tt None})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
\begin{description}
\item[{rule}] \leavevmode 
The parsable text representing the rule. For rule sets this
contains both the selector and the style declaration. For
at-rules, this specifies both the at-identifier and the rule
content.

cssutils also allows rule to be a valid \textbf{CSSRule} object

\item[{index}] \leavevmode 
within the media block's rule collection of the rule before
which to insert the specified rule. If the specified index is
equal to the length of the media blocks's rule collection, the
rule will be added to the end of the media block.
If index is not given or None rule will be appended to rule
list.

\end{description}

Used to insert a new rule into the media block.

DOMException on setting
\begin{itemize}
\item {} 
HIERARCHY{\_}REQUEST{\_}ERR:
(no use case yet as no @charset or @import allowed))
Raised if the rule cannot be inserted at the specified index,
e.g., if an @import rule is inserted after a standard rule set
or other at-rule.

\item {} 
INDEX{\_}SIZE{\_}ERR: (self)
Raised if the specified index is not a valid insertion point.

\item {} 
NO{\_}MODIFICATION{\_}ALLOWED{\_}ERR: (self)
Raised if this media rule is readonly.

\item {} 
SYNTAX{\_}ERR: (CSSStyleRule)
Raised if the specified rule has a syntax error and is
unparsable.

\end{itemize}

returns the index within the media block's rule collection of the
newly inserted rule.
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_repr\_\_}(\textit{self})

\setlength{\parskip}{2ex}
    repr(x)

\setlength{\parskip}{1ex}
      Overrides: object.\_\_repr\_\_ 	extit{(inherited documentation)}

    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_str\_\_}(\textit{self})

\setlength{\parskip}{2ex}
    str(x)

\setlength{\parskip}{1ex}
      Overrides: object.\_\_str\_\_ 	extit{(inherited documentation)}

    \end{boxedminipage}


\large{\textbf{\textit{Inherited from object}}}

\begin{quote}
\_\_delattr\_\_(), \_\_getattribute\_\_(), \_\_hash\_\_(), \_\_new\_\_(), \_\_reduce\_\_(), \_\_reduce\_ex\_\_(), \_\_setattr\_\_()
\end{quote}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                              Properties                               %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Properties}

    \vspace{-1cm}
\hspace{\varindent}\begin{longtable}{|p{\varnamewidth}|p{\vardescrwidth}|l}
\cline{1-2}
\cline{1-2} \centering \textbf{Name} & \centering \textbf{Description}& \\
\cline{1-2}
\endhead\cline{1-2}\multicolumn{3}{r}{\small\textit{continued on next page}}\\\endfoot\cline{1-2}
\endlastfoot\raggedright c\-s\-s\-T\-e\-x\-t\- & \raggedright (DOM attribute) The parsable textual representation.&\\
\cline{1-2}
\raggedright m\-e\-d\-i\-a\- & \raggedright (DOM readonly) A list of media types for this rule of type            MediaList&\\
\cline{1-2}
\multicolumn{2}{|l|}{\textit{Inherited from cssutils.css.cssrule.CSSRule \textit{(Section \ref{cssutils:css:cssrule:CSSRule})}}}\\
\multicolumn{2}{|p{\varwidth}|}{\raggedright parentRule, parentStyleSheet, typeString}\\
\cline{1-2}
\multicolumn{2}{|l|}{\textit{Inherited from object}}\\
\multicolumn{2}{|p{\varwidth}|}{\raggedright \_\_class\_\_}\\
\cline{1-2}
\end{longtable}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                            Class Variables                            %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Class Variables}

    \vspace{-1cm}
\hspace{\varindent}\begin{longtable}{|p{\varnamewidth}|p{\vardescrwidth}|l}
\cline{1-2}
\cline{1-2} \centering \textbf{Name} & \centering \textbf{Description}& \\
\cline{1-2}
\endhead\cline{1-2}\multicolumn{3}{r}{\small\textit{continued on next page}}\\\endfoot\cline{1-2}
\endlastfoot\raggedright t\-y\-p\-e\- & \raggedright The type of this rule, as defined by a CSSRule type constant.
Overwritten in derived classes.

The expectation is that binding-specific casting methods can be used to
cast down from an instance of the CSSRule interface to the specific
derived interface implied by the type.
(Casting not for this Python implementation I guess...)

\textbf{Value:} 
{\tt 4}&\\
\cline{1-2}
\multicolumn{2}{|l|}{\textit{Inherited from cssutils.css.cssrule.CSSRule \textit{(Section \ref{cssutils:css:cssrule:CSSRule})}}}\\
\multicolumn{2}{|p{\varwidth}|}{\raggedright CHARSET\_RULE, COMMENT, FONT\_FACE\_RULE, IMPORT\_RULE, MEDIA\_RULE, NAMESPACE\_RULE, PAGE\_RULE, STYLE\_RULE, UNKNOWN\_RULE}\\
\cline{1-2}
\end{longtable}

    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.cssmediarule \textit{(module)}!cssutils.css.cssmediarule.CSSMediaRule \textit{(class)}|)}
    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.cssmediarule \textit{(module)}|)}
