Sindbad~EG File Manager
�
Mٜg�1 � � � d Z ddlmZ ddlZddlmZmZ ddlZddlm Z ddl
mZ er
ddlm
Z
mZmZ dd�Zd
dd �Z G d
� d� Zy)zN
Utilities for interpreting CSS from Stylers for formatting non-HTML outputs.
� )�annotationsN)�
TYPE_CHECKING�Callable)�
CSSWarning)�find_stack_level)� Generator�Iterable�Iteratorc � � � d� fd�}|S )a)
Wrapper to expand shorthand property into top, right, bottom, left properties
Parameters
----------
side : str
The border side to expand into properties
Returns
-------
function: Return to call when a 'border(-{side}): {value}' string is encountered
c 3 �@ �K � |j � } | j t |� }t | j |� D ] \ }}�j |� || f�� � y# t $ r. t j
d|� d|� d�t t � �� Y yw xY w�w)a<
Expand shorthand property into side-specific property (top, right, bottom, left)
Parameters
----------
prop (str): CSS property name
value (str): String token for property
Yields
------
Tuple (str, str): Expanded property, value
zCould not expand "z: �"��
stacklevelN)�split�SIDE_SHORTHANDS�len�KeyError�warnings�warnr r �zip�SIDES�format)�self�prop�value�tokens�mapping�key�idx�prop_fmts ��@/usr/local/lib/python3.12/site-packages/pandas/io/formats/css.py�expandz_side_expander.<locals>.expand&