%
% API Documentation for cssutils
% Module cssutils.css.selector
%
% 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.selector \textit{(module)}|(}
\section{Module cssutils.css.selector}

    \label{cssutils:css:selector}

Selector is a single Selector of a CSSStyleRule SelectorList.
\begin{description}
\item[{Partly implements}] \leavevmode 
\href{http://www.w3.org/TR/css3-selectors/}{http://www.w3.org/TR/css3-selectors/}

\item[{TODO}] \leavevmode \begin{itemize}
\item {} 
.contains(selector)

\item {} 
.isSubselector(selector)

\end{itemize}

\end{description}
\textbf{Version:} \$LastChangedRevision: 953 \$



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



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




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

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

    \label{cssutils:css:selector:Selector}
\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.util.Base2, linespec=[False]
\multicolumn{6}{r}{\settowidth{\BCL}{cssutils.util.Base2}\multirow{2}{\BCL}{cssutils.util.Base2}}
&&
  \\\cline{7-7}
  &&&&&&\multicolumn{1}{c|}{}
&&
  \\
&&&&&&\multicolumn{2}{l}{\textbf{cssutils.css.selector.Selector}}
\end{tabular}


(cssutils) a single selector in a SelectorList of a CSSStyleRule


%___________________________________________________________________________

\hypertarget{properties}{}
\pdfbookmark[3]{Properties}{properties}
\paragraph*{Properties}
\label{properties}
\begin{description}
\item[{element}] \leavevmode 
Effective element target of this selector

\item[{parentList: of type SelectorList, readonly}] \leavevmode 
The SelectorList that contains this selector or None if this
Selector is not attached to a SelectorList.

\item[{selectorText}] \leavevmode 
textual representation of this Selector

\item[{seq}] \leavevmode 
sequence of Selector parts including comments

\item[{specificity (READONLY)}] \leavevmode 
tuple of (a, b, c, d) where:
\begin{description}
\item[{a}] \leavevmode 
presence of style in document, always 0 if not used on a document

\item[{b}] \leavevmode 
number of ID selectors

\item[{c}] \leavevmode 
number of .class selectors

\item[{d}] \leavevmode 
number of Element (type) selectors

\end{description}

\item[{wellformed}] \leavevmode 
if this selector is wellformed regarding the Selector spec

\end{description}


%___________________________________________________________________________

\hypertarget{format}{}
\pdfbookmark[3]{Format}{format}
\paragraph*{Format}
\label{format}
\begin{quote}{\ttfamily \raggedright \noindent
{\#}~implemented~in~SelectorList~\\
selectors{\_}group~\\
~~:~selector~{[}~COMMA~S*~selector~{]}*~\\
~~;~\\
~\\
selector~\\
~~:~simple{\_}selector{\_}sequence~{[}~combinator~simple{\_}selector{\_}sequence~{]}*~\\
~~;~\\
~\\
combinator~\\
~~/*~combinators~can~be~surrounded~by~white~space~*/~\\
~~:~PLUS~S*~|~GREATER~S*~|~TILDE~S*~|~S+~\\
~~;~\\
~\\
simple{\_}selector{\_}sequence~\\
~~:~{[}~type{\_}selector~|~universal~{]}~\\
~~~~{[}~HASH~|~class~|~attrib~|~pseudo~|~negation~{]}*~\\
~~|~{[}~HASH~|~class~|~attrib~|~pseudo~|~negation~{]}+~\\
~~;~\\
~\\
type{\_}selector~\\
~~:~{[}~namespace{\_}prefix~{]}?~element{\_}name~\\
~~;~\\
~\\
namespace{\_}prefix~\\
~~:~{[}~IDENT~|~'*'~{]}?~'|'~\\
~~;~\\
~\\
element{\_}name~\\
~~:~IDENT~\\
~~;~\\
~\\
universal~\\
~~:~{[}~namespace{\_}prefix~{]}?~'*'~\\
~~;~\\
~\\
class~\\
~~:~'.'~IDENT~\\
~~;~\\
~\\
attrib~\\
~~:~'{[}'~S*~{[}~namespace{\_}prefix~{]}?~IDENT~S*~\\
~~~~~~~~{[}~{[}~PREFIXMATCH~|~\\
~~~~~~~~~~~~SUFFIXMATCH~|~\\
~~~~~~~~~~~~SUBSTRINGMATCH~|~\\
~~~~~~~~~~~~'='~|~\\
~~~~~~~~~~~~INCLUDES~|~\\
~~~~~~~~~~~~DASHMATCH~{]}~S*~{[}~IDENT~|~STRING~{]}~S*~\\
~~~~~~~~{]}?~'{]}'~\\
~~;~\\
~\\
pseudo~\\
~~/*~'::'~starts~a~pseudo-element,~':'~a~pseudo-class~*/~\\
~~/*~Exceptions:~:first-line,~:first-letter,~:before~and~:after.~*/~\\
~~/*~Note~that~pseudo-elements~are~restricted~to~one~per~selector~and~*/~\\
~~/*~occur~only~in~the~last~simple{\_}selector{\_}sequence.~*/~\\
~~:~':'~':'?~{[}~IDENT~|~functional{\_}pseudo~{]}~\\
~~;~\\
~\\
functional{\_}pseudo~\\
~~:~FUNCTION~S*~expression~')'~\\
~~;~\\
~\\
expression~\\
~~/*~In~CSS3,~the~expressions~are~identifiers,~strings,~*/~\\
~~/*~or~of~the~form~"an+b"~*/~\\
~~:~{[}~{[}~PLUS~|~'-'~|~DIMENSION~|~NUMBER~|~STRING~|~IDENT~{]}~S*~{]}+~\\
~~;~\\
~\\
negation~\\
~~:~NOT~S*~negation{\_}arg~S*~')'~\\
~~;~\\
~\\
negation{\_}arg~\\
~~:~type{\_}selector~|~universal~|~HASH~|~class~|~attrib~|~pseudo~\\
~~;
}\end{quote}

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

  \subsubsection{Methods}

    \vspace{0.5ex}

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

    \raggedright \textbf{\_\_init\_\_}(\textit{self}, \textit{selectorText}={\tt None}, \textit{parentList}={\tt None}, \textit{readonly}={\tt False})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    x.\_\_init\_\_(...) initializes x; see x.\_\_class\_\_.\_\_doc\_\_ for 
    signature

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxxxxxx}

          \item[selectorText]


initial value of this selector
          \item[parentList]


a SelectorList
          \item[readonly]


default to False
        \end{Ventry}

      \end{quote}

      Overrides: object.\_\_init\_\_

    \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 e\-l\-e\-m\-e\-n\-t\- & \raggedright Effective element target of this selector.&\\
\cline{1-2}
\raggedright p\-a\-r\-e\-n\-t\-L\-i\-s\-t\- & \raggedright (DOM) The SelectorList that contains this Selector or        None if this Selector is not attached to a SelectorList.&\\
\cline{1-2}
\raggedright s\-e\-l\-e\-c\-t\-o\-r\-T\-e\-x\-t\- & \raggedright (DOM) The parsable textual representation of the selector.&\\
\cline{1-2}
\raggedright s\-p\-e\-c\-i\-f\-i\-c\-i\-t\-y\- & \raggedright Specificity of this selector (READONLY).&\\
\cline{1-2}
\multicolumn{2}{|l|}{\textit{Inherited from cssutils.util.Base2}}\\
\multicolumn{2}{|p{\varwidth}|}{\raggedright seq}\\
\cline{1-2}
\multicolumn{2}{|l|}{\textit{Inherited from object}}\\
\multicolumn{2}{|p{\varwidth}|}{\raggedright \_\_class\_\_}\\
\cline{1-2}
\end{longtable}

    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.selector \textit{(module)}!cssutils.css.selector.Selector \textit{(class)}|)}
    \index{cssutils \textit{(package)}!cssutils.css \textit{(package)}!cssutils.css.selector \textit{(module)}|)}
