| 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 d dlm
Z
mZmZmZmZ dgZdZd Zd dlZej, d d
k\ reZneZ G d� de j4 � Zy)� )�unicode_literals�division�absolute_import�print_functionN� )�cssrule)�CSSStyleDeclaration)�Prod�PreDef�Sequence�Choice�
ProdParser�
MarginRule�restructuredtextz$Id$� c �� � � e Zd ZdZg d�Z d� fd� Zd� Z ed� ed�� ZeZ d� Z
d � Zd
� Z� fd�Z
eee
d�
� Zd� Z ed� ed�� Z ed� d�� Z ed� � Z� xZS )r a�
A margin at-rule consists of an ATKEYWORD that identifies the margin box
(e.g. '@top-left') and a block of declarations (said to be in the margin
context).
Format::
margin :
margin_sym S* '{' declaration [ ';' S* declaration? ]* '}' S*
;
margin_sym :
TOPLEFTCORNER_SYM |
TOPLEFT_SYM |
TOPCENTER_SYM |
TOPRIGHT_SYM |
TOPRIGHTCORNER_SYM |
BOTTOMLEFTCORNER_SYM |
BOTTOMLEFT_SYM |
BOTTOMCENTER_SYM |
BOTTOMRIGHT_SYM |
BOTTOMRIGHTCORNER_SYM |
LEFTTOP_SYM |
LEFTMIDDLE_SYM |
LEFTBOTTOM_SYM |
RIGHTTOP_SYM |
RIGHTMIDDLE_SYM |
RIGHTBOTTOM_SYM
;
e.g.::
@top-left {
content: "123";
}
)z@top-left-cornerz @top-leftz@top-centerz
@top-rightz@top-right-cornerz@bottom-left-cornerz@bottom-leftz@bottom-centerz
@bottom-rightz@bottom-right-cornerz @left-topz@left-middlez@left-bottomz
@right-topz
@right-middlez
@right-bottomc � �� t t | � ||�� dx| _ | _ |r|| _ |r|| _ || _ yt | �� | _ || _ y)z�
:param atkeyword:
The margin area, e.g. '@top-left' for this rule
:param style:
CSSStyleDeclaration for this MarginRule
)�
parentRule�parentStyleSheetN�r ) �superr �__init__�
_atkeyword�_keyword�margin�styler � _readonly)�selfr r r r �readonly� __class__s ��;/usr/lib/python3/dist-packages/css_parser/css/marginrule.pyr zMarginRule.__init__K sa �� � �j�$�(�J�:J� )� L� +/�.���$�-�� �D�K���D�J� "��� -��=�D�J�!��� c �� � | j |� }|t j vrF| j j d| j
�d|��t j j �� y|| _ || _
y)z2Check if new keyword fits the rule it is used for.z!Invalid margin @keyword for this z rule: ��errorN)�
_normalizer �margins�_logr% r �xml�dom�InvalidModificationErrr r )r r �ns r! �
_setMarginzMarginRule._setMarginb s_ � ��O�O�F�#���J�&�&�&��I�I�O�O�!�[�[�&�2�"%�'�'�"@�"@�
�
B�
�D�O�"�D�Mr"