| Server IP : 35.80.110.71 / Your IP : 216.73.216.52 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/css_parser/css/__pycache__/ |
Upload File : |
�
��3e� � � � d dl mZmZmZmZ d dlZd dlZddlm Z ddl
mZ dgZdZ
dZd dlZej d d k\ reZneZ G d
� de j( � Zy)� )�unicode_literals�division�absolute_import�print_functionN� )�cssrule)�CSSVariablesDeclaration�CSSVariablesRule�restructuredtextz;$Id: cssfontfacerule.py 1818 2009-07-30 21:39:00Z cthedot $� c �� � � e Zd ZdZ d� fd� Zd� Zd� Zd� Z� fd�Z e eed�� Z
e d �� Zd
� Z e d� ed�� Z
e d
� d�� Z e d� d�� Z e d� � Z� xZS )r
a_
The CSSVariablesRule interface represents a @variables rule within a CSS
style sheet. The @variables rule is used to specify variables.
css_parser uses a :class:`~css_parser.css.CSSVariablesDeclaration` to
represent the variables.
Format::
variables
VARIABLES_SYM S* medium [ COMMA S* medium ]* LBRACE S*
variableset* '}' S*
;
for variableset see :class:`css_parser.css.CSSVariablesDeclaration`
**Media are not implemented. Reason is that css_parser is using CSS
variables in a kind of preprocessing and therefor no media information
is available at this stage. For now do not use media!**
Example::
@variables {
CorporateLogoBGColor: #fe8d12;
}
div.logoContainer {
background-color: var(CorporateLogoBGColor);
}
c �� �� t t | � ||�� d| _ t j
j
||�� | _ |r|| _ || _
yt | �� | _ || _
y)zO
If readonly allows setting of properties in constructor only.
)�
parentRule�parentStyleSheetz
@variables)�readonly�r N)�superr
�__init__�
_atkeyword�
css_parser�stylesheets� MediaList�_media� variablesr � _readonly)�self� mediaTextr r r r � __class__s ��A/usr/lib/python3/dist-packages/css_parser/css/cssvariablesrule.pyr zCSSVariablesRule.__init__5 sn �� �
���.�*�@P� /� R�&��� !�,�,�6�6�y�8�6�T����&�D�N� "��� 5��E�D�N�!��� c � � d| j j �d| j j �d| j j
�d�S )Nzcss_parser.css.z(mediaText=z, variables=�))r �__name__r r r �cssText�r s r �__repr__zCSSVariablesRule.__repr__H s3 � ��N�N�#�#��K�K�!�!��N�N�"�"�$� $r c � � d| j j | j j | j j
| j t | � fz S )NzE<css_parser.css.%s object mediaText=%r variables=%r valid=%r at 0x%x>)r r# r r r r$ �valid�idr% s r �__str__zCSSVariablesRule.__str__N sK � ��!�^�^�4�4�!�[�[�2�2�!�^�^�3�3�!�Z�Z���X� '�'� 'r c �@ � t j j | � S )z#Return serialized property cssText.)r �ser�do_CSSVariablesRuler% s r �_getCssTextzCSSVariablesRule._getCssTextV s � ��~�~�1�1�$�7�7r c �l �� t t | � |� | j |� }| j |d� }| j |� | j j k7 rH| j j d| j |� z t j j �� yt | �� }d}| j |dd�� \ }}| j! |� dk7 r0d}| j j d | j |� z |� d
di}| j# � } | j% d| | j |� i �� \ }
}|xr |
xr |d
}| j |dd�
� \ }}
| j! |
� | j |
� }}|dk7 r4|dk7 r/d}| j j d| j |� z � | j |� }|rd}| j j d|�� d|k( r|j'