a
    [Xhf                     @   s  d Z ddlZddlmZ G dd dZG dd deZG d	d
 d
eZG dd deZG dd deeZG dd deZ	G dd deZ
G dd de
eZG dd de
ZG dd de
ZG dd deeZG dd deZG dd deeZG dd  d eeZG d!d" d"eeZG d#d$ d$eZG d%d& d&eZG d'd( d(eZG d)d* d*eZG d+d, d,eZG d-d. d.eZG d/d0 d0eZG d1d2 d2eZG d3d4 d4eZG d5d6 d6eZG d7d8 d8eZG d9d: d:eeZG d;d< d<ee
ZG d=d> d>eZ G d?d@ d@e eZ!G dAdB dBe e
Z"dS )Cu  Classes for all types of boxes in the CSS formatting structure / box model.

See https://www.w3.org/TR/CSS21/visuren.html

Names are the same as in CSS 2.1 with the exception of ``TextBox``. In
WeasyPrint, any text is in a ``TextBox``. What CSS calls anonymous inline boxes
are text boxes but not all text boxes are anonymous inline boxes.

See https://www.w3.org/TR/CSS21/visuren.html#anonymous

Abstract classes, should not be instantiated:

* Box
* BlockLevelBox
* InlineLevelBox
* BlockContainerBox
* ReplacedBox
* ParentBox
* AtomicInlineLevelBox

Concrete classes:

* PageBox
* BlockBox
* InlineBox
* InlineBlockBox
* BlockReplacedBox
* InlineReplacedBox
* TextBox
* LineBox
* Various table-related Box subclasses

All concrete box classes whose name contains "Inline" or "Block" have one of
the following "outside" behavior:

* Block-level (inherits from :class:`BlockLevelBox`)
* Inline-level (inherits from :class:`InlineLevelBox`)

and one of the following "inside" behavior:

* Block container (inherits from :class:`BlockContainerBox`)
* Inline content (InlineBox and :class:`TextBox`)
* Replaced content (inherits from :class:`ReplacedBox`)

… with various combinasions of both.

See respective docstrings for details.

    N   )computed_from_cascadedc                   @   s  e Zd ZdZdZdZdZdZdZdZ	dZ
dZdZdZdZdZdZdZdZdZdZdd ZdOddZdd	 Zd
d Zedd Zdd Zdd ZdPddZdd Zdd Zdd Z dd Z!dd Z"dd  Z#d!d" Z$d#d$ Z%d%d& Z&d'd( Z'd)d* Z(d+d, Z)d-d. Z*d/d0 Z+d1d2 Z,d3d4 Z-d5d6 Z.d7d8 Z/d9d: Z0d;d< Z1d=d> Z2d?d@ Z3dAdB Z4dCdD Z5dEdF Z6dGdH Z7dIdJ Z8dKdL Z9dMdN Z:dS )QBoxz"Abstract base class for all boxes.FNc                 C   s   | j S Nchildrenself r
   j/var/www/viveiro_mudafortebrasil/venv/lib/python3.9/site-packages/weasyprint/formatting_structure/boxes.pyall_childrenU   s    zBox.all_childrenc                 c   s<   | V  | j D ]*}|st|tr0||E dH  q|V  qdS )z9A flat generator for a box, its children and descendants.N)r   
isinstancer   descendants)r	   Zplaceholderschildr
   r
   r   r   X   s
    
zBox.descendantsc                 C   s$   || _ || _|| _t | _g | _d S r   )element_tagelementstylesetremove_decoration_sidesr   )r	   r   r   r   r
   r
   r   __init__a   s
    zBox.__init__c                 C   s   dt | j d| j dS N< >)type__name__r   r   r
   r
   r   __repr__h   s    zBox.__repr__c                 O   s.   t i |jdd}| |j||jg|R i |S )z6Return an anonymous box that inherits from ``parent``.N)ZcascadedZparent_styler   )r   r   r   r   )clsparentargskwargsr   r
   r
   r   anonymous_fromk   s    zBox.anonymous_fromc                 C   s$   t | }||}|j| j |S )zReturn shallow copy of the box.)r   __new____dict__update)r	   r   new_boxr
   r
   r   copyr   s    
zBox.copyc                 C   s   |   S )z?Return a copy of the box with recursive copies of its children.)r&   r   r
   r
   r   deepcopy|   s    zBox.deepcopyr   c                 C   sd   ||  krdkrn ndS |  j |7  _ |  j|7  _|  D ]}|rP| s@|||| q@dS )uc   Change the box’s position.

        Also update the children’s positions accordingly.

        r   N)
position_x
position_yr   
is_floated	translate)r	   dxdyignore_floatsr   r
   r
   r   r+      s    zBox.translatec                 C   s   | j | j | j S )zWidth of the padding box.)widthpadding_leftpadding_rightr   r
   r
   r   padding_width   s    zBox.padding_widthc                 C   s   | j | j | j S )zHeight of the padding box.)heightpadding_toppadding_bottomr   r
   r
   r   padding_height   s    zBox.padding_heightc                 C   s   |   | j | j S )zWidth of the border box.)r2   border_left_widthborder_right_widthr   r
   r
   r   border_width   s    zBox.border_widthc                 C   s   |   | j | j S )zHeight of the border box.)r6   border_top_widthborder_bottom_widthr   r
   r
   r   border_height   s    zBox.border_heightc                 C   s   |   | j | j S )z)Width of the margin box (aka. outer box).)r9   margin_leftmargin_rightr   r
   r
   r   margin_width   s    zBox.margin_widthc                 C   s   |   | j | j S )z*Height of the margin box (aka. outer box).)r<   
margin_topmargin_bottomr   r
   r
   r   margin_height   s    zBox.margin_heightc                 C   s   | j | j | j | j S )z0Absolute horizontal position of the content box.)r(   r=   r0   r7   r   r
   r
   r   content_box_x   s    zBox.content_box_xc                 C   s   | j | j | j | j S )z.Absolute vertical position of the content box.)r)   r@   r4   r:   r   r
   r
   r   content_box_y   s    zBox.content_box_yc                 C   s   | j | j | j S )z0Absolute horizontal position of the padding box.)r(   r=   r7   r   r
   r
   r   padding_box_x   s    zBox.padding_box_xc                 C   s   | j | j | j S )z.Absolute vertical position of the padding box.)r)   r@   r:   r   r
   r
   r   padding_box_y   s    zBox.padding_box_yc                 C   s   | j | j S )z/Absolute horizontal position of the border box.)r(   r=   r   r
   r
   r   border_box_x   s    zBox.border_box_xc                 C   s   | j | j S )z-Absolute vertical position of the border box.)r)   r@   r   r
   r
   r   border_box_y   s    zBox.border_box_yc                 C   s   |   |  |  |  fS z=Return the (x, y, w, h) rectangle where the box is clickable.)rG   rH   r9   r<   r   r
   r
   r   hit_area   s    zBox.hit_areac              
   C   sT  | j \}}| j\}}| j\}	}
| j\}}td|| }td|| }td|| }td|| }td|	| }	td|
| }
td|| }td|| }|  | }|  | }|  | | }|  | | }t	dgdd ||| f|||	 f||| f|||
 ffD  }|||||| || f|| || f|	| |
| f|| || ffS )zPosition, size and radii of a box inside the outer border box.

        bt, br, bb, and bl are distances from the outer border box,
        defining a rectangle to be rounded.

        r      c                 S   s    g | ]\}}|d kr|| qS )r   r
   ).0ZextentZ	sum_radiir
   r
   r   
<listcomp>   s   z#Box.rounded_box.<locals>.<listcomp>)
Zborder_top_left_radiusZborder_top_right_radiusZborder_bottom_right_radiusZborder_bottom_left_radiusmaxrG   rH   r9   r<   min)r	   ZbtbrZbbblZtlrxZtlryZtrrxZtrryZbrrxZbrryZblrxZblryxyr/   r3   ratior
   r
   r   rounded_box   s:    








zBox.rounded_boxc                 C   s(   |  | j| | j| | j| | j| S r   rU   r:   r8   r;   r7   )r	   rT   r
   r
   r   rounded_box_ratio   s    zBox.rounded_box_ratioc                 C   s   |  | j| j| j| jS )z?Return the position, size and radii of the rounded padding box.rV   r   r
   r
   r   rounded_padding_box  s    zBox.rounded_padding_boxc                 C   s   |  ddddS )z>Return the position, size and radii of the rounded border box.r   )rU   r   r
   r
   r   rounded_border_box  s    zBox.rounded_border_boxc                 C   s0   |  | j| j | j| j | j| j | j| j S )z?Return the position, size and radii of the rounded content box.)	rU   r:   r4   r8   r1   r;   r5   r7   r0   r   r
   r
   r   rounded_content_box  s    



zBox.rounded_content_boxc                 C   s   | j d dv S )z#Return whether this box is floated.float)leftrightr   r   r
   r
   r   r*     s    zBox.is_floatedc                 C   s   | j d dkS )z&Return whether this box is a footnote.r[   footnoter^   r   r
   r
   r   is_footnote  s    zBox.is_footnotec                 C   s   | j d dv S )z>Return whether this box is in the absolute positioning scheme.position)absolutefixedr^   r   r
   r
   r   is_absolutely_positioned!  s    zBox.is_absolutely_positionedc                 C   s   | j d d dkS )z-Return whether this box is a running element.ra   r   z	running()r^   r   r
   r
   r   
is_running%  s    zBox.is_runningc                 C   s"   |   p|  p|  p|   S )z*Return whether this box is in normal flow.)r*   rd   re   r`   r   r
   r
   r   is_in_normal_flow)  s
    zBox.is_in_normal_flowc                 C   s>   t | tp<t | tp<| jd dv p<| jd dko<| jd dkS )z&Return whether this box is monolithic.overflow)autoZscrollhiddenr3   rh   )r   AtomicInlineLevelBoxReplacedBoxr   r   r
   r
   r   is_monolithic/  s    
zBox.is_monolithicc                 C   sR   |   pP|  pP| jpPt| tr,t| t pPt| trD| jd dkpPd| jd v S )z?Return whether this box establishes a block formatting context.rg   visiblez	flow-rootZdisplay)r*   rd   	is_columnr   BlockContainerBoxBlockBoxr   r   r
   r
   r   establishes_formatting_context9  s    z"Box.establishes_formatting_contextc                 C   s   | j d | j d fS )z!Return start and end page values.pager^   r   r
   r
   r   page_valuesF  s    zBox.page_valuesc                 C   s2   ddl m} | jdur.| jjdkr.|| jdS dS )z>Return whether this link should be stored as a PDF attachment.r   )element_has_link_typeNa
attachmentF)htmlrt   r   tag)r	   rt   r
   r
   r   is_attachmentL  s    zBox.is_attachmentc                 C   s8   | j d dkr4| jdur4| jjdv r4t| ttf S dS )z(Return whether this box is a form input.Z
appearancerh   N)buttoninputselecttextareaF)r   r   rx   r   LineBoxTextBoxr   r
   r
   r   is_inputV  s    zBox.is_inputc                 C   s   | j du rdS | j jdkS )z*Return whether this box is a form element.NFform)r   rx   r   r
   r
   r   is_form^  s    
zBox.is_form)F)r   r   F);r   
__module____qualname____doc__proper_table_childinternal_table_or_captiontabular_containerZleading_collapsible_spaceZtrailing_collapsible_spaceis_table_wrapperZis_flex_itemZis_grid_itemZis_for_root_elementrn   Z	is_leaderZtransformation_matrixZbookmark_labelZ
string_setr_   Zcached_counter_valuesZmissing_linkr   r   r   r   classmethodr!   r&   r'   r+   r2   r6   r9   r<   r?   rB   rC   rD   rE   rF   rG   rH   rJ   rU   rW   rX   rY   rZ   r*   r`   rd   re   rf   rl   rq   rs   ry   r   r   r
   r
   r
   r   r   8   sp   
	


-


r   c                       sT   e Zd ZdZ fddZdd Zdd Zdd	 Zd
d Zdd Z	 fddZ
  ZS )	ParentBoxzA box that has children.c                    s   t  ||| t|| _d S r   )superr   tupler   )r	   r   r   r   r   	__class__r
   r   r   g  s    zParentBox.__init__c                 C   sH   | j | t| d| d t| d| d t| d| dd dS )z4Set to 0 the margin, padding and border of ``side``.Zmargin_r   Zpadding_Zborder__widthN)r   addsetattr)r	   sider
   r
   r   _reset_spacingk  s    zParentBox._reset_spacingc                 C   s2   | j d dkrd S |r | d |r.| d d S )Nbox_decoration_breakclonetopbottomr   r   )r	   startendr
   r
   r   remove_decorationr  s    
zParentBox.remove_decorationc                 C   s   |   }||_t | _|S )z8Create a new equivalent box with given ``new_children``.)r&   r   r   r   )r	   Znew_childrenr%   r
   r
   r   copy_with_childrenz  s    zParentBox.copy_with_childrenc                 C   s"   |   }tdd | jD |_|S )Nc                 s   s   | ]}|  V  qd S r   )r'   rL   r   r
   r
   r   	<genexpr>      z%ParentBox.deepcopy.<locals>.<genexpr>)r&   listr   )r	   resultr
   r
   r   r'     s    zParentBox.deepcopyc                 C   s4   | j s
J | jD ]}t|tr|  S qtddS )z!Get the table wrapped by the box.zTable wrapper without a tableN)r   r   r   TableBox
ValueError)r	   r   r
   r
   r   get_wrapped_table  s
    



zParentBox.get_wrapped_tablec                    s   t   \}}dd | jD }|rt|dkrT|d  }|d pD|}|d pP|}n2|d |d  }}| d pt|}| d p|}||fS )Nc                 S   s   g | ]}|  r|qS r
   )rf   r   r
   r
   r   rM     s   z)ParentBox.page_values.<locals>.<listcomp>rK   r   )r   rs   r   len)r	   Zstart_value	end_valuer   rs   Z	start_boxZend_boxr   r
   r   rs     s    zParentBox.page_values)r   r   r   r   r   r   r   r   r'   r   rs   __classcell__r
   r
   r   r   r   e  s   	r   c                   @   s   e Zd ZdZdZdS )BlockLevelBoxzA box that participates in an block formatting context.

    An element with a ``display`` value of ``block``, ``list-item`` or
    ``table`` generates a block-level box.

    N)r   r   r   r   Z	clearancer
   r
   r
   r   r     s   r   c                   @   s   e Zd ZdZdS )ro   aj  A box that contains only block-level boxes or only line boxes.

    A box that either contains only block-level boxes or establishes an inline
    formatting context and thus contains only line boxes.

    A non-replaced element with a ``display`` value of ``block``,
    ``list-item``, ``inline-block`` or 'table-cell' generates a block container
    box.

    Nr   r   r   r   r
   r
   r
   r   ro     s   ro   c                   @   s   e Zd ZdZdS )rp   zA block-level box that is also a block container.

    A non-replaced element with a ``display`` value of ``block``, ``list-item``
    generates a block box.

    Nr   r
   r
   r
   r   rp     s   rp   c                       s,   e Zd ZdZdZdZe fddZ  ZS )r~   aK  A box that represents a line in an inline formatting context.

    Can only contain inline-level boxes.

    In early stages of building the box tree a single line box contains many
    consecutive inline boxes. Later, during layout phase, each line boxes will
    be split into multiple line boxes, one for each actual line.

    Zclipnonec                    s8   t  j|g|R i |}|jd dkr4|jd |_|S )Nrg   rm   text_overflow)r   r!   r   r   )r   r   r   r    Zboxr   r
   r   r!     s    zLineBox.anonymous_from)	r   r   r   r   r   Zblock_ellipsisr   r!   r   r
   r
   r   r   r~     s
   	r~   c                   @   s   e Zd ZdZdd ZdS )InlineLevelBoxaQ  A box that participates in an inline formatting context.

    An inline-level box that is not an inline box is said to be "atomic". Such
    boxes are inline blocks, replaced elements and inline tables.

    An element with a ``display`` value of ``inline``, ``inline-table``, or
    ``inline-block`` generates an inline-level box.

    c                 C   sP   | j d dkrd S | j d dk}|r6| |r0dnd |rL| |rFdnd d S )Nr   r   	directionltrr\   r]   r   )r	   r   r   r   r
   r
   r   r     s    z InlineLevelBox.remove_decorationN)r   r   r   r   r   r
   r
   r
   r   r     s   	r   c                   @   s   e Zd ZdZdZdd ZdS )	InlineBoxa  An inline box with inline children.

    A box that participates in an inline formatting context and whose content
    also participates in that inline formatting context.

    A non-replaced element with a ``display`` value of ``inline`` generates an
    inline box.

    Nc                 C   s   |   | j|  |  fS rI   )rG   r)   r9   rB   r   r
   r
   r   rJ     s    
zInlineBox.hit_area)r   r   r   r   Zlink_annotationrJ   r
   r
   r
   r   r     s   	r   c                       s,   e Zd ZdZdZ fddZdd Z  ZS )r   zA box that contains only text and has no box children.

    Any text in the document ends up in a text box. What CSS calls "anonymous
    inline boxes" are also text boxes.

    r   c                    s"   |sJ t  ||| || _d S r   )r   r   text)r	   r   r   r   r   r   r
   r   r     s    zTextBox.__init__c                 C   s   |sJ |   }||_|S )z?Return a new TextBox identical to this one except for the text.)r&   r   )r	   r   r%   r
   r
   r   copy_with_text  s    zTextBox.copy_with_text)r   r   r   r   Zjustification_spacingr   r   r   r
   r
   r   r   r     s   r   c                   @   s   e Zd ZdZdS )rj   zpAn atomic box in an inline formatting context.

    This inline-level box cannot be split for line breaks.

    Nr   r
   r
   r
   r   rj     s   rj   c                   @   s   e Zd ZdZdS )InlineBlockBoxzA box that is both inline-level and a block container.

    It behaves as inline on the outside and as a block on the inside.

    A non-replaced element with a 'display' value of 'inline-block' generates
    an inline-block box.

    Nr   r
   r
   r
   r   r      s   r   c                       s    e Zd ZdZ fddZ  ZS )rk   u   A box whose content is replaced.

    For example, ``<img>`` are replaced: their content is rendered externally
    and is opaque from CSS’s point of view.

    c                    s   t  ||| || _d S r   )r   r   replacement)r	   r   r   r   r   r   r
   r   r   2  s    zReplacedBox.__init__)r   r   r   r   r   r   r
   r
   r   r   rk   +  s   rk   c                   @   s   e Zd ZdZdS )BlockReplacedBoxzA box that is both replaced and block-level.

    A replaced element with a ``display`` value of ``block``, ``liste-item`` or
    ``table`` generates a block-level replaced box.

    Nr   r
   r
   r
   r   r   7  s   r   c                   @   s   e Zd ZdZdS )InlineReplacedBoxzA box that is both replaced and inline-level.

    A replaced element with a ``display`` value of ``inline``,
    ``inline-table``, or ``inline-block`` generates an inline-level replaced
    box.

    Nr   r
   r
   r
   r   r   @  s   r   c                       s6   e Zd ZdZdZdd Zd fdd	Zd	d
 Z  ZS )r   z(Box for elements with ``display: table``Tc                 C   s   t | j| jS r   )	itertoolschainr   Zcolumn_groupsr   r
   r
   r   r   P  s    zTableBox.all_childrenr   Fc                    s&    fdd| j D | _ t  ||S )Nc                    s   g | ]}|  qS r
   r
   )rL   ra   r,   r
   r   rM   T  s   z&TableBox.translate.<locals>.<listcomp>)Zcolumn_positionsr   r+   )r	   r,   r-   r.   r   r   r   r+   S  s    
zTableBox.translatec                 C   s   | j d | j d fS )Nrr   r^   r   r
   r
   r   rs   X  s    zTableBox.page_values)r   r   F)	r   r   r   r   r   r   r+   rs   r   r
   r
   r   r   r   J  s
   r   c                   @   s   e Zd ZdZdS )InlineTableBoxz/Box for elements with ``display: inline-table``Nr   r
   r
   r
   r   r   \  s   r   c                   @   s,   e Zd ZdZdZdZdZeefZ	dZ
dZdS )TableRowGroupBoxz2Box for elements with ``display: table-row-group``TFN)r   r   r   r   r   r   r   r   r   proper_parentsZ	is_headerZ	is_footerr
   r
   r
   r   r   `  s   r   c                   @   s&   e Zd ZdZdZdZdZeee	fZ
dS )TableRowBoxz,Box for elements with ``display: table-row``TN)r   r   r   r   r   r   r   r   r   r   r   r
   r
   r
   r   r   l  s
   r   c                   @   sT   e Zd ZdZdZdZeefZdZ	dZ
dZdZdZdZdZdZdd Zedd ZdS )	TableColumnGroupBoxz5Box for elements with ``display: table-column-group``Tr   c                 C   s   dd | j D S )z3Return cells that originate in the group's columns.c                 S   s   g | ]}|  D ]}|qqS r
   )	get_cells)rL   columncellr
   r
   r   rM     s   z1TableColumnGroupBox.get_cells.<locals>.<listcomp>r   r   r
   r
   r   r     s    zTableColumnGroupBox.get_cellsc                 C   sH   | j rt| j S ztt| jdd dW S  tyB   Y dS 0 d S Nspan rK   )r   r   rN   intr   getstripr   r   r
   r
   r   r     s    
zTableColumnGroupBox.spanN)r   r   r   r   r   r   r   r   r   r@   rA   r=   r>   r4   r5   r0   r1   r   propertyr   r
   r
   r
   r   r   t  s   r   c                   @   sV   e Zd ZdZdZdZeeefZ	dZ
dZdZdZdZdZdZdZdd Zedd ZdS )	TableColumnBoxz/Box for elements with ``display: table-column``Tr   c                 C   s   t dS )zRReturn cells that originate in the column.

        Is set on instances.

        N)NotImplementedErrorr   r
   r
   r   r     s    zTableColumnBox.get_cellsc                 C   s8   zt t| jdd dW S  ty2   Y dS 0 d S r   )rN   r   r   r   r   r   r   r
   r
   r   r     s    zTableColumnBox.spanN)r   r   r   r   r   r   r   r   r   r   r@   rA   r=   r>   r4   r5   r0   r1   r   r   r   r
   r
   r
   r   r     s   
r   c                       s$   e Zd ZdZdZ fddZ  ZS )TableCellBoxz-Box for elements with ``display: table-cell``Tc              	      s   t  j|i | z"tt| jdd d| _W n tt	fyP   d| _Y n0 z"tt| jdd d| _
W n tt	fy   d| _
Y n0 d S )Ncolspanr   rK   rowspanr   )r   r   rN   r   r   r   r   r   AttributeErrorr   r   )r	   r   r    r   r
   r   r     s    ""zTableCellBox.__init__)r   r   r   r   r   r   r   r
   r
   r   r   r     s   r   c                   @   s    e Zd ZdZdZdZeefZdS )TableCaptionBoxz0Box for elements with ``display: table-caption``TN)	r   r   r   r   r   r   r   r   r   r
   r
   r
   r   r     s   r   c                       s@   e Zd ZdZ fddZdd Zedd Zedd	 Z  Z	S )
PageBoxzBox for a page.

    Initially the whole document will be in the box for the root element.
    During layout a new page box is created after every page break.

    c                    s   || _ t jd |d g d d S N)r   r   r   r   )	page_typer   r   )r	   r   r   r   r
   r   r     s    zPageBox.__init__c                 C   s   dt | j d| j dS r   )r   r   r   r   r
   r
   r   r     s    zPageBox.__repr__c                    s    fdddD S )Nc                    s    i | ]}| j d |  jqS )Zbleed_)r   value)rL   r   r   r
   r   
<dictcomp>  s   z!PageBox.bleed.<locals>.<dictcomp>)r   r]   r   r\   r
   r   r
   r   r   bleed  s    
zPageBox.bleedc                 C   sL   | j d  | j d  |  | j d  | j d  |  | j d  | j d  fS )Nr\   r   r]   r   )r   r?   rB   r   r
   r
   r   
bleed_area  s    zPageBox.bleed_area)
r   r   r   r   r   r   r   r   r   r   r
   r
   r   r   r     s   
r   c                       s(   e Zd ZdZ fddZdd Z  ZS )	MarginBoxz3Box in page margins, as defined in CSS3 Paged Mediac                    s   || _ t jd |d g d d S r   )
at_keywordr   r   )r	   r   r   r   r
   r   r     s    zMarginBox.__init__c                 C   s   dt | j d| j dS r   )r   r   r   r   r
   r
   r   r     s    zMarginBox.__repr__r   r   r   r   r   r   r   r
   r
   r   r   r     s   r   c                       s(   e Zd ZdZ fddZdd Z  ZS )FootnoteAreaBoxz-Box displaying footnotes, as defined in GCPM.c                    s   || _ t jd |d g d d S r   )rr   r   r   )r	   rr   r   r   r
   r   r      s    zFootnoteAreaBox.__init__c                 C   s   dt | j dS )Nr   z @footnote>)r   r   r   r
   r
   r   r     s    zFootnoteAreaBox.__repr__r   r
   r
   r   r   r     s   r   c                   @   s   e Zd ZdZdS )FlexContainerBoxz$A box that contains only flex-items.Nr   r
   r
   r
   r   r   
  s   r   c                   @   s   e Zd ZdZdS )FlexBoxzA box that is both block-level and a flex container.

    It behaves as block on the outside and as a flex container on the inside.

    Nr   r
   r
   r
   r   r     s   r   c                   @   s   e Zd ZdZdS )InlineFlexBoxzA box that is both inline-level and a flex container.

    It behaves as inline on the outside and as a flex container on the inside.

    Nr   r
   r
   r
   r   r     s   r   c                   @   s   e Zd ZdZdS )GridContainerBoxz$A box that contains only grid-items.Nr   r
   r
   r
   r   r     s   r   c                   @   s   e Zd ZdZdS )GridBoxzA box that is both block-level and a grid container.

    It behaves as block on the outside and as a grid container on the inside.

    Nr   r
   r
   r
   r   r   "  s   r   c                   @   s   e Zd ZdZdS )InlineGridBoxzA box that is both inline-level and a grid container.

    It behaves as inline on the outside and as a grid container on the inside.

    Nr   r
   r
   r
   r   r   *  s   r   )#r   r   cssr   r   r   r   ro   rp   r~   r   r   r   rj   r   rk   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r
   r
   r   <module>   sF   2  /A
		
"!